More minor optimisations