Changed bits of Ajax code