Moves app env handling for settings to the app file