A bit of cleanup in entity.js.