restructured a bit so that outputs are no longer thrown in with rootNodes