WIP on refactoring changes