MOAR TESTS, minor refactoring