Implementing ajax infrastructure