Riemann solver refactoring