WIP modular refactor