Fixing up contours and imcnts