updated templates and javascripts. now using requirejs.