[WIP] refactoring.