Mild refactoring.