(settings.c) Declare variables at top of function