Miscellaneous improvements to regiongraph, factorgraph and bipgraph, and finished...