WIP: First step of a refactoring