Added some code for improving memory efficiency in Needleman-Wunsch alignment.