Refactor graphs

Main goal of this refactoring exercise was to remove redundancy from components. Components had 'x' and 'y' position calculations repeated over and over again. Now, graphs have configurations that define these calculations centrally for all components.

Additionally, I tried to simplify the graph inheritance chains.