Some formatting and added comments.