A few performances optimisations