Tidy and add comments.