Move buffer to struct.