Fixed incorrectly-named $opts parameter in four functions.