More tidying and commenting