using sys._getframe() instead of inspect.currentframe() to shift some loops from python to c.
Changed naming approach a little bit to support native looping constructs. Nested loops still aren't perfectly supported (inference will be less efficient because variable reuse will not be optimal).