Code cleanup in utility class