Remove and test some ajax

Murders AJAX requests throughout the codebase, and makes some of the remaining cases easier to test.

There's more work to do and some of the workflows may still want rethinking, but this seems like a reasonable chunk to pull request.