Utilities refactoring.