Miscellaneous changes

- Fixed bug: x * (y * y) was transformed to the non-resolvable product
(x * y) * y without checking if (y * y) could have been simplified.
- New rule: x * x^2 => x^3
- Variables go before other terms when sorting products