tidy up code in commentsViewController