Simplification of fractions and expressions