Implementation of binary tree