removed the save on focus out from the input area,

removed that was messing with the autosave function by triggering a save twice
Reformat and reorganize the code to improve readability; reduce the internal loop timeInterval, that need to be lower than the autosave function from pn.js