Refactor userActions array and writing to local storage.
Now unload event sends message, which activates writeActionsToStorage function.
On app init() initializeActionsArray is called. It loads everything from localStorage.
Minor style fixes