Add cleanup and version check to Groovy role.