Address review comments: move apply_settings into startup.py.