Removed Reverse() for performance
Optimized row reduction and equation construction