Made the buffer struct more class-like.