Fix a bunch of brokenness.