Refactor the load of modules