Extract graph to a new class, and make it accessible via the menu
Reworking the menu code to be less repetitive