refactored Codegen workspace