Fixed a small error, added comments to my parts, and changed some things for consistency.