First implementation of the render graph

Works, but not pretty, needs a good clean up