clean up and setup js to work with webmake (to work in browser).