Cleaned and improved comments on the code.

Made the code a little cleaner and added comments to help others
understand.