Optimisation and tweaks.