Added timeouts to AJAX calls