Some restructuring - making sure the test cases work