optimized for redis, removed a lot of junk