Lax equations, factorization and Riemann-Hilbert problems