Add message priorities, change logging slightly