updates and tidy up