- proper cleanup when reassigning contexts

- work on jtmpl.xhr