Completed the binary tree functionality

All tests are now passing.