Fixed isReachable

Fixes
- isReachable now loops over all nodes and sets visited to false
- isReachable now loops over all edges and checks for connections

Tests
- Added a bunch of test cases