Pulling out a graph abstraction... couldn't find a decent generic graph library ...