More java to groovy refactoring