Finish code generation