cleanup mainframe