Cleans up unused imports and fixes some broken tests

In preparation for a later PR, I cleaned up the tests and imports.