shortest path tests, final weights refactoring