Add error logging.
Basic version for mi's and pa's.
Tidy; remove redundant code.
Tidy; fix csv read.
Allele changes.