Set up the events and props