A moderate attempt to remove unsafe/unused code.

This is far from what I would call acceptable, but it is a step
towards containing the differences of repository types again.
It is going to be difficult until s3 is end to end, but we
need to do better at making sure all platforms are supported
on non-mr code for now.