Rewrite storageService using Promises & optimize code