Menu: Fixed menu handling for undefined AJAX response

Also cleaned up minor formatting issues in ajax-fetch.js.