Python: removed dead code
Various cleanups found during sync with python
Sync python with the js new sweetness

Closes #185
Refactor js structure to match python

The two files still differ but they are at least similarly structured.
Also, it is now easier to find the main code path.

This is certainly not a best or final design, just a sufficient one.
Remvoe kruft in [] processing
Make statements inside blocks close when the parent block closes

Closes #186
Make statements inside expresions close when the parent closes

This is not valid syntax but we still want to degrade gracefully.

Closes #186 (even more firmly)