Get avatars working again and fix up some client-side errors.