Added custom priorety queue implementation.