Fix AJAX requests and layout