rewrite of fasta.c, code style changes