Add graphing and optimization