Tidying up the toggling AJAX