Basic refactoring and source formatting
Moves templates to templates folder
Adds commander for cli parsing and externalizes JSGenerator.js