Improvements to javascript syntax & examples (Structures)

Ref #4