Fixed up graph implementation, now works!