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.
I am unconvinced of the utility of these typedefs