moved Redis interaction to its own Class and added tests