cleaning code
added redis support