more work on cleaning up the generated output