cleanup and groovyfy