Total cleanup + KVStore refactoring