Move assertion tests to test file. Beautify assert.js and test.js. Clean up main.js.