new compact MemKvs, fixed type issues