Function splitArgsAndCtx