Switch to use factory classes so we can cache the module config (since closures aren't serializable)