add debug, make self binding, fix redis mock