I think I agree, but will wait until the tests are in place (see below) before refactoring as there are enough test-cases now that it is tricky to know if something breaks without them.