Modules now return factory functions