Added proper byte buffer implementation