code cleanup intermediate/output