added flood fill.  some refactoring.