Improved redis handling