Some brief refactoring.