Refactored queue routing structure