Implementation of a binary tree