Rewritten algorithm and added support for BLOSUM62.txt