pass settings to all relevant functions.