The previous commit had a issue when creating a map. It is fixed here. More test cases are written. Removing the last point is implemented.