Rewrote how AJAX is fetched to make it suitable for prerendering.