[MOD] cleanup of static variables code.
[MOD] Better strategy for compiling functions and static variables.
[MOD] The stack is now a single array, also some inlining fixes.