I get stuck in the crafting part of my turtle replication program, it craft 5 turtles and it is commented everywhere to you to understand waht it do and what it looks for

I believe that somebody more pro will finish it, if you do it, credit is not necessary. Pastebin cause is really big: http://pastebin.com/bD50pAwh