Some changes to Ajax

Not fixed, but getting there.