Fix a bunch more obsolete code.