Simplify redis code.