Made tests pass (refactoring error caused them to fail on Travis