console.log removed
localstorage and indexstorage, little optimisation done