Adding AJAX and controller methods