Refactored AJAX function

Refactored AJAX function
Merge pull request #2 from xiaodianwang/yinyins-branch-1

Refactored AJAX function