begin refactor, basic code gen output
add basic REPL support and code generation