More code optimalisations.