Add getter for node label
Change js generated code to declare all nodes befores arcs