Finally got AJAX responses working