BitBuffer

I'm pretty sure I didn't get the masks right. Partial Revert.