Follow-up on review

- Provided additional comments
- Removed unnecessary key creation in local storage
- Moved the JSON functionality to the utility function
- Added extra unit tests