[shift] Bugfixing. Introducing event handlers.