Added item.type constants and two other minor changes.