Cleanup in LMS code generation.