- handle case when writing insufficient number of bits to into a byte
- added some more unit tests