Fix some missing things

Correct implementation of binary search tree