Wip/refactor