Neatened up code, additional Util.java functions