Removes unused imports.
Adds some basic tests.