Additional cleanup.
Refactor.
Add test.
Refactor tests.