Refactoring, simplifying towards new structure.