Let's pull all this new code out into a function like `GetParams(Context)`.