Minor improvements to AJAX loading