Extract helper methods to a module