Updated localStorage-functionality