Implementation of a binary search tree