Work-in-progress refactoring