Add repeat, thread iteration, cleanup output