Refactor LongBuffer