Merge

Still need to fix writeStreamBits