Fill gaps working!
Improved gap filling code