GROOVY-6391 Fix varname, also some style improvements