Added line in addAgent() to set newAgent to empty string, which empties the input field