Changed several ajax calls to match with the backend.