tidied read_int behaviour
Added handling for priority frames