Added ByteBufferUtils
Added some comments
Fixed some legit cases where an empty byte buffer is expected