Libs/Packets: Various adjustments related to bit handling