Generics and BST codes

Generics and BST codes