IE tweaks.
Refactored HTTPS check and AJAX calls.