Refactor

All tests passed