Switch from url variables to localStorage