Set up the routes. Also did AJAX