Clean up the backups package.

This is intended as an idempotent change in preparation for further patches.
please move to line 83 and use defer