Remove direct dependency on org.abego.treelayout.core. Fix a couple of unsafe operations.