Added event dispatching.
Removed test dispatching.