Refactors tweet generator to generic generator.