Changes to formatting and added comments.