changed storage interface
major seperation of hashed functions vs key functions, added duration based expiry