Some mods: changed priority queue