Refactor path queueing