Extracted priority queue into separate file
Refactored priority queue for runtime typing
Fixed several bugs and memory leaks in priority queue and added tasks pipe-lining