The mutators were supplied inline with the corpus mutation loop. This makes it tedious to extend, and difficult to filter out mutations which are not interesting. The code has been reworked here so that... * Each mutator is its own class. * Each class can provide information about what it does, such as its name and the types of mutations it performs. * Each class is registered into a list of classes that are available. * The Corpus instantiates these classes when it is intialised, and could (but does not at this time) filter the list as necessary. The name isn't even used yet. * Mutators can return None to say that they're not appropriate. This means that adding a new mutator is a matter of creating a new class, in the same style as the existing ones, and giving information on what the mutator does. Mutators could be based on one another - so for example the 'swap' mutator could be reworked to exchange variable lengths of values, rather than only bytes, and then subclassed to produce short, long and longlong variants. This has not been done here. Previously, the code attempted to retry applying mutators if they were not deemed appropriate; this was ineffective because they merely tried to decrement the iteration count, which did not affect the iterations at all - it looks like the code was originally using C-style for loops where the variable controls the termination, whilst in Python the range controls the iteration of this loop. This has been replaced by the mutator returning None to signal that it is inappropriate, and a loop in the caller repeats the selection of a new mutator.