Moved settings to global vars