Refactored utils.psm1 and completed unit tests