More optimisations for gravity tree