Reworked the test.
Code cleanup.