Add more consitency

Added some new features that prevent errors with the "expirations" localstorage item and fixed and error in read mode for cookies