Moving utility functions to utility class