Hook up events.