Error prevention and mitigation as forces in the evolution of genes and genomes