Cleanup and optimisation.