Replaced deprecated guava call
Partial implementation of leaf collapse