Added a few comments to the code. Did some slight cleaning up.