refactored KVS to only use one level of heirarchy