Renamed the presence handler and defined the message handler