Small amount of refactoring.