Reimplementing Buffer class family.