clean up and consolidate output