Added some support for handling movement events and insertion events.