While loops, function calls working. It mostly works.

Next step is cleaning up the memory leaks in the code gen...