Refactoring to the redis client