Fixed some typos and added some comments.