Cleaned up the graphs' code.