Clean-up factoring code.

@ellisonbg and @fperez lots of clean-up to factoring example.  Now it should be much easier to see/change how node sizes and edges are calculated.