Refactored utils.psm1 and added more functions