Refactoring core.util