moved the closures out from the config into the module class