Mickael -- rewrote mapping-generator.js file