Various cleanups of unused globals

With the mass replacements of icons, $settings isn't exactly nearly so useful being global everywhere.