isPolygon function added

New function to check if or not a polygon can be used added
Small changes operated on the comments