Upgraded ByteBuffer library
minor code cleanup