Add Util.hs and some functions