use local-storage to recover from unexpected crashes
merged with github
ui bug fixes