polygonContainsPoint and various tweaks