Reimplented edges to be weighted
Altered tests to not assume ordered dicts