Update codegen_design with additional helper functions