Reorganize and clean up llvm codegen