Continuing work on refactoring