Convert to using the module pattern