small clean up of the main script