Union-Find Implement and visualization

The code of UI part is ugly. Refactor it