Corrcted issue in modify in removing old edges and vertices. Modified getCartesianMap function.