Refactor mrb argument fetching code