All tests passing. Needs refactoring