Tidy up priority handling