Add some documentation, avoid using a dictionary for tracking which priority has been mapped