Cleaned up the redis connection logic #17