Slightly improved test.js