separate main file, CodeGenerator
revised tests