Bit more refactoring.