Fix polyline, polygon tests and JSHint warnings