Tidy up main