Autofoo cleanups

Fixes several autofoo warnings.