Fixing Javascript problems

Fixing problems caused by moving the javascript to .js files, where
grails commands do not work