Lots of documentation, tidying.