Refactored priority parsing, added isPriority, matchPriority methods