Move the preprocessing machinery to graph_register.{H,C}.