Various changes that result in the two python files I have in tests/scripts to be working when compiled to js.