Removed references to nonexistent tests.
Removed some bizarre and questionable optimizations.