Fix unit test failing in Firefox
Refactor parameter passing
Generalize render errors and report JavaScript execution errors in pages