Make protocols not rely on vector/hash-map