Tidy up and formatting.