Merge pull request #99 from fsb4000/prioritysorting