Improve test; fix bug and add Polygon equality