Finished draft of SMCTreeDensity.