added some documentation to ajax functions
Except for the one in stream, not sure if that's going to change and want
to avoid merge conflicts so will do that later