Javascript tree structure experiments