Extracted a new class - previousSetsFormatter - and added tests around it