Implemented code generation (ctrl + g)