Change ajax calls

Now ajax do not return pictures, but text