A javascript tree data structure with a focus on tree traversal