renamed 'handler' to 'payload_handler' to distinguish from the generic handler class (e.g. for text etc.)