Lots of tidying and small changes.