also do proper decoding-encoding for name edits
remove unnecessary request headers
refactor: hide some of the AJAX complexity inside a shared function
more trimming