Used Underscore's #sortedIndex method to keep queue sorted