Rework key-value API access.