undo latest js optimizations for python
more fixes to handle latest js optimizations, added todos
demo fixes