Refactoring graph totals methods