Added a few comments, fixed a few typos