Added caching of system of equations.