updating to call and pass in a config if a required module is a function...

... and cleaning up tests