WIP refactoring.