Minor improvements, check if localStore exists