Added support for AJAX