Template for a binary search tree.