Move clustering logic to metadata.

Why reset per get call?