go fmt
move codegen source code to new file