Refactored util methods into module