This is the mechanical port of the remaining bits. Next to clean it up a bit.
Remove the pgraph->resource dependency.