Graphing

Collapsing this stuff out makes this file way more readable, thanks for the inline refactoring.