The start of a graph theory based subnet optimizer and misc improvements