Added AJAX to add pages