remove comments, refactor onRedisError (no need to put it as a method)