Modified align_ungapped (unfinished code) and check_and_update.