Added util class test and refactoring.