Changed xhr module to ajax.