Small performance optimisations