Moved to Redis. Modularised code