Refactored the tests a bit.