Basic quick union implementation. Does not "feel" faster, might be buggy.