Implemented triangulate along with merge polygons.