Adding primitive saving functionality from polylines