move event handling back to the Items
move all the length computation stuff to event