Offline storage implementation and offline crash fixes

See title