Issue 81

Rather than maintaining a "modal" flag, couldn't you rely on HTTP header "X-Requested-With: XMLHttpRequest"? JQuery automatically adds this header to identify AJAX requests.