refactor inclusion of javascript resources to better work with Grails Resources plugin.