Fixed error case when no ‘opts’ object was passed in.
Replaced 'opts' with 'options'

Separated 'opts' and 'options' variable names for scope clarity in the
primary method vs. helper methods.