Some tidying and commenting.