remove unused code in Utils class + simplify code