Little bit nicer event handling.