fixes for new data and package updates

A couple things stopped working, now fixed.
Also added main tree into figure.
There is some terrible code in here, but it is relatively quick, so as
is for now.