Some Refactoring.