Offline storage implementation and offline crash fixes