remove unused KeyValue; cleanup tests