Final tidy up and commenting