Refactor graffias.groovy