Refactored simple_graph.py yet again, works now