A simple tree structure in Object Oriented JavaScript