Change event handling: Added pre- and post event handling.
Moved some code from old to new visitor API.