Optimisation and simplification