Refactoring FastaIO and FastqIO