Refactored RGraph code more cleanly into 2 files: one for addons to the graph prototypes and another for initializing the graph