Implemented localStorage functionalities