Made some changes to handle ajax requests via an iframe