Updated for Groovy.