Remove more dead code.
Fix some tests.