Finished modules.js for now (though untested)