Cleanup:
* Removed some unused variables.
* Removed some extra trailing whitespace.
* Made spacing of comments more uniform.
* Removed large blocks of deprecated code (after months of testing
  without them!