tidy up and update redis wrapper