add local storage support

As I suggested, the app remembers its state.
It would be useful to add 'mod+n'.

What's up with all these `__methodName`, looks rather ugly than private.