misc cleanup and documentation

can read commit by commit. no functional changes.
this diff looks more complicated than it is. i just combined the two classes and then whenever they had duplicate methods i combined those methods.