Change source files to JS
Fix some bugs and make sure build process works
Transition tests to JS