Adding the basic functions of the tree.

Only insertion is implemented yet.