Pull priority queues implementation out of recommendations function into a separate class