Changed to Redis pipeline, added dict of keys, removed unwanted code