Wiring up the ajax