Fixed a few minor issues and commented some badness.