Added ajax xml test
Refactor of ajax tests, more tests and bug fix