clean up main file