Refactoring rebuilding of keyspace.

So it's more efficient, and can support my next changes
(making ServedTypes per-cell).