UpdateGraph can no longer only attach existing roots but also add new ones
Cleaned up code a bit