Several fixes. Most notably, templates is moved to script and put in templateCache, so the minified js contains the entire app.