Clarified alignment computation algorithm.