Buffer class cleanup