Added some utility methods in Util.