Fixed some typos and added comments.