cleanup and groovyfing