Simplify and comment implementation of floyd warshall. Add tests for flo...

...yd warshall algorithm