Clean up and Optimisation