add local storage to save and load templates.

1. Add simple local storage to manage templates.
2. just use first template in templates list, need prove later.