Add a default factory to the KeyTransformDict.
Cosmetic: move vertices and edges properties further up for ease of reading.
REF: Clean up annotation handling code.
Add missing slot.
Python 3 fix.