Improve phaser.js generation