has.js fixes and cleanups