Clean up main program