Lots of tidy ups