Attempt to implement buffer freeing. Something is wrong somewhere with the moving...