cleaning groovy code