Use hashes instead of sorted set for storing sparse matrix in redis
Add generic typing
Add centralized redis configuration