can't we set this as part of the module discovery? then there's no need to pass all these things around.