Add priorities

Add a priority field the queue so that ordering can be different than just by id