Bits of refactoring.