Initial import from SprayPersistence