Pruning this down to Groovy-only