remove layouts when dealing with XHR requests