Begun experimenting with code generator. Using the old XML, I can generate things that work. I'd rather use the new XML, though... Still need to figure out how to deal with n-deep groups.