code: def cleanup_payload(self, payload):
          
          p = payload.replace('\n', '')
          p = p.rstrip()
          p = p.lstrip()
          return p
docs: Basically, turns payload that looks like '   \\n  ' to ''. In the 
          calling function, if this function returns '' no object is added 
          for that payload.