Visited flags array changed from 1D to 2D in PathFinder class.

Some final keyword were added in function prototypes.