Cleaned up or added remaining docblocks, and cleaned some unused variables.