Cleanup record handling.