Some basic buffer manipulation