Some optimisations of prunning