Seperated code to graph & partitions.