Updating to allow pipelining of the various Redis commands based on stateEntries plus some cleanup.