clearly, passing down the same dict that is created once in main and never touched after that is just an enourmous pollution of code. i don't see what is wrong with a module constant like ```tools.config.variables```? 
in this particular case, the proper module instance should be created once e.g. in main and set in the modules class (why would it change after that? in particular, why would all these checks need to rerun?).  then the modules_tool can return the instance, with any modifications to mod_path that are needed.