Code Generation Reviewed + Extended