Genome Refactoring