Pull out a helper function for getting various parameters.