Minor refactoring. WIP...