Replace/edit groovy code with scripts