Implementing offline data storage.
Implemented initialization based on current connectivity status.