assorted cleanup on web.js