lots of fixes in the fill-in alogirythm
the big merge