refine code generation. Fix code to list comments.