More cleanup in bits.js