Move clustering logic to metadata.

Why not inline XAttr?/yAttr