refactoring, move cleanup from writer to tweet