Fixed all compilation errors and implemented floodFill()