Fix sending null behavor for empty strings, remove testing hardcode, some refactoring of add_batches