-Remove concept of re-using global variables in order
to allow functions to be usable on threads.
-fix issue with register counting in compiler.