Some changes for FF and IE compatibilty.

However, these still don't work.
Minor tweaks to Tst.js.