Added comments to test.js; other small changes