Adapt tree-generation code to use new JSON format.
Merge branch 'materials' of github.com:fuzzie360/coursemology.org into materials