fix asynchronous issue with storage module
formatting storage.js
add matchElement function
code formatting
update index.md
update matchElement function
save/restore chat history locally
Merge pull request #892 from pindexis/develop

fix asynchronous issue with storage module