Factorize echelon function
The maximum echelon is now 9