Added redis and memcached factory for running tests
Updated formatting