Add triangular matrix support
Perform simplify algorithm refactoring