Cleanup and optimisation (1/3)