Added error detection and amino acid conversion