Lots of new code for new cost structure graphs