Completed localStorage functionality