[WIP] Refactoring.