refactors ajax calls
Merge pull request #16 from nifengle/stable-sorting

refactors ajax calls