Split midp.js in several files