Persistence layer for ThingSafe demo app