Fix for delete method

Adding handling of optional data payload to delete method.