Add tests. Fix index.html, test.js