Add a random generator
Wrap C tree in Python