Move page generation to AJAX.