Added polygons and paths handling from RUBE