Minor removal of arbitrary codes