A bit of refactoring, and a redis publisher