Move saving and loading to the buffer