WIP: Refactoring more