Some work on cleaning up tests.
Clean up some tests.
Break out tests into their subsystem implementation files.