Patch module manager

Extract the "load" function from main.js and create a module named moduleManager able to load and unload modules on-the-fly.