clean up of main