Redis refactor