Refactored some code.
Added some documents.
Bug fixed async functions.
Updated documents.
Sorting bug fixed
Updated documents.