Refactor parse_fasta