Refactored unpacking to next_byte method.