Fixed localStorage and some minor stuff