Refactored a bunch, to the point where the architecture's a little different. Fixed a bug that made undirected edges seem directed some of the time.