Some tidying up and doc updates