Refactor Dna class