Move UnionFind stuff to own folder