tidy up and remove stuff that's not used.