Add support for different solvers.
closes #272.