Simple tree implementation