Fix scoping error affecting browser-run tests. Add tests for update()