Added for and foreach to the JSCodeGenerator
Adjusted inlining a little bit