tidy up and remove whitespace