Added comments, cleaned up a bit.
Added redis dependency.