Almost done implementation, only KeyDataFactory enhancement and tests
are missing.