Refactoring test cases; nearly done!