Adding a utilities file for tests
Refactoring the tests a bit based on section 8.5