add main.js and tests.