Optimized Canonicalize
Significantly optimized NSolve