Register allocation and bug fixes

I also fixed branching logic so that the simple_while.cpsl would work.

String writing stops me from testing some of the other tests like simple_if.cpsl, etc.
remove this line.