Code is much less broken now.

Close to having a functional tree data structure for use in the left side of the advanced tab.