Simplified implementation for 2 unknowns. Added regression tests.