Update comments

Fix spelling errors and update the comments to better reflect what each
line of code is doing