More work on refactor.