Refactor helper module