Refactored graph class into 'child-classes' to group related operations together