The way this is currently implemented is a bit awkward. We should really utilize the graph more fully.