Further changes to  make ajax play with jQuery nicely