Added a util file and more common functions to it