Refactored ordering to scope