Modified floopfill a bit
Merge https://github.com/ubieee/mms