Added margins
Added drawing segments which does not intersect