Implemented local alignment and modified other parts of alg