Minor edits, added comments. I added my changes that didn't work with the merge issues earlier.