Ported python unit tests to js and fixed some bugs along the way
Replaced non breaking spaces with regular space