Final commit. Event handling added.