Remove more global variables, set defaults for settings