Binary Search Tree and Doubly Circular Linked List written in Javascript