Refactoring work-in-progress.