style changes and tidy up