Code refactoring

A better project structure, with JS classes separated into files in the
src/ folder, and a Gruntfile to build & minify the final script.