Actually doing what I was asked to do, now, and not messing around with groovy js any more...