Comments and minor changes

Added comments to major areas and cleaned up a couple of things