Refactor: Move utils out into a file