Clean up main file