Some improvements found thanks to the use of a bipartite graph and Blosom algorithm instead of DP.