Edited codegen comp.sh and compiler

Partially fixed codegen