Changed the way modules are imported slightly to support loading modules with config.