Implemented codegen visitor