Style fixes

Having tentatively added CompileStatic and TypeChecked, found the issues fixed in these commits. The commits do not add the @CompileStatic and @TypeChecked, as I still don't know whether anyone is supposed to be using them for core groovy stuff or not