Add support for quads and N-polygons
Added some error checking
Planar checks for quads