Binary search tree dictionary implementation