Changed scanning method to AJAX