WIP on refactor