Added AJAX and a spinner gif