Tests now passing (minus index-related ones.) Tree test incredibly slow.

Let the cleanup begin.