refactor how gen code is structured
refactor code gen

closes #86
Merge pull request #87 from rapid-lang/code_gen

variables in root scope