Altered implementation of module pattern.