AliSplit: improved "cleanall" algorithm