REFACTOR - Refactor sort class for chart usage