change analysis so that optional opts parameter is taken by all fns that
might need it. prep for analysis caching.