Fixed the HTML commands JS.
I found there was threading issues with the global JSON parser. Each thread now gets its own parser to play with.