It's confusing that this function now takes both "expectSuccess" and "opt_expected" arguments. Could you clean this up a little?