Add something to hold state. Abandoning this tack for now.
Refactor sending into fn.
Send JSON instead of raw text.