Minor refactoring with util class