Cleaned up a bit. And figured out how to graph