reducing code bloat and putting init checks into polygons and polylines