Small fixes and tidy up