[med-svn] [seqan2] 01/01: New upstream version 2.4.0+dfsg

Michael Crusoe misterc-guest at moszumanska.debian.org
Mon Feb 5 15:54:58 UTC 2018


This is an automated email from the git hooks/post-receive script.

misterc-guest pushed a commit to annotated tag upstream/2.4.0+dfsg
in repository seqan2.

commit 1fe74e5e8a3af3b9b3a7e68cd2a686c7f5e4afef
Author: Michael R. Crusoe <michael.crusoe at gmail.com>
Date:   Mon Feb 5 07:06:01 2018 -0800

    New upstream version 2.4.0+dfsg
---
 CHANGELOG.rst                                      |   57 +-
 CMakeLists.txt                                     |   11 +-
 LICENSE                                            |    3 +-
 README.rst                                         |   15 +-
 apps/alf/CMakeLists.txt                            |    4 +-
 apps/alf/LICENSE                                   |    2 +-
 apps/alf/README                                    |    8 +-
 apps/alf/alf.cpp                                   |    4 +-
 apps/bs_tools/CMakeLists.txt                       |    4 +-
 apps/bs_tools/LICENSE                              |    2 +-
 apps/bs_tools/bisar.cpp                            |    2 +-
 apps/bs_tools/bisar.h                              |    2 +-
 apps/bs_tools/casbar.cpp                           |   12 +-
 apps/bs_tools/casbar.h                             |    4 +-
 apps/bs_tools/casbar_consensus_realign.h           |    2 +-
 apps/bs_tools/casbar_score.h                       |   42 +-
 apps/bs_tools/four2three.cpp                       |    2 +-
 apps/dfi/CMakeLists.txt                            |    4 +-
 apps/dfi/README                                    |   14 +-
 apps/fiona/CMakeLists.txt                          |    4 +-
 apps/fiona/compute_gain.cpp                        |   11 +-
 apps/fiona/fiona.cpp                               |   36 +-
 apps/fiona/index_qgram_parallel.h                  |    2 +-
 apps/fx_tools/CMakeLists.txt                       |    4 +-
 apps/fx_tools/LICENSE                              |    4 +-
 apps/fx_tools/fx_bam_coverage.cpp                  |    2 +-
 apps/fx_tools/fx_fastq_stats.cpp                   |    2 +-
 apps/gustaf/CMakeLists.txt                         |    4 +-
 apps/gustaf/LICENSE                                |    2 +-
 apps/gustaf/README                                 |    6 +-
 apps/gustaf/create_stellarmatches_from_file.h      |    8 +-
 apps/gustaf/gustaf.cpp                             |    2 +-
 apps/gustaf/gustaf_matepairs.h                     |    2 +-
 apps/gustaf/join_mates.cpp                         |    2 +-
 apps/gustaf/msplazer.h                             |   44 +-
 apps/gustaf/msplazer_algorithms.h                  |   12 +-
 apps/gustaf/msplazer_main.h                        |    2 +-
 apps/gustaf/msplazer_out.h                         |   41 +-
 apps/gustaf/msplazer_parse_options.h               |    2 +-
 apps/gustaf/stellar_routines.h                     |    2 +-
 apps/insegt/CMakeLists.txt                         |    4 +-
 apps/insegt/LICENSE                                |    2 +-
 apps/insegt/README                                 |   14 +-
 apps/insegt/base.h                                 |    6 +-
 apps/insegt/create_gff.h                           |    4 +-
 apps/insegt/fusion.h                               |   46 +-
 apps/insegt/overlap_module.h                       |   32 +-
 apps/mason2/CMakeLists.txt                         |    4 +-
 apps/mason2/LICENSE                                |    2 +-
 apps/mason2/external_split_merge.cpp               |    8 +-
 apps/mason2/external_split_merge.h                 |   10 +-
 apps/mason2/fragment_generation.h                  |    4 +-
 apps/mason2/genomic_variants.cpp                   |   20 +-
 apps/mason2/genomic_variants.h                     |    2 +-
 apps/mason2/individual_genome.h                    |    2 +-
 apps/mason2/mason_frag_sequencing.cpp              |    2 +-
 apps/mason2/mason_genome.cpp                       |    4 +-
 apps/mason2/mason_materializer.cpp                 |    4 +-
 apps/mason2/mason_methylation.cpp                  |    2 +-
 apps/mason2/mason_options.cpp                      |   40 +-
 apps/mason2/mason_options.h                        |    6 +-
 apps/mason2/mason_simulator.cpp                    |    6 +-
 apps/mason2/mason_splicing.cpp                     |   20 +-
 apps/mason2/mason_tests.cpp                        |    2 +-
 apps/mason2/mason_types.h                          |    2 +-
 apps/mason2/mason_variator.cpp                     |   40 +-
 apps/mason2/methylation_levels.cpp                 |    2 +-
 apps/mason2/methylation_levels.h                   |    2 +-
 apps/mason2/omp_wrapper.h                          |    2 +-
 apps/mason2/sequencing.h                           |    2 +-
 apps/mason2/simulate_454.cpp                       |    2 +-
 apps/mason2/simulate_base.cpp                      |    2 +-
 apps/mason2/simulate_genome.cpp                    |    2 +-
 apps/mason2/simulate_genome.h                      |    2 +-
 apps/mason2/simulate_illumina.cpp                  |    2 +-
 apps/mason2/simulate_sanger.cpp                    |    2 +-
 apps/mason2/variation_size_tsv.h                   |    2 +-
 apps/mason2/vcf_materialization.cpp                |    9 +-
 apps/mason2/vcf_materialization.h                  |    2 +-
 apps/micro_razers/CMakeLists.txt                   |    4 +-
 apps/micro_razers/README                           |   14 +-
 apps/micro_razers/micro_razers.cpp                 |    1 +
 apps/ngs_roi/CMakeLists.txt                        |   11 +-
 apps/ngs_roi/LICENSE                               |    2 +-
 apps/ngs_roi/bam2roi.cpp                           |    2 +-
 apps/ngs_roi/bam2roi.h                             |    2 +-
 apps/ngs_roi/png_canvas.h                          |    2 +-
 apps/ngs_roi/project_interval.cpp                  |    2 +-
 apps/ngs_roi/project_interval.h                    |    2 +-
 apps/ngs_roi/project_spliced.cpp                   |    8 +-
 apps/ngs_roi/project_spliced.h                     |    2 +-
 apps/ngs_roi/record_ext.h                          |    2 +-
 apps/ngs_roi/roi_builder.cpp                       |    2 +-
 apps/ngs_roi/roi_builder.h                         |    2 +-
 apps/ngs_roi/roi_feature_projection.cpp            |    4 +-
 apps/ngs_roi/roi_plot_thumbnails.cpp               |    2 +-
 apps/pair_align/CMakeLists.txt                     |    9 +-
 apps/pair_align/lib/pair_align_global.cpp          |    2 +-
 apps/pair_align/lib/pair_align_lcs.cpp             |    2 +-
 apps/pair_align/lib/pair_align_lib.cpp             |    4 +-
 apps/pair_align/lib/pair_align_lib.h               |    2 +-
 apps/pair_align/lib/pair_align_local.cpp           |    2 +-
 apps/param_chooser/CMakeLists.txt                  |    4 +-
 apps/param_chooser/test_param_chooser.cpp          |    2 +-
 apps/rabema/CMakeLists.txt                         |    6 +-
 apps/rabema/rabema_build_gold_standard.cpp         |   14 +-
 apps/rabema/rabema_evaluate.cpp                    |   28 +-
 apps/rabema/ref_id_mapping.h                       |    6 +-
 apps/rabema/sorting.h                              |    2 +-
 apps/razers/CMakeLists.txt                         |    9 +-
 apps/razers/README                                 |   14 +-
 apps/razers/outputFormat.h                         |    8 +-
 apps/razers/razers.h                               |   10 +-
 apps/razers/razers_matepairs.h                     |   10 +-
 apps/razers/razers_spliced.h                       |   12 +-
 apps/razers/readSimulator.h                        |    2 +-
 apps/razers/tests/run_tests.py                     |    7 +
 apps/razers3/CMakeLists.txt                        |    4 +-
 apps/razers3/README                                |   16 +-
 apps/razers3/profile_timeline.h                    |    2 +-
 apps/razers3/razers.h                              |   30 +-
 apps/razers3/razers_match_filter.h                 |    4 +-
 apps/razers3/razers_matepairs.h                    |   10 +-
 apps/razers3/razers_matepairs_parallel.h           |   10 +-
 apps/razers3/razers_paired_match_filter.h          |    4 +-
 apps/razers3/razers_parallel.h                     |   14 +-
 apps/razers3/readSimulator.h                       |    2 +-
 apps/rep_sep/CMakeLists.txt                        |    4 +-
 apps/sak/CMakeLists.txt                            |    6 +-
 apps/sak/sak.cpp                                   |   14 +-
 apps/sam2matrix/CMakeLists.txt                     |    4 +-
 apps/sam2matrix/LICENSE                            |    2 +-
 apps/sam2matrix/sam2matrix.cpp                     |    2 +-
 apps/samcat/CMakeLists.txt                         |    9 +-
 apps/samcat/samcat.cpp                             |    2 +-
 apps/searchjoin/CMakeLists.txt                     |   18 +-
 apps/searchjoin/LICENSE                            |    2 +-
 apps/searchjoin/db.h                               |   20 +-
 apps/searchjoin/finder.h                           |    2 +-
 apps/searchjoin/join.cpp                           |    2 +-
 apps/searchjoin/search.cpp                         |    2 +-
 apps/searchjoin/tests/run_tests.py                 |    6 +
 apps/searchjoin/verifier.h                         |    2 +-
 apps/searchjoin/writer.h                           |    2 +-
 apps/seqan_tcoffee/CMakeLists.txt                  |    4 +-
 apps/seqan_tcoffee/README                          |   22 +-
 apps/seqan_tcoffee/seqan_tcoffee.cpp               |   37 +-
 apps/seqan_tcoffee/tests/run_tests.py              |    6 +
 apps/seqcons2/CMakeLists.txt                       |    4 +-
 apps/seqcons2/LICENSE                              |    2 +-
 apps/seqcons2/seqcons.cpp                          |    2 +-
 apps/seqcons2/seqcons_app.cpp                      |    2 +-
 apps/seqcons2/seqcons_app.h                        |    2 +-
 apps/seqcons2/seqcons_options.cpp                  |    2 +-
 apps/seqcons2/seqcons_options.h                    |    2 +-
 apps/sgip/CMakeLists.txt                           |    4 +-
 apps/sgip/sgip.cpp                                 |    2 +-
 apps/sgip/sgip_base.h                              |    4 +-
 apps/snp_store/CMakeLists.txt                      |    4 +-
 apps/snp_store/README                              |   12 +-
 apps/snp_store/snp_store.cpp                       |   10 +-
 apps/snp_store/snp_store.h                         |    6 +-
 apps/splazers/CMakeLists.txt                       |    4 +-
 apps/splazers/README                               |   15 +-
 apps/splazers/outputFormat.h                       |    8 +-
 apps/splazers/razers.h                             |   10 +-
 apps/splazers/razers_matepairs.h                   |    8 +-
 apps/splazers/razers_spliced.h                     |   24 +-
 apps/splazers/readSimulator.h                      |    2 +-
 apps/splazers/splazers.cpp                         |    1 +
 apps/stellar/CMakeLists.txt                        |    4 +-
 apps/stellar/README                                |    8 +-
 apps/stellar/stellar.cpp                           |    6 +-
 apps/stellar/stellar.h                             |    8 +-
 apps/stellar/stellar_extension.h                   |    6 +-
 apps/stellar/stellar_types.h                       |    4 +-
 apps/tree_recon/CMakeLists.txt                     |    4 +-
 apps/yara/CMakeLists.txt                           |    4 +-
 apps/yara/LICENSE                                  |    4 +-
 apps/yara/README.rst                               |    2 +-
 apps/yara/basic_alphabet.h                         |    2 +-
 apps/yara/bits_bucket.h                            |    2 +-
 apps/yara/bits_context.h                           |    4 +-
 apps/yara/bits_hits.h                              |    2 +-
 apps/yara/bits_matches.h                           |    6 +-
 apps/yara/bits_reads.h                             |    2 +-
 apps/yara/bits_seeds.h                             |    2 +-
 apps/yara/file_pair.h                              |    2 +-
 apps/yara/file_prefetched.h                        |    2 +-
 apps/yara/find_extender.h                          |    2 +-
 apps/yara/find_verifier.h                          |   20 +-
 apps/yara/index_fm.h                               |    2 +-
 apps/yara/indexer.cpp                              |   10 +-
 apps/yara/mapper.cpp                               |   10 +-
 apps/yara/mapper.h                                 |    2 +-
 apps/yara/mapper_aligner.h                         |    2 +-
 apps/yara/mapper_classifier.h                      |    2 +-
 apps/yara/mapper_collector.h                       |    2 +-
 apps/yara/mapper_extender.h                        |    2 +-
 apps/yara/mapper_filter.h                          |    2 +-
 apps/yara/mapper_ranker.h                          |    2 +-
 apps/yara/mapper_verifier.h                        |    2 +-
 apps/yara/mapper_writer.h                          |    2 +-
 apps/yara/misc_options.h                           |    2 +-
 apps/yara/misc_tags.h                              |    2 +-
 apps/yara/misc_timer.h                             |    2 +-
 apps/yara/misc_types.h                             |    2 +-
 apps/yara/store_seqs.h                             |    2 +-
 apps/yara/tests/run_tests.py                       |    6 +
 demos/LICENSE                                      |    2 +-
 demos/blast/blast_in_lowlevel.cpp                  |    4 +-
 demos/dox/bam_io/bam_file_in.cpp                   |    2 +-
 demos/dox/basic/enable_if.cpp                      |    2 +-
 demos/dox/basic/metaprogramming_control.cpp        |    2 +-
 demos/dox/basic/metaprogramming_logic.cpp          |    2 +-
 demos/dox/basic/metaprogramming_math.cpp           |    2 +-
 demos/dox/basic/metaprogramming_switch.cpp         |    2 +-
 demos/dox/index/find_repeats.cpp                   |    2 +-
 demos/dox/sequence/segment.cpp                     |    2 +-
 demos/dox/sequence/string.cpp                      |    2 +-
 demos/dox/statistics/build_markov_model.cpp        |    3 +-
 demos/dox/statistics/load_markov_model.cpp         |    3 +-
 demos/dox/store/store_example.cpp                  |    4 +-
 demos/howto/custom_file_ending.fa.dat              |    4 +
 demos/howto/custom_file_endings.cpp                |   76 +
 demos/howto/custom_file_endings.cpp.stdout         |    2 +
 demos/howto/using_zip_iterator.cpp                 |    2 +-
 demos/tutorial/a_first_example/final_result.cpp    |   22 +-
 .../a_first_example/final_result.cpp.stdout        |   13 +-
 demos/tutorial/a_first_example/solution_1.cpp      |    4 -
 demos/tutorial/a_first_example/solution_2.cpp      |    6 +-
 .../tutorial/a_first_example/solution_2.cpp.stdout |    2 +-
 demos/tutorial/a_first_example/solution_3.cpp      |    6 +-
 .../tutorial/a_first_example/solution_3.cpp.stdout |    2 +-
 demos/tutorial/a_first_example/solution_4.cpp      |    4 +-
 .../tutorial/a_first_example/solution_4.cpp.stdout |    3 +-
 .../solution_4_templateSubclassing.cpp             |    2 -
 demos/tutorial/a_first_example/solution_5.cpp      |   10 +-
 .../tutorial/a_first_example/solution_5.cpp.stdout |    4 +-
 demos/tutorial/a_first_example/solution_6.cpp      |   20 +-
 .../tutorial/a_first_example/solution_6.cpp.stdout |   12 +-
 demos/tutorial/blast_io/write_assignment.cpp       |    3 +-
 .../tutorial/file_io_overview/solution3.cpp.stdout |   12 +-
 .../generic_programming/template_subclassing.cpp   |    2 +-
 demos/tutorial/genome_annotations/base.cpp         |    2 +-
 demos/tutorial/indices/find2_index_approx.cpp      |   57 +
 demos/tutorial/indices/find2_index_approx.stdout   |   23 +
 demos/tutorial/iterators/assignment_1_solution.cpp |    4 +-
 .../journaled_string_tree_base.cpp                 |    2 +-
 demos/tutorial/sam_and_bam_io/base.cpp             |    6 +-
 demos/tutorial/sam_and_bam_io/example7.cpp.stdout  |    6 +-
 demos/tutorial/sequences/base.cpp                  |    2 +-
 .../simple_rna_seq/genequant_assignment4.cpp       |    2 +-
 demos/tutorial/string_sets/example_iterators.cpp   |    2 +-
 demos/unassigned_or_unused/bam_library_size.cpp    |    2 +-
 .../unassigned_or_unused/bam_print_alignments.cpp  |    2 +-
 demos/unassigned_or_unused/bamutil.cpp             |    2 +-
 demos/unassigned_or_unused/benchmark_stream.cpp    |    2 +-
 .../benchmark_stream_write.cpp                     |    2 +-
 demos/unassigned_or_unused/filter_sam.cpp          |    2 +-
 demos/unassigned_or_unused/parse_lm_stellar.cpp    |    2 +-
 demos/unassigned_or_unused/sam2svg.cpp             |    8 +-
 demos/unassigned_or_unused/sample_seqs.cpp         |    2 +-
 .../unassigned_or_unused/soft_to_hard_masking.cpp  |    2 +-
 .../tutorial_file_io/solution2.cpp                 |   61 -
 .../tutorial_file_io/solution3.cpp                 |   72 -
 .../stream_compression_formats.cpp                 |   12 +-
 dox/CMakeLists.txt                                 |   56 +-
 include/seqan/LICENSE                              |    2 +-
 include/seqan/align.h                              |    5 +-
 include/seqan/align/align_base.h                   |   15 +-
 include/seqan/align/align_cols.h                   |    2 +-
 include/seqan/align/align_config.h                 |    2 +-
 include/seqan/align/align_interface_wrapper.h      |   57 +-
 include/seqan/align/align_iterator_base.h          |    2 +-
 include/seqan/align/align_metafunctions.h          |    2 +-
 include/seqan/align/align_traceback.h              |    2 +-
 .../seqan/align/aligned_sequence_concept.h         |   21 +-
 include/seqan/align/alignment_algorithm_tags.h     |    2 +-
 include/seqan/align/alignment_operations.h         |    2 +-
 include/seqan/align/dp_algorithm_impl.h            |  728 ++++-----
 include/seqan/align/dp_align_simd_helper.h         |  265 ++-
 include/seqan/align/dp_band.h                      |    2 +-
 include/seqan/align/dp_cell.h                      |  116 +-
 include/seqan/align/dp_cell_affine.h               |   37 +-
 include/seqan/align/dp_cell_dynamic.h              |   14 +-
 include/seqan/align/dp_cell_linear.h               |    2 +-
 include/seqan/align/dp_context.h                   |   89 +-
 include/seqan/align/dp_formula.h                   |  253 +--
 include/seqan/align/dp_formula_affine.h            |  765 +++------
 include/seqan/align/dp_formula_dynamic.h           |  379 +++--
 include/seqan/align/dp_formula_linear.h            |  350 ++--
 include/seqan/align/dp_matrix.h                    |  324 ++--
 include/seqan/align/dp_matrix_navigator.h          |   40 +-
 .../seqan/align/dp_matrix_navigator_score_matrix.h |  395 ++---
 .../dp_matrix_navigator_score_matrix_sparse.h      |  353 ++--
 .../seqan/align/dp_matrix_navigator_trace_matrix.h |  381 +++--
 include/seqan/align/dp_matrix_sparse.h             |   40 +-
 include/seqan/align/dp_meta_info.h                 |    4 +-
 include/seqan/align/dp_profile.h                   |  299 ++--
 include/seqan/align/dp_scout.h                     |   26 +-
 include/seqan/align/dp_scout_simd.h                |  574 +++++--
 include/seqan/align/dp_setup.h                     |   88 +-
 include/seqan/align/dp_trace_segment.h             |   10 +-
 include/seqan/align/dp_traceback_adaptor.h         |    2 +-
 include/seqan/align/dp_traceback_impl.h            |  167 +-
 include/seqan/align/evaluate_alignment.h           |    4 +-
 include/seqan/align/fragment.h                     |    2 +-
 include/seqan/align/gap_anchor.h                   |    2 +-
 include/seqan/align/gapped_value_type.h            |    2 +-
 include/seqan/align/gaps_anchor.h                  |   12 +-
 include/seqan/align/gaps_array.h                   |    2 +-
 include/seqan/align/gaps_base.h                    |   10 +-
 include/seqan/align/gaps_iterator_anchor.h         |    6 +-
 include/seqan/align/gaps_iterator_array.h          |    2 +-
 include/seqan/align/gaps_iterator_base.h           |    2 +-
 include/seqan/align/global_alignment_banded.h      |  120 +-
 .../seqan/align/global_alignment_hirschberg_impl.h |    2 +-
 .../align/global_alignment_myers_hirschberg_impl.h |    8 +-
 include/seqan/align/global_alignment_myers_impl.h  |    4 +-
 include/seqan/align/global_alignment_specialized.h |    2 +-
 include/seqan/align/global_alignment_unbanded.h    |  136 +-
 include/seqan/align/local_alignment_banded.h       |   75 +-
 .../local_alignment_banded_waterman_eggert_impl.h  |    6 +-
 include/seqan/align/local_alignment_enumeration.h  |    2 +-
 .../align/local_alignment_enumeration_banded.h     |    2 +-
 .../align/local_alignment_enumeration_unbanded.h   |    2 +-
 include/seqan/align/local_alignment_unbanded.h     |  111 +-
 .../align/local_alignment_waterman_eggert_impl.h   |   49 +-
 include/seqan/align/matrix_base.h                  |  335 ++--
 include/seqan/align_extend.h                       |    2 +-
 include/seqan/align_extend/align_extend.h          |   16 +-
 include/seqan/align_extend/align_extend_base.h     |   18 +-
 include/seqan/align_extend/dp_scout_xdrop.h        |   29 +-
 include/seqan/{bam_io.h => align_parallel.h}       |  106 +-
 .../async_wave_execution_interface.h               |  252 +++
 include/seqan/align_parallel/dp_kernel_adaptor.h   |  343 ++++
 .../dp_parallel_execution_policies.h               |  174 ++
 include/seqan/align_parallel/dp_parallel_scout.h   |  263 +++
 .../seqan/align_parallel/dp_parallel_scout_simd.h  |  362 +++++
 .../dp_settings.h}                                 |   92 +-
 .../dp_traits.h}                                   |  105 +-
 .../align_parallel/parallel_align_interface.h      |  366 +++++
 .../wavefront_alignment_executor.h}                |   63 +-
 .../align_parallel/wavefront_alignment_result.h    |  165 ++
 .../align_parallel/wavefront_alignment_scheduler.h |  347 ++++
 .../align_parallel/wavefront_alignment_task.h      |  404 +++++
 .../wavefront_alignment_thread_local_storage.h}    |  112 +-
 include/seqan/align_parallel/wavefront_task.h      |  365 +++++
 .../wavefront_task_event.h}                        |   69 +-
 .../seqan/align_parallel/wavefront_task_executor.h |  146 ++
 .../wavefront_task_queue.h}                        |  126 +-
 .../align_parallel/wavefront_task_scheduler.h      |  218 +++
 include/seqan/align_parallel/wavefront_task_util.h |  557 +++++++
 include/seqan/align_profile.h                      |    2 +-
 include/seqan/align_profile/add_to_profile.h       |    8 +-
 include/seqan/align_profile/score_profile_seq.h    |    2 +-
 include/seqan/align_split.h                        |    2 +-
 include/seqan/align_split/align_split_interface.h  |   63 +-
 include/seqan/align_split/dp_scout_split.h         |    2 +-
 include/seqan/alignment_free.h                     |    2 +-
 include/seqan/alignment_free/af_d2.h               |    2 +-
 include/seqan/alignment_free/af_d2star.h           |    2 +-
 include/seqan/alignment_free/af_d2z.h              |    2 +-
 include/seqan/alignment_free/af_n2.h               |    2 +-
 include/seqan/alignment_free/alignment_free_base.h |    2 +-
 .../alignment_free/alignment_free_comparison.h     |    2 +-
 include/seqan/alignment_free/kmer_functions.h      |    2 +-
 include/seqan/arg_parse.h                          |    2 +-
 include/seqan/arg_parse/arg_parse_argument.h       |   38 +-
 include/seqan/arg_parse/arg_parse_ctd_support.h    |    2 +-
 include/seqan/arg_parse/arg_parse_doc.h            |    4 +-
 include/seqan/arg_parse/arg_parse_exceptions.h     |    2 +-
 include/seqan/arg_parse/arg_parse_option.h         |    2 +-
 include/seqan/arg_parse/arg_parse_parse.h          |    2 +-
 include/seqan/arg_parse/arg_parse_type_support.h   |    2 +-
 include/seqan/arg_parse/arg_parse_version_check.h  |   18 +-
 include/seqan/arg_parse/argument_parser.h          |    2 +-
 include/seqan/arg_parse/tool_doc.h                 |    9 +-
 include/seqan/arg_parse/xml_support.h              |    2 +-
 include/seqan/bam_io.h                             |    3 +-
 include/seqan/bam_io/bam_alignment_record.h        |   61 +-
 include/seqan/bam_io/bam_alignment_record_util.h   |    4 +-
 include/seqan/bam_io/bam_file.h                    |    4 +-
 include/seqan/bam_io/bam_header_record.h           |    6 +-
 include/seqan/bam_io/bam_index_bai.h               |  133 +-
 include/seqan/bam_io/bam_io_context.h              |    2 +-
 include/seqan/bam_io/bam_sam_conversion.h          |   15 +-
 include/seqan/bam_io/bam_scanner_cache.h           |    2 +-
 include/seqan/bam_io/bam_tags_dict.h               |    5 +-
 include/seqan/bam_io/cigar.h                       |    2 +-
 include/seqan/bam_io/read_bam.h                    |   11 +-
 include/seqan/bam_io/read_sam.h                    |    4 +-
 include/seqan/bam_io/write_bam.h                   |    2 +-
 include/seqan/bam_io/write_sam.h                   |    2 +-
 include/seqan/basic.h                              |    5 +-
 include/seqan/basic/aggregate_concept.h            |    2 +-
 include/seqan/basic/allocator_chunkpool.h          |    2 +-
 include/seqan/basic/allocator_interface.h          |   42 +-
 include/seqan/basic/allocator_multipool.h          |    2 +-
 include/seqan/basic/allocator_simple.h             |    2 +-
 include/seqan/basic/allocator_singlepool.h         |    2 +-
 include/seqan/basic/allocator_to_std.h             |    2 +-
 include/seqan/basic/alphabet_adapt_builtins.h      |   15 +-
 include/seqan/basic/alphabet_bio.h                 |    2 +-
 include/seqan/basic/alphabet_concept.h             |   26 +-
 include/seqan/basic/alphabet_math.h                |   30 +-
 include/seqan/basic/alphabet_profile.h             |    2 +-
 include/seqan/basic/alphabet_qualities.h           |    2 +-
 include/seqan/basic/alphabet_residue.h             |   13 +-
 include/seqan/basic/alphabet_residue_tabs.h        |    2 +-
 include/seqan/basic/alphabet_simple_type.h         |   92 +-
 include/seqan/basic/alphabet_storage.h             |    2 +-
 include/seqan/basic/array_construct_destruct.h     |    6 +-
 include/seqan/basic/basic_aggregate.h              |    2 +-
 include/seqan/basic/basic_allocator.h              |    2 +-
 include/seqan/basic/basic_alphabet.h               |    2 +-
 include/seqan/basic/basic_concept.h                |    2 +-
 include/seqan/basic/basic_container.h              |    2 +-
 include/seqan/basic/basic_debug.h                  |    2 +-
 include/seqan/basic/basic_exception.h              |    4 +-
 include/seqan/basic/basic_functors.h               |    2 +-
 include/seqan/basic/basic_fundamental.h            |    2 +-
 include/seqan/basic/basic_iterator.h               |    2 +-
 include/seqan/basic/basic_math.h                   |    2 +-
 include/seqan/basic/basic_metaprogramming.h        |    2 +-
 include/seqan/basic/basic_parallelism.h            |    2 +-
 include/seqan/basic/basic_proxy.h                  |    2 +-
 include/seqan/basic/basic_simd_vector.h            | 1671 -------------------
 include/seqan/basic/basic_smart_pointer.h          |    2 +-
 include/seqan/basic/basic_stream.h                 |   31 +-
 include/seqan/basic/basic_tangle.h                 |    2 +-
 include/seqan/basic/basic_type.h                   |    2 +-
 include/seqan/basic/boost_preprocessor_subset.h    |    6 +-
 include/seqan/basic/builtin_functions.h            |    2 +-
 include/seqan/basic/concept_checking.h             |    2 +-
 include/seqan/basic/container_concept.h            |    2 +-
 include/seqan/basic/debug_helper.h                 |    2 +-
 include/seqan/basic/debug_test_system.h            |   17 +-
 include/seqan/basic/fundamental_chunking.h         |    2 +-
 include/seqan/basic/fundamental_comparison.h       |    2 +-
 include/seqan/basic/fundamental_concepts.h         |   34 +-
 include/seqan/basic/fundamental_conversion.h       |    2 +-
 include/seqan/basic/fundamental_metafunctions.h    |   22 +-
 include/seqan/basic/fundamental_tags.h             |    4 +-
 include/seqan/basic/fundamental_transport.h        |    6 +-
 include/seqan/basic/holder_base.h                  |    2 +-
 include/seqan/basic/holder_simple.h                |    2 +-
 include/seqan/basic/holder_tristate.h              |    8 +-
 include/seqan/basic/hosted_type_interface.h        |    2 +-
 include/seqan/basic/iterator_adapt_pointer.h       |    2 +-
 include/seqan/basic/iterator_adapt_std.h           |    2 +-
 include/seqan/basic/iterator_adaptor.h             |   14 +-
 include/seqan/basic/iterator_base.h                |    2 +-
 include/seqan/basic/iterator_concept.h             |    2 +-
 include/seqan/basic/iterator_counting.h            |    2 +-
 include/seqan/basic/iterator_interface.h           |   16 +-
 include/seqan/basic/iterator_position.h            |    2 +-
 include/seqan/basic/iterator_range.h               |   30 +-
 include/seqan/basic/iterator_zip.h                 |    2 +-
 include/seqan/basic/macro_deprecated.h             |    2 +-
 include/seqan/basic/math_functions.h               |    2 +-
 include/seqan/basic/math_log_space_value.h         |    4 +-
 include/seqan/basic/metaprogramming_control.h      |    2 +-
 include/seqan/basic/metaprogramming_enable_if.h    |    2 +-
 include/seqan/basic/metaprogramming_logic.h        |    2 +-
 include/seqan/basic/metaprogramming_math.h         |    2 +-
 include/seqan/basic/metaprogramming_type.h         |    2 +-
 include/seqan/basic/metaprogramming_type_algebra.h |    2 +-
 include/seqan/basic/pair_base.h                    |    2 +-
 include/seqan/basic/pair_bit_compressed.h          |   19 +-
 include/seqan/basic/pair_packed.h                  |   37 +-
 include/seqan/basic/profiling.h                    |   44 +-
 include/seqan/basic/property_map_concept.h         |    2 +-
 include/seqan/basic/proxy_base.h                   |    6 +-
 include/seqan/basic/proxy_iterator.h               |    2 +-
 include/seqan/basic/test_system.h                  |    2 +-
 include/seqan/basic/triple_base.h                  |    2 +-
 include/seqan/basic/triple_packed.h                |    2 +-
 include/seqan/basic/tuple_base.h                   |    2 +-
 include/seqan/basic/tuple_bit_compressed.h         |    2 +-
 include/seqan/basic/volatile_ptr.h                 |    2 +-
 include/seqan/bed_io.h                             |    2 +-
 include/seqan/bed_io/bed_file.h                    |    2 +-
 include/seqan/bed_io/bed_record.h                  |    6 +-
 include/seqan/bed_io/read_bed.h                    |    2 +-
 include/seqan/bed_io/write_bed.h                   |    2 +-
 include/seqan/blast.h                              |    2 +-
 include/seqan/blast/blast_base.h                   |    2 +-
 include/seqan/blast/blast_io_context.h             |    2 +-
 include/seqan/blast/blast_record.h                 |    2 +-
 include/seqan/blast/blast_report_out.h             |    2 +-
 include/seqan/blast/blast_statistics.h             |   25 +-
 include/seqan/blast/blast_tabular.h                |    2 +-
 include/seqan/blast/blast_tabular_in.h             |    2 +-
 include/seqan/blast/blast_tabular_lowlevel.h       |    4 +-
 include/seqan/blast/blast_tabular_out.h            |    2 +-
 include/seqan/consensus.h                          |    2 +-
 include/seqan/consensus/consensus_aligner.h        |    2 +-
 .../seqan/consensus/consensus_aligner_interface.h  |    2 +-
 .../seqan/consensus/consensus_alignment_options.h  |    2 +-
 include/seqan/consensus/consensus_base.h           |    4 +-
 include/seqan/consensus/consensus_builder.h        |    2 +-
 include/seqan/consensus/consensus_library.h        |    4 +-
 include/seqan/consensus/consensus_realign.h        |    4 +-
 include/seqan/consensus/consensus_score.h          |    2 +-
 include/seqan/consensus/overlap_info_computation.h |    6 +-
 include/seqan/consensus/overlapper.h               |    4 +-
 include/seqan/file.h                               |    2 +-
 include/seqan/file/file_base.h                     |    3 +-
 include/seqan/file/file_cstyle.h                   |    2 +-
 include/seqan/file/file_forwards.h                 |    2 +-
 include/seqan/file/file_interface.h                |    2 +-
 include/seqan/file/file_mapping.h                  |    2 +-
 include/seqan/file/file_page.h                     |    6 +-
 include/seqan/file/string_external.h               |    2 +-
 include/seqan/file/string_mmap.h                   |    2 +-
 include/seqan/find.h                               |    2 +-
 include/seqan/find/find_abndm.h                    |    2 +-
 include/seqan/find/find_ahocorasick.h              |    2 +-
 include/seqan/find/find_base.h                     |    2 +-
 include/seqan/find/find_begin.h                    |    2 +-
 include/seqan/find/find_bndm.h                     |    2 +-
 include/seqan/find/find_bom.h                      |    3 +-
 include/seqan/find/find_hamming_simple.h           |    2 +-
 include/seqan/find/find_horspool.h                 |    2 +-
 include/seqan/find/find_lambda.h                   |    2 +-
 include/seqan/find/find_multi.h                    |    2 +-
 include/seqan/find/find_multiple_bfam.h            |    3 +-
 include/seqan/find/find_multiple_shiftand.h        |    2 +-
 include/seqan/find/find_myers_ukkonen.h            |   28 +-
 include/seqan/find/find_pattern_base.h             |    2 +-
 include/seqan/find/find_pex.h                      |    2 +-
 include/seqan/find/find_score.h                    |   17 +-
 include/seqan/find/find_set_horspool.h             |    2 +-
 include/seqan/find/find_shiftand.h                 |    6 +-
 include/seqan/find/find_shiftor.h                  |    4 +-
 include/seqan/find/find_simple.h                   |    2 +-
 include/seqan/find/find_wild_shiftand.h            |    2 +-
 include/seqan/find/find_wumanber.h                 |    6 +-
 include/seqan/gff_io.h                             |    2 +-
 include/seqan/gff_io/gff_file.h                    |    2 +-
 include/seqan/gff_io/gff_io_base.h                 |   17 +-
 include/seqan/graph_algorithms.h                   |    2 +-
 .../graph_algorithms/all_pairs_shortest_path.h     |    2 +-
 include/seqan/graph_algorithms/bellman_ford.h      |    2 +-
 .../seqan/graph_algorithms/bipartite_matching.h    |    2 +-
 .../seqan/graph_algorithms/breadth_first_search.h  |    2 +-
 .../seqan/graph_algorithms/connected_components.h  |    2 +-
 .../seqan/graph_algorithms/depth_first_search.h    |    2 +-
 include/seqan/graph_algorithms/dijkstra.h          |    2 +-
 include/seqan/graph_algorithms/floyd_warshall.h    |    2 +-
 include/seqan/graph_algorithms/ford_fulkerson.h    |    2 +-
 .../graph_algorithms/graph_algorithm_heap_tree.h   |    2 +-
 .../seqan/graph_algorithms/graph_algorithm_hmm.h   |    2 +-
 .../graph_algorithms/graph_algorithm_lis_his.h     |    2 +-
 include/seqan/graph_algorithms/kruskal.h           |    2 +-
 .../graph_algorithms/maximum_weighted_matching.h   |  246 +++
 include/seqan/graph_algorithms/path_growing.h      |    2 +-
 include/seqan/graph_algorithms/prim.h              |    2 +-
 .../graph_algorithms/single_source_shortest_path.h |    2 +-
 .../strongly_connected_compnents.h                 |    2 +-
 include/seqan/graph_algorithms/topological_sort.h  |    2 +-
 .../seqan/graph_algorithms/transitive_closure.h    |    2 +-
 .../graph_algorithms/weakly_connected_components.h |    2 +-
 .../graph_algorithms/weighted_bipartite_matching.h |    2 +-
 include/seqan/graph_align.h                        |    2 +-
 .../graph_align/graph_algorithm_refine_align.h     |    2 +-
 .../graph_algorithm_refine_aligngraph.h            |    2 +-
 .../graph_algorithm_refine_annotation.h            |    2 +-
 .../graph_align/graph_algorithm_refine_exact.h     |    2 +-
 .../graph_algorithm_refine_exact_iterative.h       |    2 +-
 .../graph_align/graph_algorithm_refine_fragment.h  |    2 +-
 .../graph_align/graph_algorithm_refine_inexact.h   |    2 +-
 .../graph_align/graph_algorithm_refine_scoring.h   |    2 +-
 include/seqan/graph_align/graph_impl_align.h       |   10 +-
 include/seqan/graph_align/graph_impl_align_adapt.h |    2 +-
 include/seqan/graph_msa.h                          |    2 +-
 include/seqan/graph_msa/graph_align_tcoffee_base.h |    2 +-
 .../seqan/graph_msa/graph_align_tcoffee_distance.h |    2 +-
 .../graph_msa/graph_align_tcoffee_guidetree.h      |    4 +-
 include/seqan/graph_msa/graph_align_tcoffee_io.h   |    2 +-
 include/seqan/graph_msa/graph_align_tcoffee_kmer.h |    2 +-
 .../seqan/graph_msa/graph_align_tcoffee_library.h  |    2 +-
 include/seqan/graph_msa/graph_align_tcoffee_msa.h  |    2 +-
 .../graph_msa/graph_align_tcoffee_progressive.h    |    2 +-
 .../graph_msa/graph_align_tcoffee_refinement.h     |    2 +-
 include/seqan/graph_types.h                        |    2 +-
 include/seqan/graph_types/graph_base.h             |    2 +-
 include/seqan/graph_types/graph_drawing.h          |    2 +-
 include/seqan/graph_types/graph_edgestump.h        |    2 +-
 include/seqan/graph_types/graph_idmanager.h        |    2 +-
 include/seqan/graph_types/graph_impl_automaton.h   |    2 +-
 include/seqan/graph_types/graph_impl_directed.h    |    2 +-
 include/seqan/graph_types/graph_impl_hmm.h         |    2 +-
 include/seqan/graph_types/graph_impl_oracle.h      |    2 +-
 include/seqan/graph_types/graph_impl_tree.h        |    2 +-
 include/seqan/graph_types/graph_impl_trie.h        |    2 +-
 include/seqan/graph_types/graph_impl_undirected.h  |    2 +-
 include/seqan/graph_types/graph_impl_wordgraph.h   |    2 +-
 include/seqan/graph_types/graph_interface.h        |    5 +-
 include/seqan/graph_types/graph_iterator.h         |    2 +-
 .../seqan/graph_types/graph_iterator_adjacency.h   |    2 +-
 include/seqan/graph_types/graph_iterator_bfs.h     |    2 +-
 include/seqan/graph_types/graph_iterator_dfs.h     |    2 +-
 include/seqan/graph_types/graph_iterator_edge.h    |    2 +-
 include/seqan/graph_types/graph_iterator_outedge.h |    2 +-
 include/seqan/graph_types/graph_iterator_vertex.h  |    2 +-
 include/seqan/graph_types/graph_utility_parsing.h  |    2 +-
 include/seqan/graph_types/property_map_generic.h   |    2 +-
 include/seqan/graph_types/property_map_internal.h  |    2 +-
 .../graph_types/property_map_internal_pointer.h    |    2 +-
 include/seqan/index.h                              |    3 +-
 include/seqan/index/find2_backtracking.h           |    6 +-
 include/seqan/index/find2_base.h                   |    2 +-
 include/seqan/index/find2_functors.h               |    2 +-
 include/seqan/index/find2_index.h                  |    2 +-
 include/seqan/index/find2_index_approx.h           |  642 ++++++++
 include/seqan/index/find_backtracking.h            |    4 +-
 include/seqan/index/find_index.h                   |    2 +-
 include/seqan/index/find_index_approx.h            |    2 +-
 include/seqan/index/find_index_binary.h            |    2 +-
 include/seqan/index/find_index_esa.h               |    2 +-
 include/seqan/index/find_index_lambda.h            |    6 +-
 include/seqan/index/find_index_qgram.h             |    4 +-
 include/seqan/index/find_pigeonhole.h              |    6 +-
 include/seqan/index/find_quasar.h                  |    2 +-
 include/seqan/index/find_swift.h                   |    2 +-
 include/seqan/index/index_base.h                   |    7 +-
 include/seqan/index/index_bidirectional.h          |    2 +-
 include/seqan/index/index_bidirectional_stree.h    |    2 +-
 include/seqan/index/index_bifm.h                   |    2 +-
 include/seqan/index/index_bifm_stree.h             |    5 +-
 include/seqan/index/index_bwt.h                    |    2 +-
 include/seqan/index/index_childtab.h               |    4 +-
 include/seqan/index/index_dfi.h                    |    2 +-
 include/seqan/index/index_esa_algs.h               |    2 +-
 include/seqan/index/index_esa_algs_multi.h         |    2 +-
 include/seqan/index/index_esa_base.h               |    2 +-
 include/seqan/index/index_esa_drawing.h            |    2 +-
 include/seqan/index/index_esa_stree.h              |    6 +-
 include/seqan/index/index_fm.h                     |    2 +-
 include/seqan/index/index_fm_compressed_sa.h       |    6 +-
 .../seqan/index/index_fm_compressed_sa_iterator.h  |    2 +-
 include/seqan/index/index_fm_dox.h                 |    2 +-
 include/seqan/index/index_fm_lf_table.h            |   77 +-
 .../seqan/index/index_fm_rank_dictionary_base.h    |   88 +-
 .../seqan/index/index_fm_rank_dictionary_levels.h  |   10 -
 include/seqan/index/index_fm_rank_dictionary_wt.h  |   59 +-
 .../seqan/index/index_fm_right_array_binary_tree.h |    2 +-
 .../index_fm_right_array_binary_tree_iterator.h    |    2 +-
 include/seqan/index/index_fm_sparse_string.h       |    2 +-
 include/seqan/index/index_fm_stree.h               |   19 +-
 include/seqan/index/index_forwards.h               |    2 +-
 include/seqan/index/index_lcp.h                    |    2 +-
 include/seqan/index/index_lcp_tree.h               |    2 +-
 include/seqan/index/index_pizzachili.h             |    6 +-
 include/seqan/index/index_pizzachili_find.h        |    2 +-
 include/seqan/index/index_pizzachili_string.h      |    2 +-
 include/seqan/index/index_qgram.h                  |   14 +-
 include/seqan/index/index_qgram_bucketrefinement.h |    2 +-
 include/seqan/index/index_qgram_openaddressing.h   |    2 +-
 include/seqan/index/index_qgram_stree.h            |    2 +-
 include/seqan/index/index_sa_btree.h               |    2 +-
 include/seqan/index/index_sa_bwtwalk.h             |   22 +-
 include/seqan/index/index_sa_lss.h                 |    6 +-
 include/seqan/index/index_sa_mm.h                  |    2 +-
 include/seqan/index/index_sa_qsort.h               |    2 +-
 include/seqan/index/index_sa_stree.h               |    8 +-
 include/seqan/index/index_sa_truncated.h           |   10 +-
 include/seqan/index/index_shawarma.h               |    2 +-
 include/seqan/index/index_shims.h                  |    2 +-
 include/seqan/index/index_skew3.h                  |    2 +-
 include/seqan/index/index_skew7.h                  |    2 +-
 include/seqan/index/index_skew7_multi.h            |    2 +-
 include/seqan/index/index_wotd.h                   |   10 +-
 include/seqan/index/pipe_merger3.h                 |    2 +-
 include/seqan/index/pipe_merger7.h                 |    2 +-
 include/seqan/index/pizzachili_api.h               |    2 +-
 include/seqan/index/pump_extender3.h               |    2 +-
 include/seqan/index/pump_extender7.h               |    2 +-
 include/seqan/index/pump_lcp_core.h                |    2 +-
 include/seqan/index/pump_separator7.h              |    2 +-
 include/seqan/index/radix.h                        |    2 +-
 include/seqan/index/repeat_base.h                  |    2 +-
 include/seqan/index/shape_base.h                   |    2 +-
 include/seqan/index/shape_gapped.h                 |    2 +-
 include/seqan/index/shape_minimizer.h              |    2 +-
 include/seqan/index/shape_onegapped.h              |    2 +-
 include/seqan/index/shape_predefined.h             |    2 +-
 include/seqan/index/shape_threshold.h              |    4 +-
 include/seqan/journaled_set.h                      |    2 +-
 .../journaled_set/journal_alignment_interface.h    |    2 +-
 .../journal_alignment_traceback_adaptor.h          |    2 +-
 include/seqan/journaled_set/journaled_set_base.h   |    2 +-
 include/seqan/journaled_set/journaled_set_impl.h   |    2 +-
 include/seqan/journaled_set/journaled_set_join.h   |    2 +-
 .../journaled_set/journaled_set_join_config.h      |    2 +-
 .../journaled_set_join_global_align_compact.h      |    2 +-
 .../journaled_set_join_global_align_manhatten.h    |    2 +-
 .../journaled_set_journal_trace_descriptor.h       |    2 +-
 include/seqan/journaled_set/score_biaffine.h       |    2 +-
 include/seqan/journaled_string_tree.h              |    2 +-
 include/seqan/journaled_string_tree/delta_map.h    |    6 +-
 .../seqan/journaled_string_tree/delta_map_entry.h  |    2 +-
 .../journaled_string_tree/delta_map_iterator.h     |    6 +-
 include/seqan/journaled_string_tree/delta_store.h  |    2 +-
 .../journaled_string_tree_base.h                   |    2 +-
 .../journaled_string_tree_impl.h                   |    4 +-
 .../journaled_string_tree_sequence_buffer.h        |    2 +-
 .../journaled_string_tree_traverser.h              |   14 +-
 .../journaled_string_tree_traverser_node.h         |    2 +-
 .../journaled_string_tree_traverser_util.h         |   16 +-
 .../journaled_string_tree/jst_extension_base.h     |    2 +-
 .../journaled_string_tree/jst_extension_horspool.h |    2 +-
 .../jst_extension_myers_ukkonen.h                  |    2 +-
 .../journaled_string_tree/jst_extension_shiftand.h |    2 +-
 .../journaled_string_tree/jst_extension_shiftor.h  |    2 +-
 include/seqan/journaled_string_tree/observable.h   |    2 +-
 .../seqan/journaled_string_tree/stack_observer.h   |    2 +-
 include/seqan/map.h                                |    2 +-
 include/seqan/map/map_adapter_stl.h                |    2 +-
 include/seqan/map/map_base.h                       |    2 +-
 include/seqan/map/map_chooser.h                    |    2 +-
 include/seqan/map/map_skiplist.h                   |    2 +-
 include/seqan/map/map_vector.h                     |    2 +-
 include/seqan/map/sumlist.h                        |    2 +-
 include/seqan/map/sumlist_mini.h                   |    2 +-
 include/seqan/map/sumlist_skip.h                   |    2 +-
 include/seqan/math.h                               |    2 +-
 include/seqan/math/math_common_factor.h            |    2 +-
 include/seqan/math/math_operators.h                |    2 +-
 include/seqan/math/math_rational.h                 |    8 +-
 include/seqan/misc/accumulators.h                  |    2 +-
 include/seqan/misc/base.h                          |    2 +-
 include/seqan/misc/bit_twiddling.h                 |    2 +-
 include/seqan/misc/bit_twiddling_functors.h        |    2 +-
 include/seqan/misc/dequeue.h                       |    2 +-
 include/seqan/misc/edit_environment.h              |    2 +-
 include/seqan/misc/interval_tree.h                 |   14 +-
 include/seqan/misc/map.h                           |    2 +-
 include/seqan/misc/memset.h                        |    2 +-
 include/seqan/misc/name_store_cache.h              |   27 +-
 include/seqan/misc/priority_type_base.h            |    2 +-
 include/seqan/misc/priority_type_heap.h            |    6 +-
 include/seqan/misc/set.h                           |    2 +-
 include/seqan/misc/svg.h                           |    2 +-
 include/seqan/misc/terminal.h                      |    2 +-
 include/seqan/misc/union_find.h                    |    2 +-
 include/seqan/modifier.h                           |    2 +-
 include/seqan/modifier/cyclic_shape.h              |    2 +-
 include/seqan/modifier/modifier_alphabet.h         |    2 +-
 .../seqan/modifier/modifier_alphabet_expansion.h   |    2 +-
 include/seqan/modifier/modifier_cyclic_shape.h     |    2 +-
 include/seqan/modifier/modifier_functors.h         |    2 +-
 include/seqan/modifier/modifier_iterator.h         |    2 +-
 include/seqan/modifier/modifier_padding.h          |   69 +-
 include/seqan/modifier/modifier_position.h         |    2 +-
 include/seqan/modifier/modifier_reverse.h          |    2 +-
 include/seqan/modifier/modifier_shortcuts.h        |    2 +-
 include/seqan/modifier/modifier_string.h           |    2 +-
 include/seqan/modifier/modifier_view.h             |    6 +-
 include/seqan/parallel.h                           |    8 +-
 include/seqan/parallel/enumerable_thread_local.h   |  476 ++++++
 .../parallel/enumerable_thread_local_iterator.h    |  186 +++
 include/seqan/parallel/parallel_algorithms.h       |    9 +-
 include/seqan/parallel/parallel_atomic_misc.h      |    2 +-
 .../seqan/parallel/parallel_atomic_primitives.h    |    2 +-
 include/seqan/parallel/parallel_lock.h             |    4 +-
 include/seqan/parallel/parallel_macros.h           |    2 +-
 include/seqan/parallel/parallel_queue.h            |   26 +-
 .../seqan/parallel/parallel_queue_suspendable.h    |   18 +-
 include/seqan/parallel/parallel_resource_pool.h    |    2 +-
 include/seqan/parallel/parallel_sequence.h         |    2 +-
 include/seqan/parallel/parallel_serializer.h       |    2 +-
 include/seqan/parallel/parallel_splitting.h        |    2 +-
 include/seqan/parallel/parallel_tags.h             |  174 +-
 include/seqan/parallel/parallel_thread_pool.h      |  219 +++
 include/seqan/parse_lm.h                           |    2 +-
 include/seqan/parse_lm/local_match_store.h         |   24 +-
 include/seqan/parse_lm/parse_blastn_tabular.h      |    2 +-
 include/seqan/parse_lm/parse_lastz_general.h       |    2 +-
 include/seqan/parse_lm/parse_stellar_gff.h         |    2 +-
 include/seqan/pipe.h                               |    2 +-
 include/seqan/pipe/pipe_base.h                     |    2 +-
 include/seqan/pipe/pipe_caster.h                   |    2 +-
 include/seqan/pipe/pipe_counter.h                  |    2 +-
 include/seqan/pipe/pipe_echoer.h                   |    2 +-
 include/seqan/pipe/pipe_edit_environment.h         |    2 +-
 include/seqan/pipe/pipe_filter.h                   |    2 +-
 include/seqan/pipe/pipe_iterator.h                 |    2 +-
 include/seqan/pipe/pipe_joiner.h                   |    2 +-
 include/seqan/pipe/pipe_namer.h                    |    2 +-
 include/seqan/pipe/pipe_sampler.h                  |    4 +-
 include/seqan/pipe/pipe_shifter.h                  |    2 +-
 include/seqan/pipe/pipe_source.h                   |    4 +-
 include/seqan/pipe/pipe_tupler.h                   |    2 +-
 include/seqan/pipe/pool_base.h                     |   10 +-
 include/seqan/pipe/pool_mapper.h                   |    2 +-
 include/seqan/pipe/pool_sorter.h                   |    2 +-
 include/seqan/platform.h                           |  114 +-
 include/seqan/random.h                             |    2 +-
 include/seqan/random/random_base.h                 |    2 +-
 include/seqan/random/random_beta.h                 |    2 +-
 include/seqan/random/random_util.h                 |    2 +-
 include/seqan/realign.h                            |    2 +-
 include/seqan/realign/realign_base.h               |   12 +-
 include/seqan/realign/realign_helper_functions.h   |    2 +-
 include/seqan/reduced_aminoacid.h                  |   17 +-
 .../reduced_aminoacid/reduced_aminoacid_base.h     |    2 +-
 .../reduced_aminoacid_base_late.h                  |    2 +-
 ..._base.h => reduced_aminoacid_buchfink11_base.h} |   49 +-
 ...les.h => reduced_aminoacid_buchfink11_tables.h} |   59 +-
 ...0_base.h => reduced_aminoacid_cannata10_base.h} |   46 +-
 ...bles.h => reduced_aminoacid_cannata10_tables.h} |   60 +-
 .../reduced_aminoacid_cluster_red_base.h           |    2 +-
 ...uced_aminoacid_cluster_red_tables_20_to_n_b62.h |    2 +-
 ...uced_aminoacid_cluster_red_tables_22_to_n_b62.h |    2 +-
 ...uced_aminoacid_cluster_red_tables_24_to_n_b62.h |    2 +-
 ...rphy10_base.h => reduced_aminoacid_li10_base.h} |   46 +-
 ...10_tables.h => reduced_aminoacid_li10_tables.h} |   54 +-
 .../reduced_aminoacid_murphy10_base.h              |    2 +-
 .../reduced_aminoacid_murphy10_tables.h            |    2 +-
 ...y10_base.h => reduced_aminoacid_murphy5_base.h} |   45 +-
 ...tables.h => reduced_aminoacid_murphy5_tables.h} |   57 +-
 ...y10_base.h => reduced_aminoacid_solis10_base.h} |   50 +-
 ...tables.h => reduced_aminoacid_solis10_tables.h} |   56 +-
 include/seqan/rna_io.h                             |    2 +-
 include/seqan/rna_io/bpseq_read_write.h            |    2 +-
 include/seqan/rna_io/connect_read_write.h          |    2 +-
 include/seqan/rna_io/dot_bracket_read_write.h      |    2 +-
 include/seqan/rna_io/ebpseq_read_write.h           |    2 +-
 include/seqan/rna_io/rna_header.h                  |    2 +-
 include/seqan/rna_io/rna_io_context.h              |    2 +-
 include/seqan/rna_io/rna_record.h                  |   17 +-
 include/seqan/rna_io/rna_struct_file.h             |    2 +-
 include/seqan/rna_io/stockholm_read_write.h        |    2 +-
 include/seqan/rna_io/vienna_read_write.h           |    2 +-
 include/seqan/roi_io.h                             |    2 +-
 include/seqan/roi_io/read_roi.h                    |    2 +-
 include/seqan/roi_io/roi_file.h                    |    2 +-
 include/seqan/roi_io/roi_io_context.h              |    2 +-
 include/seqan/roi_io/roi_record.h                  |    2 +-
 include/seqan/roi_io/write_roi.h                   |    2 +-
 include/seqan/score.h                              |    3 +-
 include/seqan/score/score_base.h                   |    2 +-
 include/seqan/score/score_edit.h                   |    2 +-
 include/seqan/score/score_matrix.h                 |   10 +-
 include/seqan/score/score_matrix_data.h            |   74 +-
 include/seqan/score/score_matrix_dyn.h             |   21 +-
 include/seqan/score/score_matrix_io.h              |    2 +-
 include/seqan/score/score_simd_wrapper.h           |   77 +-
 include/seqan/score/score_simple.h                 |    2 +-
 include/seqan/seeds.h                              |    2 +-
 include/seqan/seeds/banded_chain_alignment.h       |    2 +-
 include/seqan/seeds/banded_chain_alignment_impl.h  |  306 ++--
 .../seqan/seeds/banded_chain_alignment_profile.h   |   26 +-
 include/seqan/seeds/banded_chain_alignment_scout.h |    2 +-
 .../seqan/seeds/banded_chain_alignment_traceback.h |   36 +-
 include/seqan/seeds/basic_iter_indirect.h          |    2 +-
 include/seqan/seeds/seeds_base.h                   |    2 +-
 include/seqan/seeds/seeds_combination.h            |    2 +-
 include/seqan/seeds/seeds_extension.h              |    6 +-
 include/seqan/seeds/seeds_global_chaining.h        |  168 +-
 include/seqan/seeds/seeds_global_chaining_base.h   |    2 +-
 .../seqan/seeds/seeds_global_chaining_gusfield.h   |    2 +-
 include/seqan/seeds/seeds_seed_base.h              |    2 +-
 include/seqan/seeds/seeds_seed_chained.h           |    2 +-
 include/seqan/seeds/seeds_seed_diagonal.h          |    2 +-
 include/seqan/seeds/seeds_seed_set_base.h          |    2 +-
 include/seqan/seeds/seeds_seed_set_non_scored.h    |    2 +-
 include/seqan/seeds/seeds_seed_set_scored.h        |    2 +-
 include/seqan/seeds/seeds_seed_set_unordered.h     |    2 +-
 include/seqan/seeds/seeds_seed_simple.h            |    2 +-
 include/seqan/seq_io.h                             |    2 +-
 include/seqan/seq_io/bam_sam.h                     |    7 +-
 include/seqan/seq_io/fai_index.h                   |    2 +-
 include/seqan/seq_io/fasta_fastq.h                 |   14 +-
 include/seqan/seq_io/genomic_region.h              |    2 +-
 include/seqan/seq_io/read_embl.h                   |    8 +-
 include/seqan/seq_io/read_genbank.h                |    8 +-
 include/seqan/seq_io/sequence_file.h               |    8 +-
 include/seqan/sequence.h                           |    2 +-
 include/seqan/sequence/adapt_array_pointer.h       |    2 +-
 include/seqan/sequence/adapt_stl_container.h       |    5 +-
 include/seqan/sequence/container_view_zip.h        |    2 +-
 include/seqan/sequence/iter_concat_virtual.h       |    2 +-
 include/seqan/sequence/segment_base.h              |    2 +-
 include/seqan/sequence/segment_infix.h             |    2 +-
 include/seqan/sequence/segment_prefix.h            |    2 +-
 include/seqan/sequence/segment_suffix.h            |    2 +-
 include/seqan/sequence/segment_utils.h             |    2 +-
 include/seqan/sequence/sequence_concatenator.h     |    2 +-
 include/seqan/sequence/sequence_forwards.h         |    5 +-
 include/seqan/sequence/sequence_interface.h        |    2 +-
 include/seqan/sequence/sequence_lexical.h          |    2 +-
 include/seqan/sequence/sequence_shortcuts.h        |    2 +-
 include/seqan/sequence/string_alloc.h              |   24 +-
 include/seqan/sequence/string_array.h              |    2 +-
 include/seqan/sequence/string_base.h               |   26 +-
 include/seqan/sequence/string_block.h              |    2 +-
 include/seqan/sequence/string_cstyle.h             |    5 +-
 include/seqan/sequence/string_packed.h             |   14 +-
 include/seqan/sequence/string_packed_old.h         |    4 +-
 include/seqan/sequence/string_set_base.h           |    7 +-
 include/seqan/sequence/string_set_concat_direct.h  |    8 +-
 .../seqan/sequence/string_set_dependent_generous.h |    2 +-
 .../seqan/sequence/string_set_dependent_tight.h    |    2 +-
 include/seqan/sequence/string_set_owner.h          |   12 +-
 include/seqan/sequence/string_set_segment.h        |    2 +-
 include/seqan/sequence_journaled.h                 |    2 +-
 .../journal_entries_sorted_array.h                 |    2 +-
 include/seqan/sequence_journaled/journal_entry.h   |    2 +-
 .../seqan/sequence_journaled/sequence_journaled.h  |    2 +-
 .../sequence_journaled_iterator.h                  |    2 +-
 .../sequence_journaled_iterator_fast.h             |    2 +-
 include/seqan/simd.h                               |  143 ++
 include/seqan/simd/simd_base.h                     |  390 +++++
 include/seqan/simd/simd_base_seqan_impl.h          |  154 ++
 include/seqan/simd/simd_base_seqan_impl_avx2.h     | 1492 +++++++++++++++++
 include/seqan/simd/simd_base_seqan_impl_avx512.h   |  284 ++++
 include/seqan/simd/simd_base_seqan_impl_sse4.2.h   | 1053 ++++++++++++
 include/seqan/simd/simd_base_seqan_interface.h     |  392 +++++
 include/seqan/simd/simd_base_umesimd_impl.h        |  655 ++++++++
 include/seqan/simple_intervals_io.h                |    2 +-
 .../simple_intervals_io/simple_intervals_file.h    |    2 +-
 .../simple_intervals_io/simple_intervals_io.h      |    2 +-
 include/seqan/statistics.h                         |    2 +-
 include/seqan/statistics/statistics_base.h         |    2 +-
 include/seqan/statistics/statistics_markov_model.h |    4 +-
 include/seqan/store.h                              |    2 +-
 include/seqan/store/store_align.h                  |    6 +-
 include/seqan/store/store_align_intervals.h        |    2 +-
 include/seqan/store/store_all.h                    |   56 +-
 include/seqan/store/store_annotation.h             |    6 +-
 include/seqan/store/store_base.h                   |    2 +-
 include/seqan/store/store_contig.h                 |    8 +-
 include/seqan/store/store_intervaltree.h           |    2 +-
 include/seqan/store/store_io.h                     |    2 +-
 include/seqan/store/store_io_gff.h                 |    2 +-
 include/seqan/store/store_io_sam.h                 |   10 +-
 include/seqan/store/store_io_ucsc.h                |    4 +-
 include/seqan/store/store_library.h                |    2 +-
 include/seqan/store/store_matepair.h               |    4 +-
 include/seqan/store/store_read.h                   |    4 +-
 include/seqan/stream.h                             |    8 +-
 include/seqan/stream/adapt_ios.h                   |    2 +-
 include/seqan/stream/buffered_stream.h             |    2 +-
 include/seqan/stream/file_stream.h                 |   12 +-
 include/seqan/stream/formatted_file.h              |   26 +-
 include/seqan/stream/guess_format.h                |    2 +-
 include/seqan/stream/iostream_bgzf.h               |   31 +-
 include/seqan/stream/iter_stream.h                 |  186 ++-
 include/seqan/stream/lexical_cast.h                |   10 +-
 include/seqan/stream/stream_base.h                 |    2 +-
 include/seqan/stream/stream_compressor.h           |   34 +-
 include/seqan/stream/tokenization.h                |   32 +-
 include/seqan/stream/virtual_stream.h              |   15 +-
 include/seqan/system.h                             |    2 +-
 include/seqan/system/file_async.h                  |   15 +-
 include/seqan/system/file_directory.h              |    2 +-
 include/seqan/system/file_forwards.h               |    2 +-
 include/seqan/system/file_sync.h                   |    2 +-
 include/seqan/system/system_base.h                 |    2 +-
 include/seqan/system/system_event_win.h            |    2 +-
 include/seqan/system/system_forwards.h             |    2 +-
 include/seqan/tabix_io.h                           |    2 +-
 include/seqan/tabix_io/tabix_index_tbi.h           |   12 +-
 include/seqan/translation.h                        |    2 +-
 include/seqan/translation/translation.h            |   14 +-
 include/seqan/translation/translation_tables.h     |    2 +-
 include/seqan/ucsc_io.h                            |    2 +-
 include/seqan/ucsc_io/ucsc_file.h                  |    2 +-
 include/seqan/ucsc_io/ucsc_io.h                    |    2 +-
 include/seqan/ucsc_io/ucsc_record.h                |    2 +-
 include/seqan/vcf_io.h                             |    2 +-
 include/seqan/vcf_io/read_vcf.h                    |  128 +-
 include/seqan/vcf_io/vcf_file.h                    |    2 +-
 include/seqan/vcf_io/vcf_header.h                  |    2 +-
 include/seqan/vcf_io/vcf_header_record.h           |    2 +-
 include/seqan/vcf_io/vcf_io_context.h              |    2 +-
 include/seqan/vcf_io/vcf_record.h                  |    2 +-
 include/seqan/vcf_io/write_vcf.h                   |    2 +-
 include/seqan/version.h                            |    6 +-
 .../HowTo/GenerateSeqAnKnimeNodes/knime_node.rst   |    2 +-
 .../source/Infrastructure/Contribute/StyleCpp.rst  |    6 +-
 .../Infrastructure/Use/CustomBuildSystem.rst       |   40 +
 .../source/Infrastructure/Use/FindSeqAnCMake.rst   |   24 +
 manual/source/Infrastructure/Use/Install.rst       |   42 +-
 .../PatternMatching/OptimalSearchSchemes.rst       |   72 +
 .../Tutorial/Algorithms/PatternMatching/index.rst  |    2 +
 .../DataStructures/Indices/StringIndices.rst       |   16 +
 .../DataStructures/Sequence/StringsAndSegments.rst |    2 +-
 .../Tutorial/GettingStarted/AFirstExample.rst      |   34 +-
 .../GettingStarted/BackgroundAndMotivation.rst     |    4 +-
 .../GettingStarted/ParsingCommandLineArguments.rst |    2 +-
 .../Tutorial/HowTo/Recipes/CustomFileEndings.rst   |   89 +
 manual/source/seqan.bib                            |   11 -
 tests/align/CMakeLists.txt                         |   51 +-
 tests/align/test_align.cpp                         |   16 +-
 tests/align/test_align_align.h                     |    2 +-
 tests/align/test_align_alignment_operations.h      |    2 +-
 tests/align/test_align_fragment.h                  |    2 +-
 tests/align/test_align_gaps.h                      |    2 +-
 tests/align/test_align_gaps_iterator.h             |    2 +-
 tests/align/test_align_global_alignment.h          |    2 +-
 tests/align/test_align_global_alignment_banded.h   |    2 +-
 tests/align/test_align_global_alignment_score.h    |    2 +-
 .../test_align_global_alignment_specialized.h      |    2 +-
 tests/align/test_align_local_alignment.h           |    2 +-
 tests/align/test_align_matrix.h                    |    2 +-
 tests/align/test_align_myers.h                     |    2 +-
 tests/align/test_align_simd.h                      |  559 -------
 tests/align/test_align_simd_base.h                 |  270 ++++
 tests/align/test_align_simd_global.h               |  122 ++
 ...cpp => test_align_simd_global_equal_length.cpp} |   28 +-
 ... => test_align_simd_global_variable_length.cpp} |   23 +-
 tests/align/test_align_simd_local.h                |  122 ++
 ....cpp => test_align_simd_local_equal_length.cpp} |   21 +-
 ...p => test_align_simd_local_variable_length.cpp} |   20 +-
 tests/align/test_align_stream.h                    |    2 +-
 .../test_alignment_algorithms_band_position.h      |   98 +-
 .../align/test_alignment_algorithms_dynamic_gap.h  |    2 +-
 tests/align/test_alignment_algorithms_global.h     |    2 +-
 .../test_alignment_algorithms_global_banded.h      |    2 +-
 tests/align/test_alignment_algorithms_local.h      |   49 +-
 .../align/test_alignment_algorithms_local_banded.h |   34 +-
 .../align/test_alignment_dp_adapt_tracesegments.h  |   82 +-
 tests/align/test_alignment_dp_band.h               |    2 +-
 tests/align/test_alignment_dp_cell.h               |    4 +-
 tests/align/test_alignment_dp_formula.h            | 1328 +++++++++------
 tests/align/test_alignment_dp_matrix.h             |    4 +-
 tests/align/test_alignment_dp_matrix_navigator.h   | 1706 ++++----------------
 tests/align/test_alignment_dp_profile.h            |    2 +-
 tests/align/test_alignment_dp_trace_segment.h      |   54 +-
 tests/align/test_alignment_dp_traceback.h          |  397 +++--
 tests/align/test_evaluate_alignment.h              |    2 +-
 tests/align/test_local_align.h                     |    2 +-
 tests/align/test_mock.h                            |  240 +++
 tests/align_extend/test_align_extend.cpp           |    2 +-
 tests/align_extend/test_align_extend.h             |    2 +-
 tests/align_parallel/CMakeLists.txt                |   78 +
 .../test_align_parallel_algorithm.cpp}             |   24 +-
 .../test_align_parallel_data_structures.cpp}       |   51 +-
 .../test_align_parallel_interface.cpp}             |    4 +-
 .../align_parallel/test_align_parallel_interface.h |  168 ++
 .../test_align_parallel_wavefront_alignment.h      |  183 +++
 .../test_align_wavefront_alignment_scheduler.h     |  266 +++
 .../test_align_wavefront_alignment_thread_local.h} |   91 +-
 .../test_align_wavefront_intermediate_dp_result.h  |  121 ++
 .../test_align_wavefront_task_scheduler.h          |   83 +-
 tests/align_profile/test_align_profile.cpp         |    2 +-
 tests/align_split/test_align_split.cpp             |    2 +-
 tests/align_split/test_align_split.h               |    2 +-
 tests/alignment_free/test_alignment_free.cpp       |    2 +-
 tests/arg_parse/test_arg_parse.cpp                 |    3 +-
 tests/arg_parse/test_arg_parse.h                   |    2 +-
 tests/arg_parse/test_arg_parse_argument.h          |   30 +-
 tests/arg_parse/test_arg_parse_ctd_support.h       |    5 +-
 tests/arg_parse/test_arg_parse_option.h            |    2 +-
 tests/arg_parse/test_arg_parse_version_check.cpp   |    2 +-
 tests/arg_parse/test_arg_parse_version_check.h     |    2 +-
 tests/arg_parse/test_argument_parser.h             |    2 +-
 tests/arg_parse/test_extensions.h                  |    2 +-
 tests/bam_io/test_bam_alignment_record.h           |    2 +-
 tests/bam_io/test_bam_file.h                       |   28 +-
 tests/bam_io/test_bam_header_record.h              |    2 +-
 tests/bam_io/test_bam_index.h                      |   19 +-
 tests/bam_io/test_bam_io.cpp                       |    4 +-
 tests/bam_io/test_bam_io_context.h                 |    2 +-
 tests/bam_io/test_bam_sam_conversion.h             |   13 +-
 tests/bam_io/test_bam_tags_dict.h                  |    2 +-
 tests/bam_io/test_read_bam.h                       |   12 +-
 tests/bam_io/test_read_sam.h                       |    2 +-
 tests/bam_io/test_write_bam.h                      |    8 +-
 tests/bam_io/test_write_sam.h                      |    2 +-
 tests/basic/CMakeLists.txt                         |    7 -
 tests/basic/test_basic.cpp                         |    3 +-
 tests/basic/test_basic_aggregate.cpp               |    2 +-
 tests/basic/test_basic_aggregate.h                 |    7 +-
 tests/basic/test_basic_allocator.cpp               |    2 +-
 tests/basic/test_basic_allocator.h                 |    2 +-
 tests/basic/test_basic_alphabet.cpp                |    8 +-
 tests/basic/test_basic_alphabet.h                  |   52 +-
 tests/basic/test_basic_alphabet_adapt_builtins.h   |  201 +--
 tests/basic/test_basic_alphabet_bio.h              |    2 +-
 tests/basic/test_basic_alphabet_concepts.h         |    2 +-
 tests/basic/test_basic_alphabet_math.h             |   31 +-
 tests/basic/test_basic_alphabet_profile.h          |    2 +-
 tests/basic/test_basic_alphabet_qualities.h        |    2 +-
 tests/basic/test_basic_alphabet_residue.h          |   76 +-
 tests/basic/test_basic_alphabet_simple_type.h      |    2 +-
 tests/basic/test_basic_alphabet_storage.h          |    2 +-
 tests/basic/test_basic_array_construct_destruct.h  |    2 +-
 .../basic/test_basic_array_constructor_destruct.h  |    2 +-
 tests/basic/test_basic_concept.cpp                 |    6 +-
 tests/basic/test_basic_concepts.h                  |   41 +-
 tests/basic/test_basic_construct_destruct.h        |    2 +-
 tests/basic/test_basic_container.cpp               |    2 +-
 tests/basic/test_basic_container_proxy.h           |    2 +-
 tests/basic/test_basic_exception.cpp               |    2 +-
 tests/basic/test_basic_exception.h                 |    8 +-
 tests/basic/test_basic_fundamental.cpp             |    2 +-
 tests/basic/test_basic_fundamental_comparison.h    |    2 +-
 tests/basic/test_basic_fundamental_concepts.h      |    2 +-
 tests/basic/test_basic_fundamental_conversion.h    |    2 +-
 tests/basic/test_basic_fundamental_helpers.h       |    2 +-
 tests/basic/test_basic_fundamental_metafunctions.h |    2 +-
 tests/basic/test_basic_fundamental_tags.h          |    2 +-
 tests/basic/test_basic_fundamental_transport.h     |    2 +-
 tests/basic/test_basic_hosted_type_interface.h     |    2 +-
 tests/basic/test_basic_iterator.cpp                |    2 +-
 tests/basic/test_basic_iterator.h                  |    4 +-
 tests/basic/test_basic_iterator_concepts.h         |    2 +-
 tests/basic/test_basic_iterator_zip.h              |    2 +-
 tests/basic/test_basic_math.cpp                    |    2 +-
 tests/basic/test_basic_math.h                      |    2 +-
 tests/basic/test_basic_metaprogramming.cpp         |    2 +-
 tests/basic/test_basic_metaprogramming.h           |    2 +-
 tests/basic/test_basic_metaprogramming_control.h   |    2 +-
 tests/basic/test_basic_metaprogramming_enable_if.h |    2 +-
 tests/basic/test_basic_metaprogramming_logic.h     |    2 +-
 tests/basic/test_basic_metaprogramming_math.h      |    2 +-
 tests/basic/test_basic_metaprogramming_type.h      |    2 +-
 tests/basic/test_basic_parallelism.cpp             |    2 +-
 tests/basic/test_basic_parallelism.h               |    2 +-
 tests/basic/test_basic_proxy.cpp                   |    2 +-
 tests/basic/test_basic_proxy.h                     |    2 +-
 tests/basic/test_basic_simd_vector.h               |  155 --
 tests/basic/test_basic_smart_pointer.cpp           |    2 +-
 tests/basic/test_basic_smart_pointer_holder.h      |    2 +-
 tests/basic/test_basic_tag.h                       |    2 +-
 tests/basic/test_basic_transport.h                 |    2 +-
 tests/basic/test_basic_type.h                      |    2 +-
 tests/bed_io/test_bed_io.cpp                       |   10 +-
 tests/blast/test_blast.cpp                         |    2 +-
 tests/blast/test_blast_input.h                     |   10 +-
 tests/blast/test_blast_misc.h                      |    2 +-
 tests/blast/test_blast_output.h                    |    4 +-
 tests/blast/test_blast_statistics.h                |    2 +-
 tests/consensus/test_consensus.cpp                 |    2 +-
 tests/consensus/test_consensus.h                   |   29 +-
 tests/consensus/test_consensus_realign.h           |    7 +-
 tests/consensus_v2/test_consensus_v2.cpp           |    2 +-
 tests/find/test_find.cpp                           |    2 +-
 tests/find/test_find_hamming.h                     |    2 +-
 tests/find/test_find_myers_banded.h                |    2 +-
 tests/gff_io/test_gff_io.cpp                       |    2 +-
 tests/gff_io/test_gff_io.h                         |   39 +-
 tests/graph_algorithms/test_graph_algorithms.cpp   |    2 +-
 tests/graph_algorithms/test_graph_algorithms.h     |    2 +-
 tests/graph_align/test_graph_align.cpp             |    2 +-
 tests/graph_align/test_graph_impl_align.h          |    2 +-
 tests/graph_align/test_graph_match_refinement.h    |    2 +-
 tests/graph_msa/test_graph_msa.cpp                 |    2 +-
 tests/graph_msa/test_graph_msa_guide_tree.h        |    2 +-
 tests/graph_msa/test_graph_tcoffee.h               |    2 +-
 tests/graph_types/test_graph_types_basic.cpp       |    2 +-
 tests/graph_types/test_graph_types_derived.cpp     |    2 +-
 tests/graph_types/test_graph_types_iterators.cpp   |    2 +-
 .../graph_types/test_graph_types_property_map.cpp  |    2 +-
 tests/graph_types/test_graph_types_types.cpp       |    2 +-
 tests/graph_types/test_graph_types_utils.cpp       |    2 +-
 tests/index/CMakeLists.txt                         |    6 +-
 tests/index/test_crosscompare.h                    |    2 +-
 .../test_find2_index_approx.cpp}                   |   19 +-
 tests/index/test_find2_index_approx.h              |  489 ++++++
 tests/index/test_index_base.cpp                    |    2 +-
 tests/index/test_index_bifm.cpp                    |   18 +-
 tests/index/test_index_creation.cpp                |    2 +-
 tests/index/test_index_creation.h                  |    8 +-
 tests/index/test_index_crosscompare_char.cpp       |    2 +-
 tests/index/test_index_crosscompare_char_dfi.cpp   |    2 +-
 tests/index/test_index_crosscompare_dna.cpp        |    2 +-
 tests/index/test_index_crosscompare_dna_dfi.cpp    |    2 +-
 tests/index/test_index_drawing.cpp                 |    2 +-
 tests/index/test_index_finder.cpp                  |    2 +-
 tests/index/test_index_fm.cpp                      |    2 +-
 tests/index/test_index_fm_rank_dictionary.cpp      |    9 +-
 .../test_index_fm_right_array_binary_tree.cpp      |    2 +-
 .../index/test_index_fm_right_array_binary_tree.h  |    2 +-
 ...est_index_fm_right_array_binary_tree_iterator.h |    2 +-
 tests/index/test_index_fm_sparse_string.cpp        |    2 +-
 tests/index/test_index_fm_stree.h                  |    2 +-
 tests/index/test_index_helpers.h                   |   10 +-
 tests/index/test_index_qgram.cpp                   |    2 +-
 tests/index/test_index_repeats.cpp                 |    2 +-
 tests/index/test_index_repeats.h                   |    2 +-
 tests/index/test_index_sa_bwtwalk.cpp              |    2 +-
 tests/index/test_index_shapes.cpp                  |    2 +-
 tests/index/test_index_stree_iterators.cpp         |    3 +-
 tests/index/test_index_vstree.cpp                  |    2 +-
 tests/index/test_qgram_index.h                     |   25 +-
 tests/index/test_sa_bwtwalk.h                      |    4 +-
 tests/index/test_shapes.h                          |    2 +-
 tests/index/test_stree_iterators.h                 |   20 +-
 tests/journaled_set/test_journaled_set.cpp         |    2 +-
 tests/journaled_set/test_journaled_set.h           |    2 +-
 .../test_basic_observable.cpp                      |    2 +-
 .../journaled_string_tree/test_basic_observable.h  |    2 +-
 tests/journaled_string_tree/test_delta_map.cpp     |    2 +-
 tests/journaled_string_tree/test_delta_map.h       |   16 +-
 tests/journaled_string_tree/test_delta_store.h     |    2 +-
 .../test_journaled_string_tree.cpp                 |    2 +-
 .../test_journaled_string_tree.h                   |    4 +-
 .../test_journaled_string_tree_find.cpp            |    2 +-
 .../test_journaled_string_tree_find.h              |    2 +-
 .../test_journaled_string_tree_mock.h              |    2 +-
 .../test_journaled_string_tree_traverser.cpp       |    3 +-
 .../test_journaled_string_tree_traverser.h         |   18 +-
 tests/map/test_map.cpp                             |    2 +-
 tests/map/test_map_map.h                           |    2 +-
 tests/map/test_map_sumlist.h                       |    2 +-
 tests/misc/test_misc.cpp                           |    8 +-
 tests/misc/test_misc_accumulators.h                |    2 +-
 tests/misc/test_misc_bit_twiddling.h               |    2 +-
 tests/misc/test_misc_edit_environment.h            |    2 +-
 tests/misc/test_misc_interval_tree.h               |    2 +-
 tests/modifier/helpers.h                           |    2 +-
 tests/modifier/test_modifier.cpp                   |    5 +-
 tests/modifier/test_modifier_alphabet.h            |    2 +-
 tests/modifier/test_modifier_functors.h            |    2 +-
 tests/modifier/test_modifier_shortcuts.h           |    2 +-
 tests/modifier/test_modifier_string.h              |    2 +-
 tests/modifier/test_modifier_string_padding.h      |   26 +-
 tests/modifier/test_modifier_view.h                |    2 +-
 tests/modifier_cyclic_shape/test_cyclic_shape.h    |    2 +-
 .../test_modifier_cyclic_shape.cpp                 |    2 +-
 .../test_modifier_cyclic_shape.h                   |    2 +-
 .../test_multiple_translation_units.cpp            |    3 +-
 .../test_multiple_translation_units_2.cpp          |    3 +-
 tests/parallel/CMakeLists.txt                      |    4 +-
 tests/parallel/test_parallel.cpp                   |   23 +-
 tests/parallel/test_parallel_algorithms.h          |    2 +-
 tests/parallel/test_parallel_atomic_misc.h         |    2 +-
 tests/parallel/test_parallel_atomic_primitives.h   |    2 +-
 .../test_parallel_enumerable_thread_local.h        |  217 +++
 tests/parallel/test_parallel_queue.h               |    2 +-
 tests/parallel/test_parallel_splitting.h           |    2 +-
 tests/parallel/test_parallel_thread_pool.h         |  151 ++
 tests/parse_lm/test_parse_lm.cpp                   |    2 +-
 tests/parse_lm/test_parse_lm.h                     |    4 +-
 tests/pipe/test_pipe.cpp                           |    2 +-
 tests/pipe/test_pipe.h                             |    2 +-
 tests/platform/test_platform.cpp                   |    2 +-
 .../platform/test_platform_range_based_for_loops.h |    2 +-
 tests/random/test_random.cpp                       |    2 +-
 tests/random/test_random_basic.h                   |    2 +-
 tests/random/test_random_beta.h                    |    2 +-
 tests/random/test_random_util.h                    |    2 +-
 tests/realign/test_realign.cpp                     |    2 +-
 tests/reduced_aminoacid/test_reduced_aminoacid.cpp |    7 +-
 tests/reduced_aminoacid/test_reduced_aminoacid.h   |   97 +-
 tests/rna_io/CMakeLists.txt                        |    4 +-
 tests/rna_io/test_rna_io.cpp                       |    2 +-
 tests/rna_io/test_rna_io.h                         |    2 +-
 tests/roi_io/test_roi_io.cpp                       |   10 +-
 tests/score/test_score.cpp                         |   11 +-
 tests/seeds/seed_set_test_helpers.h                |    2 +-
 tests/seeds/test_align_banded_chain_impl.cpp       |    4 +-
 .../test_banded_chain_alignment_interface.cpp      |    2 +-
 tests/seeds/test_seeds_combination.cpp             |    2 +-
 tests/seeds/test_seeds_extension.cpp               |    2 +-
 tests/seeds/test_seeds_global_chaining.cpp         |   28 +-
 tests/seeds/test_seeds_seed_base.cpp               |    2 +-
 tests/seeds/test_seeds_seed_chained.cpp            |    2 +-
 tests/seeds/test_seeds_seed_diagonal.cpp           |    2 +-
 tests/seeds/test_seeds_seed_set_base.cpp           |    2 +-
 tests/seeds/test_seeds_seed_set_unordered.cpp      |    2 +-
 tests/seeds/test_seeds_seed_simple.cpp             |    2 +-
 tests/seq_io/test_fai_index.h                      |   26 +-
 tests/seq_io/test_genomic_region.h                 |    2 +-
 tests/seq_io/test_read_bam.h                       |    2 +-
 tests/seq_io/test_seq_io.cpp                       |    2 +-
 tests/seq_io/test_seq_io_generic.h                 |    2 +-
 tests/seq_io/test_sequence_file.h                  |   38 +-
 tests/seq_io/test_stream_read_embl.h               |    2 +-
 tests/seq_io/test_stream_read_genbank.h            |    2 +-
 tests/seq_io/test_stream_record_reader_fasta.h     |    2 +-
 tests/seq_io/test_stream_write_fasta.h             |    2 +-
 tests/seq_io/test_tag_select_intersect.h           |    2 +-
 tests/seq_io/test_write_bam.h                      |    2 +-
 tests/sequence/test_segment.h                      |    2 +-
 tests/sequence/test_segment_beta.h                 |    2 +-
 tests/sequence/test_sequence.cpp                   |    2 +-
 tests/sequence/test_sequence.h                     |   55 +-
 tests/sequence/test_sequence_std_adaptions.h       |    2 +-
 tests/sequence/test_sequence_v2.cpp                |    2 +-
 tests/sequence/test_string.h                       |    2 +-
 tests/sequence/test_string_packed_extension.h      |    6 +-
 tests/sequence/test_string_set.h                   |   69 +-
 tests/sequence/test_stringset.h                    |    2 +-
 tests/sequence/test_stringset_v2.cpp               |    2 +-
 .../sequence_journaled/test_sequence_journaled.cpp |    2 +-
 tests/sequence_journaled/test_sequence_journaled.h |    2 +-
 .../test_sequence_journaled_iterator.h             |    2 +-
 tests/{rna_io => simd}/CMakeLists.txt              |   30 +-
 .../test_simd_vector.cpp}                          |   30 +-
 tests/simd/test_simd_vector.h                      |  979 +++++++++++
 .../test_simple_intervals_io.cpp                   |    2 +-
 tests/statistics/test_statistics.cpp               |    2 +-
 tests/statistics/test_statistics_base.h            |    5 +-
 tests/statistics/test_statistics_markov_model.h    |    2 +-
 tests/store/test_store.cpp                         |    2 +-
 tests/store/test_store_io.h                        |   94 +-
 tests/store/test_store_io_bam.h                    |   12 +-
 tests/stream/test_stream.cpp                       |    2 +-
 tests/stream/test_stream_file_stream.h             |    2 +-
 tests/stream/test_stream_generic.h                 |    2 +-
 tests/stream/test_stream_lexical_cast.h            |    6 +-
 tests/stream/test_stream_tokenization.h            |   62 +-
 tests/stream/test_stream_virtual_stream.h          |   17 +-
 tests/stream/test_stream_write.h                   |    2 +-
 tests/swift_local/test_find_swift.cpp              |    2 +-
 tests/tabix_io/test_tabix_io.cpp                   |    2 +-
 tests/tabix_io/test_tabix_io.h                     |   13 +-
 tests/translation/test_translation.cpp             |    2 +-
 tests/translation/test_translation.h               |   43 +-
 tests/ucsc_io/test_ucsc_io.cpp                     |   26 +-
 tests/vcf_io/example_records_with_errors.vcf       |    5 +-
 tests/vcf_io/test_vcf_io.cpp                       |    2 +-
 tests/vcf_io/test_vcf_io.h                         |   48 +-
 util/bin/adjust_copyright_years.sh                 |    5 +-
 util/cmake/FindGitInfo.cmake                       |    2 +-
 util/cmake/{FindGitInfo.cmake => FindSDE.cmake}    |   69 +-
 .../cmake/{FindGitInfo.cmake => FindUmesimd.cmake} |   53 +-
 util/cmake/GetCurrentDate.cmake                    |    2 +-
 util/cmake/GetCurrentDate.cpp                      |    2 +-
 util/cmake/SeqAnBuildSystem.cmake                  |  111 +-
 util/cmake/SeqAnConsistentFPFlags.cmake            |    2 +-
 util/cmake/SeqAnContribs.cmake                     |  115 +-
 util/cmake/SeqAnCtdSetup.cmake                     |    2 +-
 util/cmake/SeqAnSimdUtility.cmake                  |  647 ++++++++
 util/cmake/SeqAnUsabilityAnalyzer.cmake            |    2 +-
 util/cmake/SetCPackSystemName.cmake                |    2 +-
 util/cmake/ctd/COPYRIGHT                           |    2 +-
 util/cmake/ctd/LICENSE                             |    2 +-
 util/cmake/package.cmake                           |    2 +-
 util/cmake/seqan-config.cmake                      |   33 +-
 util/pkgconfig/seqan.pc.in                         |    4 +-
 util/py_lib/CMakeLists.txt                         |    5 +
 util/py_lib/seqan/LICENSE                          |    2 +-
 util/skel/app_template/CMakeLists.txt              |    2 +-
 util/skel/app_template/LICENSE                     |    2 +-
 util/skel/app_template/app.cpp                     |    2 +-
 util/skel/demo_template/demo.cpp                   |    2 +-
 util/skel/header_template/header.h                 |    2 +-
 util/skel/header_template/library_header.h         |    2 +-
 util/skel/module_template/header.h                 |    2 +-
 util/skel/module_template/module.h                 |    2 +-
 util/skel/test_template/test.cpp                   |    2 +-
 util/skel/test_template/test.h                     |    2 +-
 util/travis/linux-cibuild.cmake                    |    1 -
 util/travis/linux-cibuild.sh                       |    5 +
 1354 files changed, 25764 insertions(+), 12530 deletions(-)

diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 6c2dfcf..3a907b5 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -3,6 +3,59 @@ SeqAn Changelog
 
 This file summarizes the changes to the SeqAn library and apps.
 
+Release 2.4.0
+~~~~~~~~~~~~~
+
+Library Features
+^^^^^^^^^^^^^^^^
+
+- Align
+   - Generic parallelisation and vectorisation.
+   - Support for SSE4, AVX2 and AVX512.
+   - Speed-Ups of > 1000x compared to serial execution of long DNA alignments.
+- Indexing
+   - Parallel ``find()`` interface
+   - Support for optimal search schemes (https://arxiv.org/abs/1711.02035)
+- ReducedAminoAcid
+   - several new Reduced Amino Acid alphabets are now available.
+- VCF I/O
+   - Now supports version 4.2 of the specification, i.e. columns with only eight fields.
+
+Selected Bug Fixes
+^^^^^^^^^^^^^^^^^^
+
+- BAM I/O
+   - Fix of jumpToRegion() functionality to start at the desired region instead of the index block.
+   - Works correctly on big endian platforms now.
+- Translation
+   - Handle empty/too-short input correctly.
+- Code Cleanup
+   - various parts of the codebase have undergone cleanup and may now report deprecated functionality as being deprecated via compiler-functionality.
+
+Platform Support
+^^^^^^^^^^^^^^^^
+
+- Compiler support:
+   - Satisfies stricter warning levels of GCC-8, Clang-5 also with ``-std=c++17``.
+   - Supports VS2017.
+   - Intel Compiler suite 2016 **was dropped**.
+   - Intel Compiler suites 2017 and 2018 are newly supported.
+   - GCC-4.9 on MacOS **was dropped** (newer GCC available everywhere via MacPorts or Homebrew).
+   - Clang-3.5 on FreeBSD **was dropped** (newer Clang available in base system and Ports).
+- CPU architectures support:
+   - Substantial fixes for big endian platforms
+   - Now officially supported and passing integration tests:
+      - ``i386, amd64/intel64, x32, ia64``
+      - ``armel, armhf, arm64``
+      - ``mips, mipsel, mips64el``
+      - ``powerpc, ppc64, ppc64el``
+      - ``s390x, alpha, m68k, sh4``
+   - Officially **not** supported: ``sparc64``
+   - Thanks to the `Debian Med team <https://www.debian.org/devel/debian-med/>`_ for their patches!
+- Upstream packages:
+   - SeqAn2 packages are finally coming to Fedora, thanks to @sagitter
+   - Package updates in Debian, Ubuntu, MacPorts, Homebrew and FreeBSD expected shortly.
+
 Release 2.3.2
 ~~~~~~~~~~~~~
 
@@ -16,8 +69,8 @@ Selected Bug Fixes
    - reintroduce ``FindSeqAn.cmake`` for projects that rely on cmake's module mode
    - fix the pkgconfig file
 - Platform related
-   - improved compliance with warning levels of soon-to-be-released gcc7 and clang4 
-   - because of unresolved bugs we now recommend gcc5 as minimum gcc version when using static linking 
+   - improved compliance with warning levels of soon-to-be-released gcc7 and clang4
+   - because of unresolved bugs we now recommend gcc5 as minimum gcc version when using static linking
 
 Release 2.3.1
 ~~~~~~~~~~~~~
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f3126f1..2e2511e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -75,7 +75,10 @@ set (SEQAN_CTD_EXECUTABLES CACHE INTERNAL "Global list of executables for workfl
 
 option (SEQAN_STATIC_APPS "Build static apps." OFF)
 option (SEQAN_ARCH_SSE4 "Build SSE optimized binaries." OFF)
-option (SEQAN_ARCH_AVX2 "Build AVX optimized binaries." OFF)
+option (SEQAN_ARCH_AVX2 "Build AVX2 optimized binaries." OFF)
+option (SEQAN_ARCH_AVX512_KNL "Build AVX512 optimized binaries for Knights Landing." OFF)
+option (SEQAN_ARCH_AVX512_SKX "Build AVX512 optimized binaries for Skylake." OFF)
+option (SEQAN_ARCH_AVX512_CNL "Build AVX512 optimized binaries for Cannon Lake." OFF)
 option (SEQAN_ARCH_NATIVE "Build natively optimized binaries." OFF)
 
 # ===========================================================================
@@ -132,8 +135,10 @@ if ("${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP")
     message (STATUS "Configuring demos")
     add_subdirectory (demos)
 
-    message (STATUS "Configuring manual")
-    add_subdirectory (manual)
+    if (NOT SEQAN_NO_DOX)
+        message (STATUS "Configuring manual")
+        add_subdirectory (manual)
+    endif ()
 endif ()
 
 if ((("${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") OR
diff --git a/LICENSE b/LICENSE
index 3d08d0d..0554e01 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
@@ -24,4 +24,3 @@ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
 DAMAGE.
-
diff --git a/README.rst b/README.rst
index 8b9c357..1043974 100644
--- a/README.rst
+++ b/README.rst
@@ -21,19 +21,18 @@ The licenses for the applications themselves can be found in the LICENSE files.
 Prerequisites
 -------------------
 
-Linux, Mac OSX, FreeBSD:
-  * GCC ≥ 4.9 [GCC ≥ 5 recommended]
-  * Clang/LLVM ≥ 3.5
-  * Intel Compiler ≥ 16.0.2
+Linux, MacOS, FreeBSD:
+  * GCC ≥ 5 [limited GCC-4.9 support on Linux]
+  * Clang/LLVM ≥ 3.6 [limited Clang-3.5 support on Linux]
+  * Intel Compiler ≥ 17.0.0 on Linux
 Windows:
   * Visual C++ ≥ 14.0 / Visual Studio ≥ 2015
-  * Intel Compiler ≥ 16.0.3 / Visual Studio ≥ 2015u2
+  * Intel Compiler ≥ 17.0.0 / Visual Studio ≥ 2015u2
   * Clang/C2 ≥ 3.8.0 / Visual Studio ≥ 2015u3 [experimental, requires CMake ≥ 3.6]
 
 Architecture support:
-  * 32bit and 64bit Intel/AMD officially supported
-  * 64bit is highly recommended and some parts of SeqAn are optimized for ``POPCNT``, ``SSE4`` and/or ``AVX2`` instruction sets available on newer CPUs
-  * many other architectures, including ARM, PowerPC and Sparc64 work, but receive less testing and optimizations
+  * Intel/AMD platforms, including optimisations for modern instruction sets (``POPCNT``, ``SSE4``, ``AVX2``, ``AVX512``)
+  * All Debian release architectures supported, including most ARM and all PowerPC platforms.
 
 To build tests, demos, and official SeqAn applications you also need:
   * CMake ≥ 3.0 [CMake ≥ 3.4 recommended]
diff --git a/apps/alf/CMakeLists.txt b/apps/alf/CMakeLists.txt
index e198d89..71f4995 100644
--- a/apps/alf/CMakeLists.txt
+++ b/apps/alf/CMakeLists.txt
@@ -10,7 +10,7 @@ cmake_minimum_required (VERSION 3.0.0)
 project (seqan_apps_alf CXX)
 message (STATUS "Configuring apps/alf")
 
-set (SEQAN_APP_VERSION "1.1.9")
+set (SEQAN_APP_VERSION "1.1.10")
 
 # ----------------------------------------------------------------------------
 # Dependencies
@@ -56,7 +56,7 @@ endif (NOT SEQAN_PREFIX_SHARE_DOC)
 
 # Install alf in ${PREFIX}/bin directory
 install (TARGETS alf
-         DESTINATION bin)
+         DESTINATION ${CMAKE_INSTALL_BINDIR})
 
 # Install non-binary files for the package to "." for app builds and
 # ${PREFIX}/share/doc/alf for SeqAn release builds.
diff --git a/apps/alf/LICENSE b/apps/alf/LICENSE
index 58ae927..53d676c 100644
--- a/apps/alf/LICENSE
+++ b/apps/alf/LICENSE
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                  ALF - Alignment free sequence comparison
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/alf/README b/apps/alf/README
index 95f9f30..d2b0bbd 100644
--- a/apps/alf/README
+++ b/apps/alf/README
@@ -28,12 +28,12 @@ N2 similarity measure.
 ---------------------------------------------------------------------------
 
 ALF is distributed with SeqAn - The C++ Sequence Analysis Library (see
-http://www.seqan.de). To build ALF from SVN do the following:
+http://www.seqan.de). To build ALF from Git do the following:
 
-  1) svn co http://svn.mi.fu-berlin.de/seqan/trunk/seqan
+  1) git clone https://github.com/seqan/seqan.git
   2) mkdir -p build/Release
   3) cd build/Release
-  4) cmake ../.. -DCMAKE_BUILD_TYPE=Release
+  4) cmake ../../seqan -DCMAKE_BUILD_TYPE=Release
   5) make alf
   6) ./apps/alf/alf --help
 
@@ -42,7 +42,7 @@ was dumped.
 
 For more information about retrieving SeqAn and prerequisites please visit
 
-  http://trac.seqan.de/wiki/Tutorial/GettingStarted
+  https://www.seqan.de/getting-started/
 
 ---------------------------------------------------------------------------
 3. Usage
diff --git a/apps/alf/alf.cpp b/apps/alf/alf.cpp
index 813a377..3a5522b 100644
--- a/apps/alf/alf.cpp
+++ b/apps/alf/alf.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                  ALF - Alignment free sequence comparison
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -74,7 +74,7 @@ int main(int argc, const char * argv[])
     // Options Section: Input / Output parameters.
     addSection(parser, "Input / Output");
     addOption(parser, seqan::ArgParseOption("i", "input-file", "Name of the multi-FASTA input file.", seqan::ArgParseArgument::INPUT_FILE));
-    setValidValues(parser, "input-file", "fa fasta");
+    setValidValues(parser, "input-file", seqan::SeqFileIn::getFileExtensions());
     setRequired(parser, "input-file");
     addOption(parser, seqan::ArgParseOption("o", "output-file", "Name of the file to which the tab-delimtied matrix with pairwise scores will be written to.  Default is to write to stdout.", seqan::ArgParseArgument::OUTPUT_FILE));
     setValidValues(parser, "output-file", "alf.tsv");
diff --git a/apps/bs_tools/CMakeLists.txt b/apps/bs_tools/CMakeLists.txt
index 8732293..d9c509e 100644
--- a/apps/bs_tools/CMakeLists.txt
+++ b/apps/bs_tools/CMakeLists.txt
@@ -10,7 +10,7 @@ cmake_minimum_required (VERSION 3.0.0)
 project (seqan_apps_bs_tools CXX)
 message (STATUS "Configuring apps/bs_tools")
 
-set (SEQAN_APP_VERSION "0.1.9")
+set (SEQAN_APP_VERSION "0.1.10")
 
 if ((${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") AND ("$ENV{MODEL}" STREQUAL "Nightly"))
     message (STATUS "bs_tools skipped on FreeBSD because math.h rounding errors.")
@@ -99,7 +99,7 @@ endif (NOT SEQAN_PREFIX_SHARE_DOC)
 
 # Install bs_tools in ${PREFIX}/bin directory
 install (TARGETS bisar casbar four2three
-         DESTINATION bin)
+         DESTINATION ${CMAKE_INSTALL_BINDIR})
 
 # Install non-binary files for the package to "." for app builds and
 # ${PREFIX}/share/doc/bs_tools for SeqAn release builds.
diff --git a/apps/bs_tools/LICENSE b/apps/bs_tools/LICENSE
index 9b933f5..948c7f4 100644
--- a/apps/bs_tools/LICENSE
+++ b/apps/bs_tools/LICENSE
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/bs_tools/bisar.cpp b/apps/bs_tools/bisar.cpp
index 54e3980..7e4cf74 100644
--- a/apps/bs_tools/bisar.cpp
+++ b/apps/bs_tools/bisar.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                              bisar
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/bs_tools/bisar.h b/apps/bs_tools/bisar.h
index 7ac9c59..6b8b261 100644
--- a/apps/bs_tools/bisar.h
+++ b/apps/bs_tools/bisar.h
@@ -1098,7 +1098,7 @@ postProcessMain(TOptions &options, TModel const &)
         if (hasFlagUnmapped(record)) continue;     // Read is unmapped
         // Get readId (could be curr. read or mate) -> Only Id, seq. we will get the original from readSeqStore
         // If read name not found, skip entry
-        if (!getIdByName(store.readNameStore, record.qName, readId, readNameCache)) continue;
+        if (!getIdByName(readId, readNameCache, record.qName)) continue;
 
         if (hasFlagMultiple(record))   //)    // If paired: Get readId for current mate
         {
diff --git a/apps/bs_tools/casbar.cpp b/apps/bs_tools/casbar.cpp
index 15f25a6..976c5f1 100755
--- a/apps/bs_tools/casbar.cpp
+++ b/apps/bs_tools/casbar.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                              casbar
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -165,8 +165,8 @@ copyNextWindowMatchesAndReads(TFragmentStore &fragmentStore,
     --itG;
 
     // We will use minCoord/maxCoord to store the temporarily minimal and maximal coordinates in the window.
-    int minCoord = maxValue<int>();
-    int maxCoord = minValue<int>();
+    int minCoord = std::numeric_limits<int>::max();
+    int maxCoord = std::numeric_limits<int>::min();
     //CharString str = "discBef";
     //_dumpMatches(fragmentStore, str);
 
@@ -192,9 +192,9 @@ copyNextWindowMatchesAndReads(TFragmentStore &fragmentStore,
     }
 
     // Write minimal and maximal coordinate from reads in this window to options.minCoord/options.maxCoord.
-    if (minCoord != maxValue<int>())
+    if (minCoord != std::numeric_limits<int>::max())
         options.minCoord = minCoord;
-    if (maxCoord != minValue<int>())
+    if (maxCoord != std::numeric_limits<int>::min())
         options.maxCoord = maxCoord;
 
     if(options._debugLevel > 1)
@@ -625,7 +625,7 @@ detectSNPsForContig(seqan::VcfFileOut & vcfFileOut,
     TReadStore tmpRs;
     TReadSeqStore tmpReads;     // Something went wrong when keeping all reads of contig, so keep it like that for the moment
     TSetContigAnchorGaps tmpSetContigAnchorGaps;
-    options.minCoord = MaxValue<unsigned>::VALUE;
+    options.minCoord = std::numeric_limits<unsigned>::max();
     options.maxCoord = 0;
 
     // snp calling is done for all positions between windowBegin and windowEnd
diff --git a/apps/bs_tools/casbar.h b/apps/bs_tools/casbar.h
index 1831843..8398799 100755
--- a/apps/bs_tools/casbar.h
+++ b/apps/bs_tools/casbar.h
@@ -180,7 +180,7 @@ struct SNPCallingOptions
         pHomoSnp(0.0005),
         //
         maxHitLength(1),
-        minCoord(maxValue<unsigned>()),
+        minCoord(std::numeric_limits<unsigned>::max()),
         maxCoord(0),
         windowSize(100000),  // 10000?
         windowBuff(70)
@@ -684,7 +684,7 @@ int readMatchesFromSamBam(
                 options.maxHitLength = endPos - beginPos;
 
             // remember min and max positions seen
-            if(beginPos < (TContigPos)options.minCoord || options.minCoord == maxValue<unsigned>()) options.minCoord = (unsigned)beginPos;
+            if(beginPos < (TContigPos)options.minCoord || options.minCoord == numeric_limits<unsigned>::max()) options.minCoord = (unsigned)beginPos;
             if(endPos > (TContigPos)options.maxCoord) options.maxCoord =  (unsigned)endPos;
 
             // alignedReadStoreElement
diff --git a/apps/bs_tools/casbar_consensus_realign.h b/apps/bs_tools/casbar_consensus_realign.h
index 32511e0..c177c1a 100644
--- a/apps/bs_tools/casbar_consensus_realign.h
+++ b/apps/bs_tools/casbar_consensus_realign.h
@@ -628,7 +628,7 @@ reAlign(FragmentStore<TSpec, TConfig> & fragStore,
 	// Copy all reads belonging to this contig and reverse complement them if necessary.
 	TAlignedReadStore contigReads;  // TODO(holtgrew): Rather contigAlignedReads?
 	TReadPos maxPos = 0;
-	TReadPos minPos = MaxValue<TReadPos>::VALUE;
+	TReadPos minPos = std::numeric_limits<TReadPos>::max();
 	for (; alignIt != alignItEnd; ++alignIt) {
 		if (alignIt->beginPos > alignIt->endPos) {
 			reverseComplement(fragStore.readSeqStore[alignIt->readId]);
diff --git a/apps/bs_tools/casbar_score.h b/apps/bs_tools/casbar_score.h
index 50ece61..ea9cc6b 100644
--- a/apps/bs_tools/casbar_score.h
+++ b/apps/bs_tools/casbar_score.h
@@ -363,16 +363,20 @@ sequenceEntryForScore(Score<TScoreValue, BsTagList<TBsProfileScore, TModel, TCel
 // Modify to use different scoring function at first and last row
 // (end gaps score different)
 // Computes the score and tracks it if enabled.
-template <typename TDPScout, typename TTraceMatrixNavigator, typename TScoreValue, typename TGapCosts,
-          typename TSequenceHValue, typename TSequenceVValue, typename TBsProfileScore, typename TModel, typename TCellDescriptor2, typename TColumnDescriptor,
+template <typename TDPScout, typename TTraceMatrixNavigator,
+          typename TDPCell,
+          typename TSequenceHValue,
+          typename TSequenceVValue,
+          typename TScoreValue, typename TBsProfileScore, typename TModel, typename TCellDescriptor2,
+          typename TColumnDescriptor,
           typename TDPProfile>
 inline void
 _computeCell(TDPScout & scout,
              TTraceMatrixNavigator & traceMatrixNavigator,
-             DPCell_<TScoreValue, TGapCosts> & activeCell,
-             DPCell_<TScoreValue, TGapCosts> const & previousDiagonal,
-             DPCell_<TScoreValue, TGapCosts> const & previousHorizontal,
-             DPCell_<TScoreValue, TGapCosts> const & previousVertical,
+             TDPCell & c,
+             TDPCell & d,
+             TDPCell const & h,
+             TDPCell & v,
              TSequenceHValue const & seqHVal,
              TSequenceVValue const & seqVVal,
              Score<TScoreValue, BsTagList<TBsProfileScore, TModel, TCellDescriptor2> > const & scoringScheme,
@@ -385,7 +389,7 @@ _computeCell(TDPScout & scout,
 
     Score<TScoreValue, BsTagList<TBsProfileScore, TModel, FirstCell> > scoringSchemeDummy(scoringScheme);
     assignValue(traceMatrixNavigator,
-                _computeScore(activeCell, previousDiagonal, previousHorizontal, previousVertical, seqHVal, seqVVal,
+                _computeScore(c, d, h, v, seqHVal, seqVVal,
                               scoringSchemeDummy, typename RecursionDirection_<TMetaColumn, TCellDescriptor>::Type(),
                               TDPProfile()));
 //	std::cout << "("<< activeCell._score << "," << previousDiagonal._score << "," << previousHorizontal._score << "," << previousVertical._score << ") ";
@@ -395,23 +399,28 @@ _computeCell(TDPScout & scout,
         bool isLastRow = And<IsSameType<TCellDescriptor, LastCell>,
                              Or<IsSameType<typename TColumnDescriptor::TLocation, PartialColumnBottom>,
                                 IsSameType<typename TColumnDescriptor::TLocation, FullColumn> > >::VALUE;
-        _scoutBestScore(scout, activeCell, traceMatrixNavigator, isLastColumn, isLastRow);
+        _setVerticalScoreOfCell(c, _verticalScoreOfCell(v));
+        _scoutBestScore(scout, c, traceMatrixNavigator, isLastColumn, isLastRow);
     }
 }
 
 // Modify to use different scoring function at first and last row
 // (end gaps score different)
 // Computes the score and tracks it if enabled.
-template <typename TDPScout, typename TTraceMatrixNavigator, typename TScoreValue, typename TGapCosts,
-          typename TSequenceHValue, typename TSequenceVValue, typename TBsProfileScore, typename TModel, typename TCellDescriptor2, typename TColumnDescriptor,
+template <typename TDPScout, typename TTraceMatrixNavigator,
+          typename TDPCell,
+          typename TSequenceHValue,
+          typename TSequenceVValue,
+          typename TScoreValue, typename TBsProfileScore, typename TModel, typename TCellDescriptor2,
+          typename TColumnDescriptor,
           typename TDPProfile>
 inline void
 _computeCell(TDPScout & scout,
              TTraceMatrixNavigator & traceMatrixNavigator,
-             DPCell_<TScoreValue, TGapCosts> & activeCell,
-             DPCell_<TScoreValue, TGapCosts> const & previousDiagonal,
-             DPCell_<TScoreValue, TGapCosts> const & previousHorizontal,
-             DPCell_<TScoreValue, TGapCosts> const & previousVertical,
+             TDPCell & c,
+             TDPCell & d,
+             TDPCell const & h,
+             TDPCell & v,
              TSequenceHValue const & seqHVal,
              TSequenceVValue const & seqVVal,
              Score<TScoreValue, BsTagList<TBsProfileScore, TModel, TCellDescriptor2> > const & scoringScheme,
@@ -424,7 +433,7 @@ _computeCell(TDPScout & scout,
 
     Score<TScoreValue, BsTagList<TBsProfileScore, TModel, LastCell> > scoringSchemeDummy(scoringScheme);
     assignValue(traceMatrixNavigator,
-                _computeScore(activeCell, previousDiagonal, previousHorizontal, previousVertical, seqHVal, seqVVal,
+                _computeScore(c, d, h, v, seqHVal, seqVVal,
                               scoringSchemeDummy, typename RecursionDirection_<TMetaColumn, TCellDescriptor>::Type(),
                               TDPProfile()));
 //	std::cout << "("<< activeCell._score << "," << previousDiagonal._score << "," << previousHorizontal._score << "," << previousVertical._score << ") ";
@@ -434,7 +443,8 @@ _computeCell(TDPScout & scout,
         bool isLastRow = And<IsSameType<TCellDescriptor, LastCell>,
                              Or<IsSameType<typename TColumnDescriptor::TLocation, PartialColumnBottom>,
                                 IsSameType<typename TColumnDescriptor::TLocation, FullColumn> > >::VALUE;
-        _scoutBestScore(scout, activeCell, traceMatrixNavigator, isLastColumn, isLastRow);
+        _setVerticalScoreOfCell(c, _verticalScoreOfCell(v));
+        _scoutBestScore(scout, c, traceMatrixNavigator, isLastColumn, isLastRow);
     }
 }
 
diff --git a/apps/bs_tools/four2three.cpp b/apps/bs_tools/four2three.cpp
index 44bac30..e6862c2 100644
--- a/apps/bs_tools/four2three.cpp
+++ b/apps/bs_tools/four2three.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                              four2three
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/dfi/CMakeLists.txt b/apps/dfi/CMakeLists.txt
index ee9e7c6..c91dc21 100644
--- a/apps/dfi/CMakeLists.txt
+++ b/apps/dfi/CMakeLists.txt
@@ -10,7 +10,7 @@ cmake_minimum_required (VERSION 3.0.0)
 project (seqan_apps_dfi CXX)
 message (STATUS "Configuring apps/dfi")
 
-set (SEQAN_APP_VERSION "2.1.9")
+set (SEQAN_APP_VERSION "2.1.10")
 
 # ----------------------------------------------------------------------------
 # Dependencies
@@ -56,7 +56,7 @@ endif (NOT SEQAN_PREFIX_SHARE_DOC)
 
 # Install dfi in ${PREFIX}/bin directory
 install (TARGETS dfi
-         DESTINATION bin)
+         DESTINATION ${CMAKE_INSTALL_BINDIR})
 
 # Install non-binary files for the package to "." for app builds and
 # ${PREFIX}/share/doc/dfi for SeqAn release builds.
diff --git a/apps/dfi/README b/apps/dfi/README
index 95e4aad..654e11e 100644
--- a/apps/dfi/README
+++ b/apps/dfi/README
@@ -49,16 +49,14 @@ http://www.seqan.de). To compile DFI on your system do the following:
   5)  cd dfi
   6)  ./dfi --help
 
-Alternatively you can check out the latest SVN version of DFI and SeqAn
+Alternatively you can check out the latest Git version of DFI and SeqAn
 with:
 
-  1)  svn co http://svn.mi.fu-berlin.de/seqan/trunk/seqan
-  2)  cd seqan
-  3)  make forwards
-  4)  cd projects/library/apps
-  5)  make dfi
-  6)  cd dfi
-  7)  ./dfi --help
+  1)  git clone https://github.com/seqan/seqan.git
+  2)  mkdir seqan/buld; cd seqan/build
+  3)  cmake .. -DCMAKE_BUILD_TYPE=Release
+  4)  make dfi
+  5)  ./bin/dfi --help
 
 On success, an executable file dfi was build and a brief usage description
 was dumped.
diff --git a/apps/fiona/CMakeLists.txt b/apps/fiona/CMakeLists.txt
index babd267..15d2043 100644
--- a/apps/fiona/CMakeLists.txt
+++ b/apps/fiona/CMakeLists.txt
@@ -10,7 +10,7 @@ cmake_minimum_required (VERSION 3.0.0)
 project (seqan_apps_fiona CXX)
 message (STATUS "Configuring apps/fiona")
 
-set (SEQAN_APP_VERSION "0.2.9")
+set (SEQAN_APP_VERSION "0.2.10")
 
 # ----------------------------------------------------------------------------
 # Dependencies
@@ -83,7 +83,7 @@ if (NOT SEQAN_PREFIX_SHARE_DOC)
 endif (NOT SEQAN_PREFIX_SHARE_DOC)
 
 # Install fiona in ${PREFIX}/bin directory
-install (TARGETS fiona compute_gain DESTINATION bin)
+install (TARGETS fiona compute_gain DESTINATION ${CMAKE_INSTALL_BINDIR})
 
 # Install non-binary files for the package to "." for app builds and
 # ${PREFIX}/share/doc/fiona for SeqAn release builds.
diff --git a/apps/fiona/compute_gain.cpp b/apps/fiona/compute_gain.cpp
index 2db17a7..26876a8 100644
--- a/apps/fiona/compute_gain.cpp
+++ b/apps/fiona/compute_gain.cpp
@@ -798,7 +798,7 @@ parseCommandLine(Options & options, int argc, char const ** argv)
     addOption(parser, seqan::ArgParseOption("g", "genome", "Genome file.", seqan::ArgParseOption::INPUT_FILE,
                                             "GENOME.fa"));
     setRequired(parser, "genome");
-    setValidValues(parser, "genome", "fa fasta");
+    setValidValues(parser, "genome", seqan::SeqFileIn::getFileExtensions());
 
     addOption(parser, seqan::ArgParseOption("", "pre", "Pre-correction SAM file.", seqan::ArgParseOption::INPUT_FILE,
                                             "PRE.{sam,bam}"));
@@ -956,7 +956,7 @@ int main(int argc, char const ** argv)
     }
 
     String<unsigned> idMap;
-    resize(idMap, length(contigNames(context(inPre))), maxValue<unsigned>());
+    resize(idMap, length(contigNames(context(inPre))), std::numeric_limits<unsigned>::max());
     for (unsigned i = 0; i < length(ids); ++i)
     {
         trimSeqHeaderToId(ids[i]);
@@ -990,9 +990,6 @@ int main(int argc, char const ** argv)
     bool stop = false;
     bool error = false;
 
-    // Format recognition tag used for sequence file I/O.
-    seqan::AutoSeqFormat seqFormatTag;
-
     uint64_t chunksLeftToRead = options.maxChunks;
     --chunksLeftToRead;
 
@@ -1031,10 +1028,10 @@ int main(int argc, char const ** argv)
                     stop = atEnd(inPostBam);
                 else
                     stop = atEnd(inPostFastq);
-                
+
                 if (stop)
                     break;
-                
+
                 // Read next record into chunk.
                 try
                 {
diff --git a/apps/fiona/fiona.cpp b/apps/fiona/fiona.cpp
index b468b16..5aeae30 100644
--- a/apps/fiona/fiona.cpp
+++ b/apps/fiona/fiona.cpp
@@ -994,7 +994,7 @@ inline void fillCorrection(TCorrection &newCorrection,
 {
     //TValue empty=maxValue(readLength);
     //fill Correction struct
-    newCorrection.nextCorrection = maxValue<unsigned>();  // it will be the last correction in the linked list
+    newCorrection.nextCorrection = std::numeric_limits<unsigned>::max();  // it will be the last correction in the linked list
 #ifndef FIONA_CONSENSUS_REDUCE_MEMORY
     newCorrection.correctReadId = correctReadId;        // only for debugging purposes
     newCorrection.correctPos = correctPos;
@@ -1246,7 +1246,7 @@ getFoundCorrections(
     unsigned numCorrections = 0;
 
     TValue currentPos = firstCorrectionForRead[erroneousReadId];
-    while (currentPos != maxValue<TValue>())
+    while (currentPos != std::numeric_limits<TValue>::max())
     {
         if (correctionList[currentPos].errorPos == errorPos)
         {
@@ -1302,9 +1302,9 @@ inline void addCorrectionEntry(String<TCorrection> &correctionList,
     //TValue empty=maxValue(erroneousReadId);
     //first check if a Correction for erroneousReadId exists already
 
-    TValue insertLinkAt = maxValue<TValue>();
+    TValue insertLinkAt = std::numeric_limits<TValue>::max();
     TValue currentPos = firstCorrectionForRead[erroneousReadId];
-    while (currentPos != maxValue<TValue>())
+    while (currentPos != std::numeric_limits<TValue>::max())
     {
         TCorrection &corr = correctionList[currentPos];
         if (existsCorrectionAtPos(
@@ -1354,7 +1354,7 @@ inline void addCorrectionEntry(String<TCorrection> &correctionList,
     }
     appendValue(correctionList, newCorrection);
 
-    if (insertLinkAt == maxValue<TValue>())
+    if (insertLinkAt == std::numeric_limits<TValue>::max())
         firstCorrectionForRead[erroneousReadId] = length(correctionList) - 1;
     else
         correctionList[insertLinkAt].nextCorrection = length(correctionList) - 1;
@@ -1423,7 +1423,7 @@ inline void addCorrectionEntry(String<TCorrection> &correctionList,
         inline void  _testCorrectionStruct(String<TCorrection> &correctionList, String<TValue> &firstCorrectionForRead,TReadStore &store)
 	{
 		// we assume we work with three reads here
-		TValue empty = maxValue<TValue>();
+		TValue empty = std::numeric_limits<TValue>::max();
 		appendValue(firstCorrectionForRead,empty);
 		appendValue(firstCorrectionForRead,empty);
 		appendValue(firstCorrectionForRead,empty);
@@ -1574,12 +1574,12 @@ inline void _dumpCorrectionList(
     for (unsigned int i =0;i< length(firstCorrectionForRead);i++)
     {
         std::cerr << "Found "<<length(correctionList)<<" corrections. Look at readID: " <<i<<std::endl;
-        if (firstCorrectionForRead[i] != maxValue<TValue>())
+        if (firstCorrectionForRead[i] != std::numeric_limits<TValue>::max())
         {
             std::cerr << "found Correction for read "<<i<< " at pos (in String<corrections>) "<< firstCorrectionForRead[i] << std::endl;
             _dumpCorrectionIndelPos(correctionList[firstCorrectionForRead[i]],i,store);
             TValue next = correctionList[firstCorrectionForRead[i]].nextCorrection;
-            while (next != maxValue<TValue>())
+            while (next != std::numeric_limits<TValue>::max())
             {
                 std::cerr << "found Correction for read "<<i<< " at pos (in String<corrections>) "<< next << std::endl;
                 _dumpCorrectionIndelPos(correctionList[next],i,store);
@@ -1699,7 +1699,7 @@ inline unsigned applyReadErrorCorrections(String<TCorrection> const &correctionL
     {
         // descend if correction exists
         TValue corrId = firstCorrectionForRead[readId];
-        if (corrId == maxValue<TValue>())
+        if (corrId == std::numeric_limits<TValue>::max())
             continue;
 
         // step through linked list and collect corrections
@@ -1717,7 +1717,7 @@ inline unsigned applyReadErrorCorrections(String<TCorrection> const &correctionL
 #endif
             //_dumpCorrectionIndelPos(correction, readId);
             corrId = correction.nextCorrection;
-        } while (corrId != maxValue<TValue>());
+        } while (corrId != std::numeric_limits<TValue>::max());
 
         //sorting by Position first to get the best correction per Position
         //sorting is done arbitrarily from large to small(right to left)
@@ -2346,7 +2346,7 @@ void computeCutoffRepeats(
 	TGenomeLen genomelength)
 {
 	clear(thresholds);
-	resize(thresholds, kmax + 1, maxValue<typename Value<TCuttoffs>::Type>());
+	resize(thresholds, kmax + 1, std::numeric_limits<typename Value<TCuttoffs>::Type>::max());
 	for (int i = kmin; i <= kmax; i++)
 		thresholds[i] = OddsRepeatCutoff(odds, expected[i], errorrate, i, genomelength); // Dave: I added "/ 3", otherwise this cutoff seems to have no effect
 }
@@ -3743,11 +3743,11 @@ if (LOOP_LEVEL != 0)
                             if (ordValue(*itE) == 4) continue;
                         #endif
                             if (*itE != *itCLeft)
-                                if (--acceptedMismatchesLeft == MaxValue<unsigned>::VALUE) break;
+                                if (--acceptedMismatchesLeft == std::numeric_limits<unsigned>::max()) break;
                         }
                         
                         // too many mismatches left of the common prefix?
-                        if (acceptedMismatchesLeft == MaxValue<unsigned>::VALUE)
+                        if (acceptedMismatchesLeft == std::numeric_limits<unsigned>::max())
                             continue;
                     #endif
 
@@ -3834,12 +3834,12 @@ if (LOOP_LEVEL != 0)
                                 if (ordValue(*itE) == 4) continue;
                             #endif
                                 if (*itE != *itC)
-                                    if (--acceptedMismatches == MaxValue<unsigned>::VALUE)
+                                    if (--acceptedMismatches == std::numeric_limits<unsigned>::max())
                                         break;
                             }
 
                             // too many mismatches right of the common prefix?
-                            if (acceptedMismatches == MaxValue<unsigned>::VALUE)
+                            if (acceptedMismatches == std::numeric_limits<unsigned>::max())
                                 continue;
 
                             errorsRight = acceptedMismatchesLeft - acceptedMismatches;
@@ -4216,7 +4216,7 @@ unsigned correctReads(
     // if no occurrence exists set the enrty to maxINt Value
     String<unsigned int> firstCorrectionForRead; // should this really be always created anew for different cycles, could be created outside correctReads?
     // we assume we work with three reads here
-    resize(firstCorrectionForRead, readCount, maxValue<unsigned>(), Exact());
+    resize(firstCorrectionForRead, readCount, std::numeric_limits<unsigned>::max(), Exact());
 
     // Determine the number of allowed corrections per round per read, depending on the read length and the
     // configuration in options.relativeErrorsToCorrect.  We set a hard lower limit of 2.
@@ -4356,7 +4356,7 @@ unsigned correctReads(
 	}
     else
     {
-        resize(options.repeatCutoffs, options.toLevel + 2, maxValue<unsigned>());
+        resize(options.repeatCutoffs, options.toLevel + 2, std::numeric_limits<unsigned>::max());
     }
 
     if (options.verbosity >= 2)
@@ -4969,7 +4969,7 @@ unsigned correctReads(
 	unsigned readCorrections=0;
     for (unsigned a = 0; a < length(firstCorrectionForRead); ++a)
     {
-        if (firstCorrectionForRead[a] == maxValue<unsigned>()) continue;
+        if (firstCorrectionForRead[a] == std::numeric_limits<unsigned>::max()) continue;
         ++readCorrections;
     }
 
diff --git a/apps/fiona/index_qgram_parallel.h b/apps/fiona/index_qgram_parallel.h
index ea899c7..42d15b1 100644
--- a/apps/fiona/index_qgram_parallel.h
+++ b/apps/fiona/index_qgram_parallel.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                           index_qgram_parallel.h
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/fx_tools/CMakeLists.txt b/apps/fx_tools/CMakeLists.txt
index b0e9d7e..3323a78 100644
--- a/apps/fx_tools/CMakeLists.txt
+++ b/apps/fx_tools/CMakeLists.txt
@@ -10,7 +10,7 @@ cmake_minimum_required (VERSION 3.0.0)
 project (seqan_apps_fx_tools CXX)
 message (STATUS "Configuring apps/fx_tools")
 
-set (SEQAN_APP_VERSION "0.2.9")
+set (SEQAN_APP_VERSION "0.2.10")
 
 # ----------------------------------------------------------------------------
 # Dependencies
@@ -55,7 +55,7 @@ endif (NOT SEQAN_PREFIX_SHARE_DOC)
 
 # Install fx_tools in ${PREFIX}/bin directory
 install (TARGETS fx_bam_coverage
-         DESTINATION bin)
+         DESTINATION ${CMAKE_INSTALL_BINDIR})
 
 # Install non-binary files for the package to "." for app builds and
 # ${PREFIX}/share/doc/fx_tools for SeqAn release builds.
diff --git a/apps/fx_tools/LICENSE b/apps/fx_tools/LICENSE
index 1194109..0554e01 100644
--- a/apps/fx_tools/LICENSE
+++ b/apps/fx_tools/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
@@ -23,4 +23,4 @@ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGE.
\ No newline at end of file
+DAMAGE.
diff --git a/apps/fx_tools/fx_bam_coverage.cpp b/apps/fx_tools/fx_bam_coverage.cpp
index ab627d6..f6c7602 100644
--- a/apps/fx_tools/fx_bam_coverage.cpp
+++ b/apps/fx_tools/fx_bam_coverage.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                               FX Tools
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/fx_tools/fx_fastq_stats.cpp b/apps/fx_tools/fx_fastq_stats.cpp
index 08598a5..ee29bfe 100644
--- a/apps/fx_tools/fx_fastq_stats.cpp
+++ b/apps/fx_tools/fx_fastq_stats.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                                 FX Tools
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/gustaf/CMakeLists.txt b/apps/gustaf/CMakeLists.txt
index d8ae684..695bac0 100644
--- a/apps/gustaf/CMakeLists.txt
+++ b/apps/gustaf/CMakeLists.txt
@@ -10,7 +10,7 @@ cmake_minimum_required (VERSION 3.0.0)
 project (seqan_apps_gustaf CXX)
 message (STATUS "Configuring apps/gustaf")
 
-set (SEQAN_APP_VERSION "1.0.9")
+set (SEQAN_APP_VERSION "1.0.10")
 
 # ----------------------------------------------------------------------------
 # Dependencies
@@ -77,7 +77,7 @@ endif (NOT SEQAN_PREFIX_SHARE_DOC)
 
 # Install gustaf in ${PREFIX}/bin directory
 install (TARGETS gustaf gustaf_mate_joining
-         DESTINATION bin)
+         DESTINATION ${CMAKE_INSTALL_BINDIR})
 
 # Install non-binary files for the package to "." for app builds and
 # ${PREFIX}/share/doc/gustaf for SeqAn release builds.
diff --git a/apps/gustaf/LICENSE b/apps/gustaf/LICENSE
index f0a1ac4..a09edb3 100644
--- a/apps/gustaf/LICENSE
+++ b/apps/gustaf/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2011-2013, Kathrin Trappe, FU Berlin
+Copyright (c) 2011-2018, Kathrin Trappe, FU Berlin
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
diff --git a/apps/gustaf/README b/apps/gustaf/README
index 6bb02b1..cf39ad2 100644
--- a/apps/gustaf/README
+++ b/apps/gustaf/README
@@ -48,10 +48,10 @@ http://www.seqan.de/downloads/projects.html
 
 Gustaf is distributed with SeqAn - The C++ Sequence Analysis Library (see
 http://www.seqan.de). To build Gustaf yourself, you can check out the latest
-SVN version of Gustaf and SeqAn with:
+Git version of Gustaf and SeqAn with:
 
-  1)  svn co http://svn.mi.fu-berlin.de/seqan/trunk/seqan
-  2)  cd seqan/build/
+  1)  git clone https://github.com/seqan/seqan.git
+  2)  mkdir seqan/buld; cd seqan/build
   3)  cmake .. -DCMAKE_BUILD_TYPE=Release
   4)  make gustaf
   5)  ./bin/gustaf --help
diff --git a/apps/gustaf/create_stellarmatches_from_file.h b/apps/gustaf/create_stellarmatches_from_file.h
index 627ff74..367ff54 100644
--- a/apps/gustaf/create_stellarmatches_from_file.h
+++ b/apps/gustaf/create_stellarmatches_from_file.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                                  Gustaf
 // ==========================================================================
-// Copyright (c) 2011-2013, Kathrin Trappe, FU Berlin
+// Copyright (c) 2011-2018, Kathrin Trappe, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -92,8 +92,8 @@ bool _createStellarMatches(StringSet<TSequence> & queries,
 		TInfix queryInf;
 
 		// Take match query ID and find the right index in queries
-		unsigned iDB = maxValue<unsigned>();     // position of database sequence in databases
-		unsigned iQuery = maxValue<unsigned>();  // position of query/read sequence in queries
+		unsigned iDB = std::numeric_limits<unsigned>::max();     // position of database sequence in databases
+		unsigned iQuery = std::numeric_limits<unsigned>::max();  // position of query/read sequence in queries
 
 		// Takes the short chromosome Id (from the Stellar match file) and looks up the corresponding long chromosome
 		// Id entry from the reference input file
@@ -118,7 +118,7 @@ bool _createStellarMatches(StringSet<TSequence> & queries,
 		}
 		// Sanity check for read and query Id:
 		// skips entry if no corresponding entry in the input file could not be found, else creates StellarMatch object
-		if (iDB == maxValue<unsigned>() || iQuery == maxValue<unsigned>())
+		if (iDB == std::numeric_limits<unsigned>::max() || iQuery == std::numeric_limits<unsigned>::max())
 		{
 		    std::cerr << "Read or database does not exist for match: " << it - begin(lmStore.matchStore, Standard())
 			      << " subjectId: " << lmStore.sequenceNameStore[(*it).subjectId]
diff --git a/apps/gustaf/gustaf.cpp b/apps/gustaf/gustaf.cpp
index ca65387..d4471f5 100644
--- a/apps/gustaf/gustaf.cpp
+++ b/apps/gustaf/gustaf.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                                  Gustaf
 // ==========================================================================
-// Copyright (c) 2011-2014, Kathrin Trappe, FU Berlin
+// Copyright (c) 2011-2018, Kathrin Trappe, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/gustaf/gustaf_matepairs.h b/apps/gustaf/gustaf_matepairs.h
index da382f6..1367fb3 100644
--- a/apps/gustaf/gustaf_matepairs.h
+++ b/apps/gustaf/gustaf_matepairs.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                                  Gustaf
 // ==========================================================================
-// Copyright (c) 2011-2013, Kathrin Trappe, FU Berlin
+// Copyright (c) 2011-2018, Kathrin Trappe, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/gustaf/join_mates.cpp b/apps/gustaf/join_mates.cpp
index ec59287..032d02a 100644
--- a/apps/gustaf/join_mates.cpp
+++ b/apps/gustaf/join_mates.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                                 gustaf_mate_joining
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/gustaf/msplazer.h b/apps/gustaf/msplazer.h
index dfa80eb..20ba16f 100644
--- a/apps/gustaf/msplazer.h
+++ b/apps/gustaf/msplazer.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                                   Gustaf
 // ==========================================================================
-// Copyright (c) 2011-2013, Kathrin Trappe, FU Berlin
+// Copyright (c) 2011-2018, Kathrin Trappe, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -193,15 +193,15 @@ struct Breakpoint
         midPosStrand(false),
         startSeqPos(0),
         endSeqPos(0),
-        dupTargetPos(maxValue<unsigned>()),
-        dupMiddlePos(maxValue<unsigned>()),
+        dupTargetPos(std::numeric_limits<unsigned>::max()),
+        dupMiddlePos(std::numeric_limits<unsigned>::max()),
         readStartPos(0),
         readEndPos(0),
-        cipos(maxValue<unsigned>()),
-        ciend(maxValue<unsigned>()),
-        cimiddle(maxValue<unsigned>()),
+        cipos(std::numeric_limits<unsigned>::max()),
+        ciend(std::numeric_limits<unsigned>::max()),
+        cimiddle(std::numeric_limits<unsigned>::max()),
         support(1),
-        similar(maxValue<unsigned>()),
+        similar(std::numeric_limits<unsigned>::max()),
         svtype(INVALID),
         insertionSeq("NNNN"),
         revStrandDel(false),
@@ -227,15 +227,15 @@ struct Breakpoint
         midPosStrand(false),
         startSeqPos(sPos),
         endSeqPos(ePos),
-        dupTargetPos(maxValue<unsigned>()),
-        dupMiddlePos(maxValue<unsigned>()),
+        dupTargetPos(std::numeric_limits<unsigned>::max()),
+        dupMiddlePos(std::numeric_limits<unsigned>::max()),
         readStartPos(rsPos),
         readEndPos(rePos),
-        cipos(maxValue<unsigned>()),
-        ciend(maxValue<unsigned>()),
-        cimiddle(maxValue<unsigned>()),
+        cipos(std::numeric_limits<unsigned>::max()),
+        ciend(std::numeric_limits<unsigned>::max()),
+        cimiddle(std::numeric_limits<unsigned>::max()),
         support(1),
-        similar(maxValue<unsigned>()),
+        similar(std::numeric_limits<unsigned>::max()),
         svtype(INVALID),
         insertionSeq("NNNN"),
         revStrandDel(false),
@@ -262,15 +262,15 @@ struct Breakpoint
         midPosStrand(false),
         startSeqPos(sPos),
         endSeqPos(ePos),
-        dupTargetPos(maxValue<unsigned>()),
-        dupMiddlePos(maxValue<unsigned>()),
+        dupTargetPos(std::numeric_limits<unsigned>::max()),
+        dupMiddlePos(std::numeric_limits<unsigned>::max()),
         readStartPos(rsPos),
         readEndPos(rePos),
-        cipos(maxValue<unsigned>()),
-        ciend(maxValue<unsigned>()),
-        cimiddle(maxValue<unsigned>()),
+        cipos(std::numeric_limits<unsigned>::max()),
+        ciend(std::numeric_limits<unsigned>::max()),
+        cimiddle(std::numeric_limits<unsigned>::max()),
         support(1),
-        similar(maxValue<unsigned>()),
+        similar(std::numeric_limits<unsigned>::max()),
         svtype(INVALID),
         insertionSeq("NNNN"),
         revStrandDel(false),
@@ -589,7 +589,7 @@ inline bool _breakendSupport(Breakpoint<TId, TPos> & be, Breakpoint<TId, TPos> &
         return false;
     // If bp is duplication or translocation, also check targetpos
     if ((bp.svtype == TBreakpoint::DISPDUPLICATION || bp.svtype == TBreakpoint::TRANSLOCATION || bp.svtype == TBreakpoint::INTERTRANSLOCATION)
-            && bp.dupMiddlePos != maxValue<unsigned>())
+            && bp.dupMiddlePos != std::numeric_limits<unsigned>::max())
         return (_posInSameRange(be.startSeqPos, bp.startSeqPos, range) ||
                 _posInSameRange(be.startSeqPos, bp.endSeqPos, range)   ||
                 _posInSameRange(be.startSeqPos, bp.dupMiddlePos, range) );
@@ -616,7 +616,7 @@ inline bool _similarBreakpoints(Breakpoint<TId, TPos> & bp1, Breakpoint<TId, TPo
                 && _posInSameRange(length(bp1.insertionSeq), length(bp2.insertionSeq), range));
     if (bp1.svtype == TBreakpoint::DISPDUPLICATION || bp1.svtype == TBreakpoint::TRANSLOCATION)
     {
-        if (bp1.dupMiddlePos != maxValue<unsigned>() && bp2.dupMiddlePos != maxValue<unsigned>())
+        if (bp1.dupMiddlePos != std::numeric_limits<unsigned>::max() && bp2.dupMiddlePos != std::numeric_limits<unsigned>::max())
             return (_posInSameRange(bp1.dupMiddlePos, bp2.dupMiddlePos, range)
                     && _posInSameRange(bp1.startSeqPos, bp2.startSeqPos, range)
                     && _posInSameRange(bp1.endSeqPos, bp2.endSeqPos, range));
@@ -679,7 +679,7 @@ TStream & operator<<(TStream & out, Breakpoint<TSequence, TId> const & value)
     out << value.startSeqId << " ( " << value.startSeqStrand << " ) " << " --> " << value.endSeqId << " ( " <<
     value.endSeqStrand << " ) " << std::endl;
     out << " ( " << value.startSeqPos + 1 << " ) --> ( " << value.endSeqPos + 1 << " ) " << std::endl;
-    if (value.dupMiddlePos != maxValue<unsigned>())
+    if (value.dupMiddlePos != std::numeric_limits<unsigned>::max())
         out << "dup middle pos " << value.dupMiddlePos + 1 << std::endl;
     out << " ( " << value.readStartPos + 1 << " ) --> ( " << value.readEndPos + 1 << " ) " << std::endl;
     switch (value.svtype)
diff --git a/apps/gustaf/msplazer_algorithms.h b/apps/gustaf/msplazer_algorithms.h
index 950c407..15be88d 100644
--- a/apps/gustaf/msplazer_algorithms.h
+++ b/apps/gustaf/msplazer_algorithms.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                                  Gustaf
 // ==========================================================================
-// Copyright (c) 2011-2013, Kathrin Trappe, FU Berlin
+// Copyright (c) 2011-2018, Kathrin Trappe, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -424,7 +424,7 @@ void _chainMatches(QueryMatches<StellarMatch<TSequence, TId> > & queryMatches,
                     // Note: old match scores are already distances, new score is a negative score bc. we use scoring sceme (0, -1, -1, -1)
                     auto tmp = _splitAlignmentImpl(row(match1, 0), row(match1, 1), row(match2, 0), row(match2, 1),
                                                    scoreType, AlignConfig<false, false, true, true>());
-                    SEQAN_ASSERT_NEQ(std::get<0>(tmp) + std::get<1>(tmp), maxValue<int>());
+                    SEQAN_ASSERT_NEQ(std::get<0>(tmp) + std::get<1>(tmp), std::numeric_limits<int>::max());
                     score = std::get<0>(tmp) + std::get<1>(tmp) + (static_cast<int>(matchDistanceScores[m1]) + static_cast<int>(matchDistanceScores[m2]));
                     splitPos = endPosition(row(match1, 0)) + stMatch1.begin2;
 
@@ -1305,7 +1305,7 @@ inline void _inferComplexBP(String<TBreakpoint> & globalBreakpoints, TBreakpoint
     // Append breakpoint if new
     if (keepBP)
     {
-        if (bp.similar == maxValue<unsigned>())
+        if (bp.similar == std::numeric_limits<unsigned>::max())
         {
             bp.similar = similarBPId;
             ++similarBPId;
@@ -1339,7 +1339,7 @@ inline void _insertBreakpoint(String<TBreakpoint> & countedBP, TBreakpoint & bp,
         else if (_similarBreakpoints(bp, tempBP, bpPosRange))
         {
             appendSupportId(tempBP, bp.supportIds);
-	    if (bp.dupMiddlePos != maxValue<unsigned>() && tempBP.dupMiddlePos != maxValue<unsigned>()
+	    if (bp.dupMiddlePos != std::numeric_limits<unsigned>::max() && tempBP.dupMiddlePos != std::numeric_limits<unsigned>::max()
 		&& bp.dupMiddlePos < tempBP.dupMiddlePos)
             {
                 tempBP.dupMiddlePos = bp.dupMiddlePos; 
@@ -1358,7 +1358,7 @@ inline void _insertBreakpoint(String<TBreakpoint> & countedBP, TBreakpoint & bp,
     // Append breakpoint if new
     if (newBP)
     {
-        if (bp.similar == maxValue<unsigned>())
+        if (bp.similar == std::numeric_limits<unsigned>::max())
         {
             bp.similar = similarBPId;
             ++similarBPId;
@@ -1504,7 +1504,7 @@ bool _findBestChain(TMSplazerChain & queryChain, String<TMatch> & stellarMatches
         // Getting vertex descriptor of anchestor
         spVertex2 = getProperty(queryChain.predMap, spVertex1);
         // if vertex descriptor has max value then there is no (shortest) path from start to end.
-        if (spVertex2 == maxValue<TVertexDescriptor>())
+        if (spVertex2 == std::numeric_limits<TVertexDescriptor>::max())
         {
             // queryChain.isPartial = true;
             ++bcc;
diff --git a/apps/gustaf/msplazer_main.h b/apps/gustaf/msplazer_main.h
index 83716b7..25454ae 100644
--- a/apps/gustaf/msplazer_main.h
+++ b/apps/gustaf/msplazer_main.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                                    Gustaf
 // ==========================================================================
-// Copyright (c) 2011-2013, Kathrin Trappe, FU Berlin
+// Copyright (c) 2011-2018, Kathrin Trappe, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/gustaf/msplazer_out.h b/apps/gustaf/msplazer_out.h
index bcadb7c..3f0741d 100644
--- a/apps/gustaf/msplazer_out.h
+++ b/apps/gustaf/msplazer_out.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                                  Gustaf
 // ==========================================================================
-// Copyright (c) 2011-2013, Kathrin Trappe, FU Berlin
+// Copyright (c) 2011-2018, Kathrin Trappe, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -227,7 +227,7 @@ inline void _fillGffRecordDuplication(GffRecord & record, TBreakpoint & bp, unsi
     record.ref = sId;
     record.source = "GUSTAF";
     record.type = "duplication";
-    TPos begin, end, target = maxValue<unsigned>();
+    TPos begin, end, target = std::numeric_limits<unsigned>::max();
     // Using set function for VCF duplication to set positions
     _setVcfRecordDuplicationPos(bp, begin, end, target);
     if (begin > end)
@@ -244,7 +244,7 @@ inline void _fillGffRecordDuplication(GffRecord & record, TBreakpoint & bp, unsi
     record.strand = '+';
     appendValue(record.tagNames, "ID");
     appendValue(record.tagValues, toString(id));
-    if (target != maxValue<unsigned>())
+    if (target != std::numeric_limits<unsigned>::max())
     {
         appendValue(record.tagNames, "size");
         appendValue(record.tagValues, toString((end - begin)));
@@ -409,7 +409,7 @@ inline void _fillVcfRecordInsertion(VcfRecord & record, TBreakpoint & bp, TSeque
     ss << "SVTYPE=INS";
     SEQAN_ASSERT_GEQ_MSG(bp.endSeqPos, bp.startSeqPos, "Insertion end position smaller than begin position!");
     ss << ";SVLEN=" << length(bp.insertionSeq);
-    //if (bp.similar != maxValue<unsigned>())
+    //if (bp.similar != std::numeric_limits<unsigned>::max())
         ss << ";BM=" << bp.similar;
     ss << ";DP=" << bp.support;
     record.info = ss.str();
@@ -444,7 +444,7 @@ inline void _fillVcfRecordDeletion(VcfRecord & record, TBreakpoint & bp, TSequen
     ss << ";END=" << bp.endSeqPos + 1 - 1; // 1-base adjustment, -1 bc endPos is behind last variant position
     SEQAN_ASSERT_GEQ_MSG(bp.endSeqPos, bp.startSeqPos, "Deletion end position smaller than begin position!");
     ss << ";SVLEN=-" << bp.endSeqPos-bp.startSeqPos;
-    //if (bp.similar != maxValue<unsigned>())
+    //if (bp.similar != std::numeric_limits<unsigned>::max())
         ss << ";BM=" << bp.similar;
     ss << ";DP=" << bp.support;
     record.info = ss.str();
@@ -481,7 +481,7 @@ inline void _fillVcfRecordInversion(VcfRecord & record, TBreakpoint & bp, TSeque
     ss << ";END=" << bp.endSeqPos + 1 - 1; // 1-base adjustment, -1 bc endPos is behind last variant position
     SEQAN_ASSERT_GEQ_MSG(bp.endSeqPos, bp.startSeqPos, "Inversion end position smaller than begin position!");
     ss << ";SVLEN=" << bp.endSeqPos-bp.startSeqPos;
-    //if (bp.similar != maxValue<unsigned>())
+    //if (bp.similar != std::numeric_limits<unsigned>::max())
         ss << ";BM=" << bp.similar;
     ss << ";DP=" << bp.support;
     record.info = ss.str();
@@ -511,7 +511,7 @@ inline void _fillVcfRecordTandem(VcfRecord & record, TBreakpoint & bp, TSequence
     ss << ";END=" << bp.endSeqPos + 1 - 1; // 1-base adjustment, -1 bc endPos is behind last variant position
     SEQAN_ASSERT_GEQ_MSG(bp.endSeqPos, bp.startSeqPos, "Tandem duplication end position smaller than begin position!");
     ss << ";SVLEN=" << bp.endSeqPos-bp.startSeqPos - 1; // -1 bc positions are flanking the variant region
-    //if (bp.similar != maxValue<unsigned>())
+    //if (bp.similar != std::numeric_limits<unsigned>::max())
         ss << ";BM=" << bp.similar;
     ss << ";DP=" << bp.support;
     record.info = ss.str();
@@ -536,7 +536,7 @@ inline void _fillVcfRecordTandem(VcfRecord & record, TBreakpoint & bp, TSequence
 template <typename TBreakpoint, typename TPos>
 inline bool _setVcfRecordDuplicationPos(TBreakpoint & bp, TPos & begin, TPos & end, TPos & target)
 {
-    if (bp.dupMiddlePos != maxValue<unsigned>())
+    if (bp.dupMiddlePos != std::numeric_limits<unsigned>::max())
     {
 	// Downstream duplication dup(middlePos, endPos, startPos)
         if (bp.dupTargetPos == bp.startSeqPos)
@@ -560,7 +560,7 @@ template <typename TBreakpoint, typename TSequence>
 inline void _fillVcfRecordDuplication(VcfRecord & record, TBreakpoint & bp, TSequence & ref, unsigned id)
 {
     typedef typename TBreakpoint::TPos TPos;
-    TPos begin, end, target = maxValue<unsigned>();
+    TPos begin, end, target = std::numeric_limits<unsigned>::max();
     std::stringstream ss;
     if (!_setVcfRecordDuplicationPos(bp, begin, end, target))
         ss << "IMPRECISE;";
@@ -573,12 +573,12 @@ inline void _fillVcfRecordDuplication(VcfRecord & record, TBreakpoint & bp, TSeq
     ss << "SVTYPE=DUP";
     ss << ";END=" << end - 1 + 1; // -1 to set end as last position of variant, +1 for 1-base adjustment
     SEQAN_ASSERT_GEQ_MSG(bp.endSeqPos, bp.startSeqPos, "Duplication end position smaller than begin position!");
-    if (target != maxValue<unsigned>())
+    if (target != std::numeric_limits<unsigned>::max())
     {
         ss << ";SVLEN=" << end-begin;
         ss << ";TARGETPOS=" << target - 1 + 1; // -1 to set target as position before insertion, +1 for 1-base adjustment
     }
-    //if (bp.similar != maxValue<unsigned>())
+    //if (bp.similar != std::numeric_limits<unsigned>::max())
         ss << ";BM=" << bp.similar;
     ss << ";DP=" << bp.support;
     record.info = ss.str();
@@ -607,7 +607,7 @@ inline void _fillVcfRecordBreakend(VcfRecord & record, TBreakpoint & bp, TSequen
     // ss << "IMPRECISE;";
     ss << "SVTYPE=BND";
     // ss << ";CIPOS=-5,5";
-    //if (bp.similar != maxValue<unsigned>())
+    //if (bp.similar != std::numeric_limits<unsigned>::max())
         //ss << ";BM=" << bp.similar;
     ss << ";DP=" << bp.support;
     record.info = ss.str();
@@ -691,7 +691,7 @@ inline bool _writeVcfTranslocation(VcfFileOut & vcfOut, TBreakpoint & bp, TSeque
     std::stringstream ss;
     ss << "SVTYPE=BND";
     ss << ";EVENT=Trans" << bp_id;
-    //if (bp.similar != maxValue<unsigned>())
+    //if (bp.similar != std::numeric_limits<unsigned>::max())
         ss << ";BM=" << bp.similar;
     ss << ";DP=" << bp.support;
     record.info = ss.str();
@@ -718,7 +718,7 @@ inline bool _writeVcfTranslocation(VcfFileOut & vcfOut, TBreakpoint & bp, TSeque
     }
 
     // Compute ALT columns
-    if (bp.dupMiddlePos != maxValue<unsigned>())
+    if (bp.dupMiddlePos != std::numeric_limits<unsigned>::max())
     {
         _getShortId(sId, bp.midPosId);
         std::stringstream alt1;
@@ -790,7 +790,7 @@ inline bool _writeVcfTranslocation(VcfFileOut & vcfOut, TBreakpoint & bp, TSeque
     clear(record.alt);
 
     // 3rd and 4th entry only exist if the middle (bp.dupMiddlePos) of translocation is known
-    if (bp.dupMiddlePos != maxValue<unsigned>())
+    if (bp.dupMiddlePos != std::numeric_limits<unsigned>::max())
     {
         // 3rd entry
         // 3rd: pos. before second split (dupMiddlePos - 1) ALT: endSeqPos
@@ -922,7 +922,7 @@ inline bool _writeVcfTranslocation(VcfFileOut & vcfOut, TBreakpoint & bp, TSeque
     record.beginPos = bp.endSeqPos;
 
     // Compute ALT columns
-    if (bp.dupMiddlePos != maxValue<unsigned>())
+    if (bp.dupMiddlePos != std::numeric_limits<unsigned>::max())
     {
         std::stringstream alt1;
         if (bp.endSeqStrand != bp.midPosStrand)
@@ -1017,8 +1017,7 @@ void _fillVcfHeader(seqan::VcfHeader & vcfHeader,
         append(contigStr, ">");
         appendValue(vcfHeader, seqan::VcfHeaderRecord("contig", contigStr));
 
-        appendName(contigNames(context(vcfFileOut)), databaseIDs[i],
-                   contigNamesCache(context(vcfFileOut)));
+        appendName(contigNamesCache(context(vcfFileOut)), databaseIDs[i]);
     }
 }
 
@@ -1032,7 +1031,7 @@ int32_t _getrID(StringSet<TId> & databaseIDs, TId dbID)
         if (sID == dbID)
             return static_cast<int32_t>(i);
     }
-    return maxValue<int>();
+    return std::numeric_limits<int>::max();
 }
 
 // Breakpoint writing call
@@ -1070,7 +1069,7 @@ bool _writeGlobalBreakpoints(String<TBreakpoint> & globalBreakpoints,
     }
 
     VcfRecord vcf_record;
-    int32_t id = maxValue<int>();
+    int32_t id = std::numeric_limits<int>::max();
     for (unsigned i = 0; i < length(globalBreakpoints); ++i)
     {
         TBreakpoint & bp = globalBreakpoints[i];
@@ -1097,7 +1096,7 @@ bool _writeGlobalBreakpoints(String<TBreakpoint> & globalBreakpoints,
             } else
             {
                 // extra write function because we have to write 6 records here instead of 1
-                int32_t id2 = maxValue<int>();
+                int32_t id2 = std::numeric_limits<int>::max();
                 id2 = _getrID(databaseIDs, bp.endSeqId);
                 if (_writeVcfTranslocation(vcfOut, bp, databases[id], databases[id2], id, id2, i))
                         std::cerr << "Error while writing breakpoint translocation vcf record!" << std::endl;
diff --git a/apps/gustaf/msplazer_parse_options.h b/apps/gustaf/msplazer_parse_options.h
index 3177ad9..c3a5be8 100644
--- a/apps/gustaf/msplazer_parse_options.h
+++ b/apps/gustaf/msplazer_parse_options.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                                  Gustaf
 // ==========================================================================
-// Copyright (c) 2011-2013, Kathrin Trappe, FU Berlin
+// Copyright (c) 2011-2018, Kathrin Trappe, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/gustaf/stellar_routines.h b/apps/gustaf/stellar_routines.h
index 8aa36e6..68690b9 100644
--- a/apps/gustaf/stellar_routines.h
+++ b/apps/gustaf/stellar_routines.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                                   Gustaf
 // ==========================================================================
-// Copyright (c) 2011-2013, Kathrin Trappe, FU Berlin
+// Copyright (c) 2011-2018, Kathrin Trappe, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/insegt/CMakeLists.txt b/apps/insegt/CMakeLists.txt
index 6adda64..fcd368b 100644
--- a/apps/insegt/CMakeLists.txt
+++ b/apps/insegt/CMakeLists.txt
@@ -10,7 +10,7 @@ cmake_minimum_required (VERSION 3.0.0)
 project (seqan_apps_insegt CXX)
 message (STATUS "Configuring apps/insegt")
 
-set (SEQAN_APP_VERSION "1.1.9")
+set (SEQAN_APP_VERSION "1.1.10")
 
 # ----------------------------------------------------------------------------
 # Dependencies
@@ -61,7 +61,7 @@ endif (NOT SEQAN_PREFIX_SHARE_DOC)
 
 # Install insegt in ${PREFIX}/bin directory
 install (TARGETS insegt
-         DESTINATION bin)
+         DESTINATION ${CMAKE_INSTALL_BINDIR})
 
 # Install non-binary files for the package to "." for app builds and
 # ${PREFIX}/share/doc/insegt for SeqAn release builds.
diff --git a/apps/insegt/LICENSE b/apps/insegt/LICENSE
index 8983afe..0554e01 100644
--- a/apps/insegt/LICENSE
+++ b/apps/insegt/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
diff --git a/apps/insegt/README b/apps/insegt/README
index 0d027a0..15bb528 100644
--- a/apps/insegt/README
+++ b/apps/insegt/README
@@ -42,17 +42,15 @@ INSEGT is distributed with SeqAn - The C++ Sequence Analysis Library (see
 http://www.seqan.de). To build INSEGT do the following:
 
 Follow the "Getting Started" section on http://trac.seqan.de/wiki and check
-out the latest SVN trunk. Instead of creating a project file in Debug mode,
+out the latest Git repo. Instead of creating a project file in Debug mode,
 switch to Release mode (-DCMAKE_BUILD_TYPE=Release) and compile insegt. This
 can be done as follows:
 
-  svn co http://svn.mi.fu-berlin.de/seqan/trunk/seqan seqan-trunk
-  mkdir seqan-trunk-build
-  mkdir seqan-trunk-build/release
-  cd seqan-trunk-build/release
-  cmake ../../seqan-trunk -DCMAKE_BUILD_TYPE=Release
-  make insegt
-
+  1)  git clone https://github.com/seqan/seqan.git
+  2)  mkdir seqan/buld; cd seqan/build
+  3)  cmake .. -DCMAKE_BUILD_TYPE=Release
+  4)  make insegt
+  5)  ./bin/insegt --help
 
 ---------------------------------------------------------------------------
 3. Usage
diff --git a/apps/insegt/base.h b/apps/insegt/base.h
index 198e849..f77145d 100644
--- a/apps/insegt/base.h
+++ b/apps/insegt/base.h
@@ -70,7 +70,7 @@ create_nTuple(TStringSet &tupleSet, FragmentStore<TSpec, TConfig> &fragStore, co
 		itSetEnd = end(tempTupleSet);
 		for ( ; itSet != itSetEnd; goNext(itSet))
 		{
-			appendValue(tupleSet, getValue(itSet), Generous());
+			appendValue(tupleSet, *itSet, Generous());
 		}
 	}
 }
@@ -98,7 +98,7 @@ create_Tuple(TStringSet &tupleSet, FragmentStore<TSpec, TConfig> &fragStore, con
 		itEnd = end(tempTupleSet);
 		for ( ; it != itEnd; goNext(it))
 		{
-			appendValue(tupleSet, getValue(it), Generous());
+			appendValue(tupleSet, *it, Generous());
 		}
 	}
 }
@@ -124,7 +124,7 @@ createCombinations(TStringSet &tupleSet, TStringSet &annoIds)
 		unsigned n = 1;
 		for ( ; itStrSet != itStrSetEnd; goNext(itStrSet))
 		{
-			n = n * length(getValue(itStrSet));
+			n = n * length(*itStrSet);
 		}
 	
 		clear(tupleSet);
diff --git a/apps/insegt/create_gff.h b/apps/insegt/create_gff.h
index 395e659..9715ae5 100644
--- a/apps/insegt/create_gff.h
+++ b/apps/insegt/create_gff.h
@@ -74,14 +74,14 @@ createReadCountGFF(TFile & readOutput, TReadAnnoStore & readAnnoStore, FragmentS
 			
 			itAnnoIds = begin(getValue(itCountStore).annoIds);
 			itAnnoIdsEnd = end(getValue(itCountStore).annoIds);
-			while (itAnnoIds != itAnnoIdsEnd && front(getValue(itAnnoIds)) == INVALID_ID)
+			while (itAnnoIds != itAnnoIdsEnd && front(*itAnnoIds) == INVALID_ID)
 			{
 				goNext(itAnnoIds);
 			}
 	
 			if (itAnnoIds != itAnnoIdsEnd) // not only INVALID_IDS
 			{
-				firstId = front(getValue(itAnnoIds));
+				firstId = front(*itAnnoIds);
 				
 				// orientation:
 				if (getValue(fragStore.annotationStore, firstId).beginPos <= getValue(fragStore.annotationStore, firstId).endPos)
diff --git a/apps/insegt/fusion.h b/apps/insegt/fusion.h
index ae0751f..3832cc4 100644
--- a/apps/insegt/fusion.h
+++ b/apps/insegt/fusion.h
@@ -192,7 +192,7 @@ buildTupleCountStore_Fusion(TTupleCountStore & tupleCountStore,
 										itSecTupleEnd = end(tempSecTupleSet);
 										for ( ; itSecTuple != itSecTupleEnd; goNext(itSecTuple))
 										{										
-											appendValue(secTupleSet, getValue(itSecTuple));
+											appendValue(secTupleSet, *itSecTuple);
 										}
 									}
 								}
@@ -209,25 +209,25 @@ buildTupleCountStore_Fusion(TTupleCountStore & tupleCountStore,
 						itTupleEnd = end(tupleSet);
 						for ( ; itTuple != itTupleEnd; goNext(itTuple))	
 						{
-							firstAnnoId1 = front(getValue(itTuple));
+							firstAnnoId1 = front(*itTuple);
 							erase(value(itTuple), 0);			// first id is not stored; is know by position in tupleCountStore
 
 							// readConnections:
-							if (!empty(getValue(itTuple)))
+							if (!empty(*itTuple))
 							{
-								if (searchValue(pos, getValue(itTuple), getValue(tupleCountStore, firstAnnoId1).readConnections)) 
+								if (searchValue(pos, *itTuple, getValue(tupleCountStore, firstAnnoId1).readConnections))
 									++value(value(tupleCountStore, firstAnnoId1).readConnectionCounts, pos);
 								else 
 								{
 									if (pos != endPosition(getValue(tupleCountStore, firstAnnoId1).readConnections) )
 									{
 										resizeSpace(value(tupleCountStore, firstAnnoId1).readConnections, 1, pos, pos, Generous());
-										assignValue(value(tupleCountStore, firstAnnoId1).readConnections, pos, getValue(itTuple));
+										assignValue(value(tupleCountStore, firstAnnoId1).readConnections, pos, *itTuple);
 										insertValue(value(tupleCountStore, firstAnnoId1).readConnectionCounts, pos, 1, Generous());
 									}
 									else
 									{
-										appendValue(value(tupleCountStore, firstAnnoId1).readConnections, getValue(itTuple), Generous());
+										appendValue(value(tupleCountStore, firstAnnoId1).readConnections, *itTuple, Generous());
 										appendValue(value(tupleCountStore, firstAnnoId1).readConnectionCounts, 1, Generous());
 									}
 								}
@@ -239,29 +239,29 @@ buildTupleCountStore_Fusion(TTupleCountStore & tupleCountStore,
 								itSecTupleEnd = end(secTupleSet);
 								for ( ; itSecTuple != itSecTupleEnd; goNext(itSecTuple) )
 								{
-									matePairTuple = getValue(itTuple);
+									matePairTuple = *itTuple;
 									// INVALID_ID: sign for connection by matepair (apart from that, there are no INVALID_IDs in the list)
 									appendValue(matePairTuple, INVALID_ANNO_ID, Generous());				
-									if (!empty(getValue(itTuple)) && back(getValue(itTuple)) == front(getValue(itSecTuple)) )		// no id 2x allowed
+									if (!empty(*itTuple) && back(*itTuple) == front(*itSecTuple))		// no id 2x allowed
 									{	
 										if (exact_nTuple == 0 && n == 0) erase(value(itSecTuple), 0);
 										else continue;							// tupel would be created double or tupel wouldn't have the length n anymore
 									}
-									append(matePairTuple, getValue(itSecTuple), Generous());
+									append(matePairTuple, *itSecTuple, Generous());
 					
-									if (empty(getValue(itTuple))) 							
+									if (empty(*itTuple))
 									{
 										beginPos1 = getValue(fragStore.annotationStore, firstAnnoId1).beginPos;
 										endPos1 = getValue(fragStore.annotationStore, firstAnnoId1).endPos;
 									}
 									else
 									{
-										beginPos1 = getValue(fragStore.annotationStore, back(getValue(itTuple))).beginPos;
-										endPos1 = getValue(fragStore.annotationStore, back(getValue(itTuple))).endPos;
+										beginPos1 = getValue(fragStore.annotationStore, back(*itTuple)).beginPos;
+										endPos1 = getValue(fragStore.annotationStore, back(*itTuple)).endPos;
 									}
 									// begin position of first annotation in tuple of second read
-									beginPos2 = getValue(fragStore.annotationStore, front(getValue(itSecTuple))).beginPos; 
-									endPos2 = getValue(fragStore.annotationStore, front(getValue(itSecTuple))).endPos;
+									beginPos2 = getValue(fragStore.annotationStore, front(*itSecTuple)).beginPos;
+									endPos2 = getValue(fragStore.annotationStore, front(*itSecTuple)).endPos;
 									if ( (beginPos1 <= endPos1 && endPos1 < beginPos2) ||			// no overlapping annotations allowed
 									     (endPos1 < beginPos1 && beginPos1 < endPos2) )
 									{
@@ -292,37 +292,37 @@ buildTupleCountStore_Fusion(TTupleCountStore & tupleCountStore,
 						itTupleEnd = end(tupleSet);
 						for ( ; itTuple != itTupleEnd; goNext(itTuple))	
 						{
-							firstAnnoId1 = front(getValue(itTuple));
+							firstAnnoId1 = front(*itTuple);
 							erase(value(itTuple), 0);			// first id is not stored; is know by position in tupleCountStore
 			
 							itSecTuple = begin(secTupleSet);
 							itSecTupleEnd = end(secTupleSet);
 							for ( ; itSecTuple != itSecTupleEnd; goNext(itSecTuple) )
 							{
-								matePairTuple = getValue(itTuple);
+								matePairTuple = *itTuple;
 								// INVALID_ID: sign for connection by matepair (apart from that, there are no INVALID_IDs in the list)
 								appendValue(matePairTuple, INVALID_ANNO_ID, Generous());				
-								if (!empty(getValue(itTuple)) && back(getValue(itTuple)) == front(getValue(itSecTuple)) )		// no id 2x allowed
+								if (!empty(*itTuple) && back(*itTuple) == front(*itSecTuple))		// no id 2x allowed
 								{	
 									if (exact_nTuple == 0 && n == 0) erase(value(itSecTuple), 0);
 									else continue;							// tupel would be created double or tupel wouldn't have the length n anymore
 								}
-								append(matePairTuple, getValue(itSecTuple), Generous());
+								append(matePairTuple, *itSecTuple, Generous());
 						
-								if (empty(getValue(itTuple))) 							
+								if (empty(*itTuple))
 								{
 									beginPos1 = getValue(fragStore.annotationStore, firstAnnoId1).beginPos;
 									endPos1 = getValue(fragStore.annotationStore, firstAnnoId1).endPos;
 								}
 								else
 								{
-									beginPos1 = getValue(fragStore.annotationStore, back(getValue(itTuple))).beginPos;
-									endPos1 = getValue(fragStore.annotationStore, back(getValue(itTuple))).endPos;
+									beginPos1 = getValue(fragStore.annotationStore, back(*itTuple)).beginPos;
+									endPos1 = getValue(fragStore.annotationStore, back(*itTuple)).endPos;
 								}
 	
 								// begin position of first annotation in tuple of second read
-								beginPos2 = getValue(fragStore.annotationStore, front(getValue(itSecTuple))).beginPos; 
-								endPos2 = getValue(fragStore.annotationStore, front(getValue(itSecTuple))).endPos;
+								beginPos2 = getValue(fragStore.annotationStore, front(*itSecTuple)).beginPos;
+								endPos2 = getValue(fragStore.annotationStore, front(*itSecTuple)).endPos;
 								if ( (beginPos1 <= endPos1 && endPos1 < beginPos2) ||			// no overlapping annotations allowed
 								     (endPos1 < beginPos1 && beginPos1 < endPos2) )
 								{
diff --git a/apps/insegt/overlap_module.h b/apps/insegt/overlap_module.h
index 79e450c..1a7da0f 100644
--- a/apps/insegt/overlap_module.h
+++ b/apps/insegt/overlap_module.h
@@ -94,9 +94,9 @@ getIdsForRead(TAnnoIds & ids, FragmentStore<TSpec, TConfig> & fragStore, TInterv
 	
 	for ( ; itI != itIEnd; goNext(itI), goNext(itR))
 	{
-		for (unsigned i = 0; i < length(getValue(itR)); ++i)
+		for (unsigned i = 0; i < length(*itR); ++i)
 		{
-			currentId = getValue(getValue(itR), i);
+			currentId = getValue(*itR, i);
 			beginPos = getValue(fragStore.annotationStore, currentId).beginPos;
 			endPos = getValue(fragStore.annotationStore, currentId).endPos;
 			
@@ -138,7 +138,7 @@ getIdsForRead(TAnnoIds & ids, FragmentStore<TSpec, TConfig> & fragStore, TInterv
 				}
 			}
 		}
-		if (empty(getValue(itR)) )  // if aligment-interval doesn't fit to any annotation, append INVALID_ID to mark this
+		if (empty(*itR) )  // if aligment-interval doesn't fit to any annotation, append INVALID_ID to mark this
 			appendValue(value(itR), INVALID_ID, Generous());
 	}
 }
@@ -355,25 +355,25 @@ buildTupleCountStore(TTupleCountStore & tupleCountStore,
 						itTupleEnd = end(tupleSet);
 						for ( ; itTuple != itTupleEnd; goNext(itTuple))	
 						{
-							firstAnnoId1 = front(getValue(itTuple));
+							firstAnnoId1 = front(*itTuple);
 							erase(value(itTuple), 0);			// first id is not stored; is know by position in tupleCountStore
 
 							// readConnections:
-							if (!empty(getValue(itTuple)))
+							if (!empty(*itTuple))
 							{
-								if (searchValue(pos, getValue(itTuple), getValue(tupleCountStore, firstAnnoId1).readConnections)) 
+								if (searchValue(pos, *itTuple, getValue(tupleCountStore, firstAnnoId1).readConnections))
 									++value(value(tupleCountStore, firstAnnoId1).readConnectionCounts, pos);
 								else 
 								{
 									if (pos != endPosition(getValue(tupleCountStore, firstAnnoId1).readConnections) )
 									{
 										resizeSpace(value(tupleCountStore, firstAnnoId1).readConnections, 1, pos, pos, Generous());
-										assignValue(value(tupleCountStore, firstAnnoId1).readConnections, pos, getValue(itTuple));
+										assignValue(value(tupleCountStore, firstAnnoId1).readConnections, pos, *itTuple);
 										insertValue(value(tupleCountStore, firstAnnoId1).readConnectionCounts, pos, 1, Generous());
 									}
 									else
 									{
-										appendValue(value(tupleCountStore, firstAnnoId1).readConnections, getValue(itTuple), Generous());
+										appendValue(value(tupleCountStore, firstAnnoId1).readConnections, *itTuple, Generous());
 										appendValue(value(tupleCountStore, firstAnnoId1).readConnectionCounts, 1, Generous());
 									}
 								}
@@ -385,29 +385,29 @@ buildTupleCountStore(TTupleCountStore & tupleCountStore,
 								itSecTupleEnd = end(secTupleSet);
 								for ( ; itSecTuple != itSecTupleEnd; goNext(itSecTuple) )
 								{
-									matePairTuple = getValue(itTuple);
+									matePairTuple = *itTuple;
 									// INVALID_ID: sign for connection by matepair (apart from that, there are no INVALID_IDs in the list)
 									appendValue(matePairTuple, INVALID_ANNO_ID, Generous());				
-									if (!empty(getValue(itTuple)) && back(getValue(itTuple)) == front(getValue(itSecTuple)) )		// no id 2x allowed
+									if (!empty(*itTuple) && back(*itTuple) == front(*itSecTuple))		// no id 2x allowed
 									{	
 										if (exact_nTuple == 0 && n == 0) erase(value(itSecTuple), 0);
 										else continue;							// tupel would be created double or tupel wouldn't have the length n anymore
 									}
-									append(matePairTuple, getValue(itSecTuple), Generous());
+									append(matePairTuple, *itSecTuple, Generous());
 					
-									if (empty(getValue(itTuple))) 							
+									if (empty(*itTuple))
 									{
 										beginPos1 = getValue(fragStore.annotationStore, firstAnnoId1).beginPos;
 										endPos1 = getValue(fragStore.annotationStore, firstAnnoId1).endPos;
 									}
 									else
 									{
-										beginPos1 = getValue(fragStore.annotationStore, back(getValue(itTuple))).beginPos;
-										endPos1 = getValue(fragStore.annotationStore, back(getValue(itTuple))).endPos;
+										beginPos1 = getValue(fragStore.annotationStore, back(*itTuple)).beginPos;
+										endPos1 = getValue(fragStore.annotationStore, back(*itTuple)).endPos;
 									}
 									// begin position of first annotation in tuple of second read
-									beginPos2 = getValue(fragStore.annotationStore, front(getValue(itSecTuple))).beginPos; 
-									endPos2 = getValue(fragStore.annotationStore, front(getValue(itSecTuple))).endPos;
+									beginPos2 = getValue(fragStore.annotationStore, front(*itSecTuple)).beginPos;
+									endPos2 = getValue(fragStore.annotationStore, front(*itSecTuple)).endPos;
 									if ( (beginPos1 <= endPos1 && endPos1 < beginPos2) ||			// no overlapping annotations allowed
 									     (endPos1 < beginPos1 && beginPos1 < endPos2) )
 									{
diff --git a/apps/mason2/CMakeLists.txt b/apps/mason2/CMakeLists.txt
index eaf4345..2218187 100644
--- a/apps/mason2/CMakeLists.txt
+++ b/apps/mason2/CMakeLists.txt
@@ -10,7 +10,7 @@ cmake_minimum_required (VERSION 3.0.0)
 project (seqan_apps_mason2 CXX)
 message (STATUS "Configuring apps/mason2")
 
-set (SEQAN_APP_VERSION "2.0.8")
+set (SEQAN_APP_VERSION "2.0.9")
 
 # ----------------------------------------------------------------------------
 # Dependencies
@@ -143,7 +143,7 @@ install (TARGETS mason_frag_sequencing
                  mason_simulator
                  mason_splicing
                  mason_variator
-         DESTINATION bin)
+         DESTINATION ${CMAKE_INSTALL_BINDIR})
 
 # Install non-binary files for the package to "." for app builds and
 # ${PREFIX}/share/doc/mason2 for SeqAn release builds.
diff --git a/apps/mason2/LICENSE b/apps/mason2/LICENSE
index 850ba5c..b5a657d 100644
--- a/apps/mason2/LICENSE
+++ b/apps/mason2/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2006-2016, Manuel Holtgrewe, Knut Reinert, FU Berlin
+Copyright (c) 2006-2018, Manuel Holtgrewe, Knut Reinert, FU Berlin
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
diff --git a/apps/mason2/external_split_merge.cpp b/apps/mason2/external_split_merge.cpp
index 6d9314d..0cbf457 100644
--- a/apps/mason2/external_split_merge.cpp
+++ b/apps/mason2/external_split_merge.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                         Mason - A Read Simulator
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -178,15 +178,15 @@ bool SamJoiner::_loadNext(seqan::BamAlignmentRecord & record, unsigned idx)
 
 int SamJoiner::get(seqan::BamAlignmentRecord & record)
 {
-    unsigned idx = seqan::maxValue<unsigned>();
+    unsigned idx = std::numeric_limits<unsigned>::max();
     for (unsigned i = 0; i < length(records); ++i)
     {
         if (!active[i])
             continue;
-        if (idx == seqan::maxValue<unsigned>() || ltBamAlignmentRecord(records[i], records[idx]))
+        if (idx == std::numeric_limits<unsigned>::max() || ltBamAlignmentRecord(records[i], records[idx]))
             idx = i;
     }
-    if (idx == seqan::maxValue<unsigned>())
+    if (idx == std::numeric_limits<unsigned>::max())
         return 1;
 
     // We use double-buffering and the input parameters as buffers.
diff --git a/apps/mason2/external_split_merge.h b/apps/mason2/external_split_merge.h
index e36aaa9..a9a71e8 100644
--- a/apps/mason2/external_split_merge.h
+++ b/apps/mason2/external_split_merge.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                         Mason - A Read Simulator
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -302,15 +302,15 @@ bool FastxJoiner<TTag>::_loadNext(TSeq & id, TSeq & seq, TSeq & qual, unsigned i
 template <typename TTag>
 int FastxJoiner<TTag>::get(seqan::CharString & id, seqan::CharString & seq, seqan::CharString & qual)
 {
-    unsigned idx = seqan::maxValue<unsigned>();
+    unsigned idx = std::numeric_limits<unsigned>::max();
     for (unsigned i = 0; i < length(ids); ++i)
     {
         if (!active[i])
             continue;
-        if (idx == seqan::maxValue<unsigned>() || strnum_cmp(toCString(ids[i]), toCString(ids[idx])) < 0)
+        if (idx == std::numeric_limits<unsigned>::max() || strnum_cmp(toCString(ids[i]), toCString(ids[idx])) < 0)
             idx = i;
     }
-    if (idx == seqan::maxValue<unsigned>())
+    if (idx == std::numeric_limits<unsigned>::max())
         return 1;
 
     // We use double-buffering and the input parameters as buffers.
@@ -331,7 +331,7 @@ int FastxJoiner<TTag>::get(seqan::CharString & id, seqan::CharString & seq, seqa
 
 /* The MIT License
 
-   Copyright (c) 2008-2010 Genome Research Ltd (GRL).
+   Copyright (c) 2008-2018 Genome Research Ltd (GRL).
 
    Permission is hereby granted, free of charge, to any person obtaining
    a copy of this software and associated documentation files (the
diff --git a/apps/mason2/fragment_generation.h b/apps/mason2/fragment_generation.h
index 33bf5de..e10423b 100644
--- a/apps/mason2/fragment_generation.h
+++ b/apps/mason2/fragment_generation.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                         Mason - A Read Simulator
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -96,6 +96,8 @@ public:
     virtual void generateMany(std::vector<Fragment> & frags, int rId, unsigned contigLength,
                               std::vector<std::pair<int, int> > const & gapIntervals,
                               unsigned count) = 0;
+
+    virtual ~FragmentSamplerImpl() = default;
 };
 
 
diff --git a/apps/mason2/genomic_variants.cpp b/apps/mason2/genomic_variants.cpp
index 6d073d7..49eb605 100644
--- a/apps/mason2/genomic_variants.cpp
+++ b/apps/mason2/genomic_variants.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                         Mason - A Read Simulator
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -51,7 +51,7 @@ std::ostream & operator<<(std::ostream & out, SmallIndelRecord const & record)
 int StructuralVariantRecord::endPosition() const
 {
     if (pos == -1)
-        return seqan::MaxValue<int>::VALUE;
+        return std::numeric_limits<int>::max();
 
     switch (kind)
     {
@@ -211,12 +211,12 @@ int VariantMaterializer::_materializeSmallVariants(
     unsigned smallIndelIdx = 0;
     // Current SNP record, default to sentinel.
     SnpRecord snpRecord;
-    snpRecord.rId = seqan::maxValue<int>();
+    snpRecord.rId = std::numeric_limits<int>::max();
     if (snpsIdx < length(variants.snps))
         snpRecord = variants.snps[snpsIdx++];
     // Current small indel record, default to sentinel.
     SmallIndelRecord smallIndelRecord;
-    smallIndelRecord.rId = seqan::maxValue<int>();
+    smallIndelRecord.rId = std::numeric_limits<int>::max();
     if (smallIndelIdx < length(variants.smallIndels))
         smallIndelRecord = variants.smallIndels[smallIndelIdx++];
     // Track last position from contig appended to seq so far.
@@ -227,7 +227,7 @@ int VariantMaterializer::_materializeSmallVariants(
     // TODO(holtgrew): Extract contig building into their own functions.
     if (verbosity >= 2)
         std::cerr << "building output\n";
-    while (snpRecord.rId != seqan::maxValue<int>() || smallIndelRecord.rId != seqan::maxValue<int>())
+    while (snpRecord.rId != std::numeric_limits<int>::max() || smallIndelRecord.rId != std::numeric_limits<int>::max())
     {
         // TODO(holtgrew): Extract SNP and small indel handling into their own functions.
         if (snpRecord.getPos() < smallIndelRecord.getPos())  // process SNP records
@@ -259,7 +259,7 @@ int VariantMaterializer::_materializeSmallVariants(
             }
 
             if (snpsIdx >= length(variants.snps))
-                snpRecord.rId = seqan::maxValue<int>();
+                snpRecord.rId = std::numeric_limits<int>::max();
             else
                 snpRecord = variants.snps[snpsIdx++];
         }
@@ -337,7 +337,7 @@ int VariantMaterializer::_materializeSmallVariants(
             }
 
             if (smallIndelIdx >= length(variants.smallIndels))
-                smallIndelRecord.rId = seqan::maxValue<int>();
+                smallIndelRecord.rId = std::numeric_limits<int>::max();
             else
                 smallIndelRecord = variants.smallIndels[smallIndelIdx++];
         }
@@ -704,7 +704,7 @@ int VariantMaterializer::_materializeLargeVariants(
 
 bool PositionMap::overlapsWithBreakpoint(int svBeginPos, int svEndPos) const
 {
-    std::set<std::pair<int, int> >::const_iterator it = svBreakpoints.upper_bound(std::make_pair(svBeginPos, seqan::maxValue<int>()));
+    std::set<std::pair<int, int> >::const_iterator it = svBreakpoints.upper_bound(std::make_pair(svBeginPos, std::numeric_limits<int>::max()));
     return (it != svBreakpoints.end() && it->first < svEndPos);
 }
 
@@ -856,14 +856,14 @@ void PositionMap::reinit(TJournalEntries const & journal)
     SEQAN_ASSERT_NEQ(it->segmentSource, seqan::SOURCE_NULL);
     SEQAN_ASSERT_EQ(it->virtualPosition, 0u);
 
-    unsigned lastRefPos = seqan::MaxValue<unsigned>::VALUE;  // Previous position from reference.
+    unsigned lastRefPos = std::numeric_limits<unsigned>::max();  // Previous position from reference.
     for (; it != end(journal, seqan::Standard()); ++it)
     {
         // std::cerr << *it << "\n";
         SEQAN_ASSERT_NEQ(it->segmentSource, seqan::SOURCE_NULL);
         if (it->segmentSource == seqan::SOURCE_ORIGINAL)
         {
-            if (lastRefPos == seqan::maxValue<unsigned>())
+            if (lastRefPos == std::numeric_limits<unsigned>::max())
             {
                 if (it->physicalPosition != 0)
                 {
diff --git a/apps/mason2/genomic_variants.h b/apps/mason2/genomic_variants.h
index 63dbb84..31d43f7 100644
--- a/apps/mason2/genomic_variants.h
+++ b/apps/mason2/genomic_variants.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                         Mason - A Read Simulator
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/mason2/individual_genome.h b/apps/mason2/individual_genome.h
index f5d7ad6..7863067 100644
--- a/apps/mason2/individual_genome.h
+++ b/apps/mason2/individual_genome.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                         Mason - A Read Simulator
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/mason2/mason_frag_sequencing.cpp b/apps/mason2/mason_frag_sequencing.cpp
index 2a745cc..06c6a9f 100644
--- a/apps/mason2/mason_frag_sequencing.cpp
+++ b/apps/mason2/mason_frag_sequencing.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                         Mason - A Read Simulator
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/mason2/mason_genome.cpp b/apps/mason2/mason_genome.cpp
index 76383cc..b0f83ce 100644
--- a/apps/mason2/mason_genome.cpp
+++ b/apps/mason2/mason_genome.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                         Mason - A Read Simulator
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -115,7 +115,7 @@ parseCommandLine(MasonGenomeOptions & options, int argc, char const ** argv)
     addSection(parser, "Output Options");
     addOption(parser, seqan::ArgParseOption("o", "out-file", "Output file.",
                                             seqan::ArgParseOption::OUTPUT_FILE, "FILE"));
-    setValidValues(parser, "out-file", "fa fasta");
+    setValidValues(parser, "out-file", seqan::SeqFileOut::getFileExtensions());
     setRequired(parser, "out-file");
 
     // Add Examples Section.
diff --git a/apps/mason2/mason_materializer.cpp b/apps/mason2/mason_materializer.cpp
index 84d2bbf..3252762 100644
--- a/apps/mason2/mason_materializer.cpp
+++ b/apps/mason2/mason_materializer.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                         Mason - A Read Simulator
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -118,7 +118,7 @@ public:
                     throw MasonIOException("Could not open methylation output file.");
             }
         }
-        catch (MasonIOException e)
+        catch (MasonIOException & e)
         {
             std::cerr << "\nERROR: " << e.what() << "\n";
             return 1;
diff --git a/apps/mason2/mason_methylation.cpp b/apps/mason2/mason_methylation.cpp
index a50c1c5..fe7b9bc 100644
--- a/apps/mason2/mason_methylation.cpp
+++ b/apps/mason2/mason_methylation.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                         Mason - A Read Simulator
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/mason2/mason_options.cpp b/apps/mason2/mason_options.cpp
index 6742317..4d5e30d 100644
--- a/apps/mason2/mason_options.cpp
+++ b/apps/mason2/mason_options.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                         Mason - A Read Simulator
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -335,12 +335,12 @@ void MaterializerOptions::addOptions(seqan::ArgumentParser & parser) const
 
     addOption(parser, seqan::ArgParseOption("ir", "input-reference", "Path to FASTA file to read the reference from.",
                                             seqan::ArgParseOption::INPUT_FILE, "IN.fa"));
-    setValidValues(parser, "input-reference", "fa fasta");
+    setValidValues(parser, "input-reference", seqan::SeqFileIn::getFileExtensions());
     setRequired(parser, "input-reference");
 
     addOption(parser, seqan::ArgParseOption("iv", "input-vcf", "Path to the VCF file with variants to apply.",
                                             seqan::ArgParseOption::INPUT_FILE, "IN.vcf"));
-    setValidValues(parser, "input-vcf", "vcf");
+    setValidValues(parser, "input-vcf", seqan::VcfFileIn::getFileExtensions());
 }
 
 // ----------------------------------------------------------------------------
@@ -700,12 +700,12 @@ void IlluminaSequencingOptions::addOptions(seqan::ArgumentParser & parser) const
     addOption(parser, seqan::ArgParseOption("", "illumina-left-template-fastq",
                                             "FASTQ file to use for a template for left-end reads.",
                                             seqan::ArgParseOption::INPUT_FILE, "IN.fq"));
-    setValidValues(parser, "illumina-left-template-fastq", "fq fastq fq.gz fastq.gz");
+    setValidValues(parser, "illumina-left-template-fastq", seqan::SeqFileIn::getFileExtensions());
 
     addOption(parser, seqan::ArgParseOption("", "illumina-right-template-fastq",
                                             "FASTQ file to use for a template for right-end reads.",
                                             seqan::ArgParseOption::INPUT_FILE, "IN.fq"));
-    setValidValues(parser, "illumina-right-template-fastq", "fq fastq fq.gz fastq.gz");
+    setValidValues(parser, "illumina-right-template-fastq", seqan::SeqFileIn::getFileExtensions());
 }
 
 // ----------------------------------------------------------------------------
@@ -1113,20 +1113,20 @@ void MasonSimulatorOptions::addOptions(seqan::ArgumentParser & parser) const
 
     addOption(parser, seqan::ArgParseOption("", "meth-fasta-in", "FASTA file with methylation levels of the input file.",
                                             seqan::ArgParseOption::INPUT_FILE, "IN"));
-    setValidValues(parser, "meth-fasta-in", "fa fasta");
+    setValidValues(parser, "meth-fasta-in", seqan::SeqFileIn::getFileExtensions());
 
     addOption(parser, seqan::ArgParseOption("o", "out", "Output of single-end/left end reads.",
                                             seqan::ArgParseOption::OUTPUT_FILE, "OUT"));
     setRequired(parser, "out");
-    setValidValues(parser, "out", "fa fasta fq fastq fq.gz fastq.gz");
+    setValidValues(parser, "out", seqan::SeqFileOut::getFileExtensions());
 
     addOption(parser, seqan::ArgParseOption("or", "out-right", "Output of right reads.  Giving this options enables "
                                             "paired-end simulation.", seqan::ArgParseOption::OUTPUT_FILE, "OUT2"));
-    setValidValues(parser, "out-right", "fa fasta fq fastq fq.gz fastq.gz");
+    setValidValues(parser, "out-right", seqan::SeqFileOut::getFileExtensions());
 
     addOption(parser, seqan::ArgParseOption("oa", "out-alignment", "SAM/BAM file with alignments.",
                                             seqan::ArgParseOption::OUTPUT_FILE, "OUT"));
-    setValidValues(parser, "out-alignment", "sam bam");
+    setValidValues(parser, "out-alignment", seqan::BamFileOut::getFileExtensions());
 
     // Add options of the component options.
     matOptions.addOptions(parser);
@@ -1315,7 +1315,7 @@ void MasonMaterializerOptions::addOptions(seqan::ArgumentParser & parser) const
     addOption(parser, seqan::ArgParseOption("o", "out", "Output of materialized contigs.",
                                             seqan::ArgParseOption::OUTPUT_FILE, "OUT"));
     setRequired(parser, "out");
-    setValidValues(parser, "out", "fa fasta");
+    setValidValues(parser, "out", seqan::SeqFileOut::getFileExtensions());
 
     addOption(parser, seqan::ArgParseOption("", "out-breakpoints", "TSV file to write breakpoints in variants to.",
                                             seqan::ArgParseOption::OUTPUT_FILE, "TSV"));
@@ -1328,11 +1328,11 @@ void MasonMaterializerOptions::addOptions(seqan::ArgumentParser & parser) const
 
     addOption(parser, seqan::ArgParseOption("", "meth-fasta-in", "FASTA file with methylation levels of the input file.",
                                             seqan::ArgParseOption::INPUT_FILE, "IN"));
-    setValidValues(parser, "meth-fasta-in", "fa fasta");
+    setValidValues(parser, "meth-fasta-in", seqan::SeqFileIn::getFileExtensions());
 
     addOption(parser, seqan::ArgParseOption("", "meth-fasta-out", "FASTA file with methylation levels of the output file.",
                                             seqan::ArgParseOption::OUTPUT_FILE, "OUT"));
-    setValidValues(parser, "meth-fasta-out", "fa fasta");
+    setValidValues(parser, "meth-fasta-out", seqan::SeqFileOut::getFileExtensions());
 
     // Add options of the component options.
     matOptions.addOptions(parser);
@@ -1429,7 +1429,7 @@ void MasonSplicingOptions::addOptions(seqan::ArgumentParser & parser) const
     addOption(parser, seqan::ArgParseOption("o", "out", "Output of materialized contigs.",
                                             seqan::ArgParseOption::OUTPUT_FILE, "OUT"));
     setRequired(parser, "out");
-    setValidValues(parser, "out", "fa fasta");
+    setValidValues(parser, "out", seqan::SeqFileOut::getFileExtensions());
 
     addOption(parser, seqan::ArgParseOption("", "haplotype-name-sep",
                                             "String separating contig name from haplotype number.",
@@ -1439,7 +1439,7 @@ void MasonSplicingOptions::addOptions(seqan::ArgumentParser & parser) const
     addOption(parser, seqan::ArgParseOption("ig", "in-gff", "Path to input GFF or GTF file, must be "
                                             "sorted by reference name.",
                                             seqan::ArgParseOption::INPUT_FILE, "IN.gff"));
-    setValidValues(parser, "in-gff", "gff gtf");
+    setValidValues(parser, "in-gff", seqan::GffFileIn::getFileExtensions());
     setRequired(parser, "in-gff");
 
     addOption(parser, seqan::ArgParseOption("", "gff-type", "Splicing will filter to the records that have this type.",
@@ -1533,18 +1533,18 @@ void MasonFragmentSequencingOptions::addOptions(seqan::ArgumentParser & parser)
     setDefaultValue(parser, "seed", "0");
 
     addOption(parser, seqan::ArgParseOption("i", "in", "Path to input file.",
-                                            seqan::ArgParseOption::INPUT_FILE, "OUT"));
+                                            seqan::ArgParseOption::INPUT_FILE, "IN"));
     setRequired(parser, "in");
-    setValidValues(parser, "in", "fa fasta");
+    setValidValues(parser, "in", seqan::SeqFileIn::getFileExtensions());
 
     addOption(parser, seqan::ArgParseOption("o", "out", "Output of single-end/left end reads.",
                                             seqan::ArgParseOption::OUTPUT_FILE, "OUT"));
     setRequired(parser, "out");
-    setValidValues(parser, "out", "fa fasta fq fastq fq.gz fastq.gz");
+    setValidValues(parser, "out", seqan::SeqFileOut::getFileExtensions());
 
     addOption(parser, seqan::ArgParseOption("or", "out-right", "Output of right reads.  Giving this options enables "
                                             "paired-end simulation.", seqan::ArgParseOption::OUTPUT_FILE, "OUT2"));
-    setValidValues(parser, "out-right", "fa fasta fq fastq fq.gz fastq.gz");
+    setValidValues(parser, "out-right", seqan::SeqFileOut::getFileExtensions());
 
     addOption(parser, seqan::ArgParseOption("", "force-single-end", "Force single-end simulation although --out-right "
                                             "is given."));
@@ -1651,12 +1651,12 @@ void MasonMethylationOptions::addOptions(seqan::ArgumentParser & parser) const
     addOption(parser, seqan::ArgParseOption("i", "in", "Input FASTA file with genome.",
                                             seqan::ArgParseOption::INPUT_FILE, "IN.fa"));
     setRequired(parser, "in");
-    setValidValues(parser, "in", "fa fasta");
+    setValidValues(parser, "in", seqan::SeqFileIn::getFileExtensions());
 
     addOption(parser, seqan::ArgParseOption("o", "out", "Input FASTA file with genome.",
                                             seqan::ArgParseOption::INPUT_FILE, "OUT.fa"));
     setRequired(parser, "out");
-    setValidValues(parser, "out", "fa fasta");
+    setValidValues(parser, "out", seqan::SeqFileOut::getFileExtensions());
 
     // Add options of the component options.
     methOptions.addOptions(parser);
diff --git a/apps/mason2/mason_options.h b/apps/mason2/mason_options.h
index 8d68330..75429c1 100644
--- a/apps/mason2/mason_options.h
+++ b/apps/mason2/mason_options.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                         Mason - A Read Simulator
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -50,6 +50,10 @@
 
 #include <seqan/arg_parse.h>
 #include <seqan/sequence.h>
+#include <seqan/seq_io.h>
+#include <seqan/bam_io.h>
+#include <seqan/gff_io.h>
+#include <seqan/vcf_io.h>
 
 #include "mason_types.h"
 
diff --git a/apps/mason2/mason_simulator.cpp b/apps/mason2/mason_simulator.cpp
index 24d1736..6d1b34f 100644
--- a/apps/mason2/mason_simulator.cpp
+++ b/apps/mason2/mason_simulator.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                         Mason - A Read Simulator
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -237,7 +237,7 @@ public:
         setClippedBeginPosition(gapsContig, countGaps(begin(gapsRead, seqan::Standard())));
         setClippedBeginPosition(gapsRead, countGaps(begin(gapsRead, seqan::Standard())));
 
-        getCigarString(record.cigar, gapsContig, gapsRead, seqan::maxValue<int>());
+        getCigarString(record.cigar, gapsContig, gapsRead, std::numeric_limits<int>::max());
         getMDString(mdString, gapsContig, gapsRead);
     }
 
@@ -558,7 +558,7 @@ public:
         setClippedBeginPosition(gapsContig, countGaps(begin(gapsRead, seqan::Standard())));
         setClippedBeginPosition(gapsRead, countGaps(begin(gapsRead, seqan::Standard())));
 
-        getCigarString(record.cigar, gapsContig, gapsRead, seqan::maxValue<int>());
+        getCigarString(record.cigar, gapsContig, gapsRead, std::numeric_limits<int>::max());
         getMDString(mdString, gapsContig, gapsRead);
     }
 
diff --git a/apps/mason2/mason_splicing.cpp b/apps/mason2/mason_splicing.cpp
index 7e109ae..72fc26b 100644
--- a/apps/mason2/mason_splicing.cpp
+++ b/apps/mason2/mason_splicing.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                         Mason - A Read Simulator
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -67,11 +67,11 @@ public:
 
     static const int INVALID_IDX;
 
-    MyGffRecord() : seqan::GffRecord(), rID(seqan::maxValue<int>())
+    MyGffRecord() : seqan::GffRecord(), rID(std::numeric_limits<int>::max())
     {}
 };
 
-const int MyGffRecord::INVALID_IDX = seqan::maxValue<int>();
+const int MyGffRecord::INVALID_IDX = std::numeric_limits<int>::max();
 
 // --------------------------------------------------------------------------
 // Class SplicingInstruction
@@ -152,7 +152,7 @@ public:
             if (!open(gffFileIn, toCString(options.inputGffFile)))
                 throw MasonIOException("Could not open GFF/GTF file.");
         }
-        catch (MasonIOException e)
+        catch (MasonIOException & e)
         {
             std::cerr << "\nERROR: " << e.what() << "\n";
             return 1;
@@ -166,7 +166,7 @@ public:
         // Read first GFF record.
         MyGffRecord record;
         _readFirstRecord(record);
-        if (record.rID == seqan::maxValue<int>())
+        if (record.rID == std::numeric_limits<int>::max())
             return 0;  // at end, could not read any, done
 
         // Transcript names.
@@ -185,7 +185,7 @@ public:
 
         // Read GFF/GTF file contig by contig (must be sorted by reference name).  For each contig, we all recors,
         // create simulation instructions and then build the transcripts for each haplotype.
-        while (record.rID != seqan::maxValue<int>())  // sentinel, at end
+        while (record.rID != std::numeric_limits<int>::max())  // sentinel, at end
         {
             seqan::CharString refName = record.ref;
             std::cerr << "Splicing for " << refName << " ...";
@@ -206,7 +206,7 @@ public:
 
                 if (atEnd(gffFileIn))
                 {
-                    record.rID = seqan::maxValue<int>();
+                    record.rID = std::numeric_limits<int>::max();
                     break;
                 }
 
@@ -362,10 +362,10 @@ public:
         {
             if (empty(ss[i]))
                 continue;
-            if (!getIdByName(contigNames, ss[i], idx, cache))
+            if (!getIdByName(idx, cache, ss[i]))
             {
                 appendValue(tIDs, length(contigNames));
-                appendName(contigNames, ss[i], cache);
+                appendName(cache, ss[i]);
             }
             else
             {
@@ -396,7 +396,7 @@ public:
             }
         }
         if (!found)
-            record.rID = seqan::maxValue<int>();
+            record.rID = std::numeric_limits<int>::max();
     }
 };
 
diff --git a/apps/mason2/mason_tests.cpp b/apps/mason2/mason_tests.cpp
index 49e8968..34b55bd 100644
--- a/apps/mason2/mason_tests.cpp
+++ b/apps/mason2/mason_tests.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                         Mason - A Read Simulator
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/mason2/mason_types.h b/apps/mason2/mason_types.h
index 6415226..e695bc5 100644
--- a/apps/mason2/mason_types.h
+++ b/apps/mason2/mason_types.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                         Mason - A Read Simulator
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/mason2/mason_variator.cpp b/apps/mason2/mason_variator.cpp
index b3e8b26..a747cb8 100644
--- a/apps/mason2/mason_variator.cpp
+++ b/apps/mason2/mason_variator.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                         Mason - A Read Simulator
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -710,7 +710,7 @@ public:
     {
         if (isNearN(seq, pos))
             return false;  // No SNP next to an N.
-        
+
         // We simulate an alternative base for each haplotype.
 
         seqan::Dna5 from = seq[pos];
@@ -1136,30 +1136,30 @@ public:
         unsigned svIdx = 0;
         // Current SNP record, default to sentinel.
         SnpRecord snpRecord;
-        snpRecord.rId = seqan::maxValue<int>();
+        snpRecord.rId = std::numeric_limits<int>::max();
         if (snpsIdx < length(variants.snps))
             snpRecord = variants.snps[snpsIdx++];
         // Current small indel record, default to sentinel.
         SmallIndelRecord smallIndelRecord;
-        smallIndelRecord.rId = seqan::maxValue<int>();
+        smallIndelRecord.rId = std::numeric_limits<int>::max();
         if (smallIndelIdx < length(variants.smallIndels))
             smallIndelRecord = variants.smallIndels[smallIndelIdx++];
         // Current SV record, default to sentinel.
         StructuralVariantRecord svRecord;
-        svRecord.rId = seqan::maxValue<int>();
+        svRecord.rId = std::numeric_limits<int>::max();
         if (svIdx < length(variants.svRecords))
             svRecord = variants.svRecords[svIdx++];
-        while (snpRecord.rId != seqan::maxValue<int>() ||
-               smallIndelRecord.rId != seqan::maxValue<int>() ||
-               svRecord.rId != seqan::maxValue<int>())
+        while (snpRecord.rId != std::numeric_limits<int>::max() ||
+               smallIndelRecord.rId != std::numeric_limits<int>::max() ||
+               svRecord.rId != std::numeric_limits<int>::max())
         {
-            if (snpRecord.rId != seqan::maxValue<int>() && smallIndelRecord.rId != seqan::maxValue<int>())
+            if (snpRecord.rId != std::numeric_limits<int>::max() && smallIndelRecord.rId != std::numeric_limits<int>::max())
                 SEQAN_ASSERT(snpRecord.getPos() != smallIndelRecord.getPos());  // are generated indendently
-            if (snpRecord.rId != seqan::maxValue<int>() && svRecord.rId != seqan::maxValue<int>())
+            if (snpRecord.rId != std::numeric_limits<int>::max() && svRecord.rId != std::numeric_limits<int>::max())
                 SEQAN_ASSERT_MSG(snpRecord.getPos() != svRecord.getPos(),
                                  "Should be generated non-overlapping (snp pos = %d, sv pos = %d).",
                                  snpRecord.pos, svRecord.pos);
-            if (smallIndelRecord.rId != seqan::maxValue<int>() && svRecord.rId != seqan::maxValue<int>())
+            if (smallIndelRecord.rId != std::numeric_limits<int>::max() && svRecord.rId != std::numeric_limits<int>::max())
                 SEQAN_ASSERT(smallIndelRecord.getPos() != svRecord.getPos());  // are generated indendently
             SEQAN_ASSERT_NEQ(snpRecord.pos, 0);   // Not simulated, VCF complexer.
             SEQAN_ASSERT_NEQ(svRecord.pos, 0);   // Not simulated, VCF complexer.
@@ -1206,7 +1206,7 @@ public:
                 }
 
                 if (svIdx >= length(variants.svRecords))
-                    svRecord.rId = seqan::maxValue<int>();
+                    svRecord.rId = std::numeric_limits<int>::max();
                 else
                     svRecord = variants.svRecords[svIdx++];
             }
@@ -1242,11 +1242,11 @@ public:
             inTos[ordValue(seqan::Dna5(snpRecord.to))] = true;
 
             if (snpsIdx >= length(variants.snps))
-                snpRecord.rId = seqan::maxValue<int>();
+                snpRecord.rId = std::numeric_limits<int>::max();
             else
                 snpRecord = variants.snps[snpsIdx++];
         }
-        while (snpRecord.rId != seqan::maxValue<int>() &&
+        while (snpRecord.rId != std::numeric_limits<int>::max() &&
                snpsIdx < length(variants.snps) &&
                snpRecord.getPos() == pos);
 
@@ -1313,11 +1313,11 @@ public:
             appendValue(records, smallIndelRecord);
 
             if (smallIndelIdx >= length(variants.smallIndels))
-                smallIndelRecord.rId = seqan::maxValue<int>();
+                smallIndelRecord.rId = std::numeric_limits<int>::max();
             else
                 smallIndelRecord = variants.smallIndels[smallIndelIdx++];
         }
-        while (smallIndelRecord.rId != seqan::maxValue<int>() &&
+        while (smallIndelRecord.rId != std::numeric_limits<int>::max() &&
                smallIndelIdx < length(variants.smallIndels) &&
                smallIndelRecord.getPos() == variants.smallIndels[smallIndelIdx].getPos());
         SEQAN_ASSERT_NOT(empty(records));
@@ -1575,7 +1575,7 @@ public:
 
         vcfRecord.rID = svRecord.rId;
         vcfRecord.beginPos = svRecord.pos - 1;
-        vcfRecord.id = variants.getVariantName(variants.posToIdx(Variants::SV, svIdx)); 
+        vcfRecord.id = variants.getVariantName(variants.posToIdx(Variants::SV, svIdx));
         appendValue(vcfRecord.ref, contig[vcfRecord.beginPos]);
         vcfRecord.alt = "<INV>";
         vcfRecord.filter = "PASS";
@@ -1613,7 +1613,7 @@ public:
         seqan::VcfRecord vcfRecord;
         vcfRecord.rID = svRecord.rId;
         vcfRecord.beginPos = svRecord.pos - 1;
-        vcfRecord.id = variants.getVariantName(variants.posToIdx(Variants::SV, svIdx)); 
+        vcfRecord.id = variants.getVariantName(variants.posToIdx(Variants::SV, svIdx));
         vcfRecord.filter = "PASS";
         std::stringstream ss;
         ss << "SVTYPE=DUP;SVLEN=" << svRecord.size << ";END=" << svRecord.pos + svRecord.size
@@ -1814,12 +1814,12 @@ parseCommandLine(MasonVariatorOptions & options, int argc, char const ** argv)
     addOption(parser, seqan::ArgParseOption("", "meth-fasta-in", "Path to load original methylation levels from.  "
                                             "Methylation levels are simulated if omitted.",
                                             seqan::ArgParseOption::INPUT_FILE, "FILE"));
-    setValidValues(parser, "meth-fasta-in", "fa fasta");
+    setValidValues(parser, "meth-fasta-in", seqan::SeqFileIn::getFileExtensions());
 
     addOption(parser, seqan::ArgParseOption("", "meth-fasta-out", "Path to write methylation levels to as FASTA.  "
                                             "Only written if \\fB-of\\fP/\\fB--out-fasta\\fP is given.",
                                             seqan::ArgParseOption::OUTPUT_FILE, "FILE"));
-    setValidValues(parser, "meth-fasta-out", "fa fasta");
+    setValidValues(parser, "meth-fasta-out", seqan::SeqFileOut::getFileExtensions());
 
 
     // ----------------------------------------------------------------------
diff --git a/apps/mason2/methylation_levels.cpp b/apps/mason2/methylation_levels.cpp
index 4894440..13cc353 100644
--- a/apps/mason2/methylation_levels.cpp
+++ b/apps/mason2/methylation_levels.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                         Mason - A Read Simulator
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/mason2/methylation_levels.h b/apps/mason2/methylation_levels.h
index 8d75980..d67f5b1 100644
--- a/apps/mason2/methylation_levels.h
+++ b/apps/mason2/methylation_levels.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                         Mason - A Read Simulator
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/mason2/omp_wrapper.h b/apps/mason2/omp_wrapper.h
index ecb3552..4f1da00 100644
--- a/apps/mason2/omp_wrapper.h
+++ b/apps/mason2/omp_wrapper.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                               omp_wrapper.h
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/mason2/sequencing.h b/apps/mason2/sequencing.h
index 88a4e84..3cdc5d8 100644
--- a/apps/mason2/sequencing.h
+++ b/apps/mason2/sequencing.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                         Mason - A Read Simulator
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/mason2/simulate_454.cpp b/apps/mason2/simulate_454.cpp
index 91653dc..0456306 100644
--- a/apps/mason2/simulate_454.cpp
+++ b/apps/mason2/simulate_454.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                         Mason - A Read Simulator
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/mason2/simulate_base.cpp b/apps/mason2/simulate_base.cpp
index 0aa6ccb..6d4a659 100644
--- a/apps/mason2/simulate_base.cpp
+++ b/apps/mason2/simulate_base.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                         Mason - A Read Simulator
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/mason2/simulate_genome.cpp b/apps/mason2/simulate_genome.cpp
index 79156da..703b8e3 100644
--- a/apps/mason2/simulate_genome.cpp
+++ b/apps/mason2/simulate_genome.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                         Mason - A Read Simulator
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/mason2/simulate_genome.h b/apps/mason2/simulate_genome.h
index db5f9b1..7e75052 100644
--- a/apps/mason2/simulate_genome.h
+++ b/apps/mason2/simulate_genome.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                         Mason - A Read Simulator
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/mason2/simulate_illumina.cpp b/apps/mason2/simulate_illumina.cpp
index 4e8508b..e09bf4f 100644
--- a/apps/mason2/simulate_illumina.cpp
+++ b/apps/mason2/simulate_illumina.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                         Mason - A Read Simulator
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/mason2/simulate_sanger.cpp b/apps/mason2/simulate_sanger.cpp
index 1042e65..4af22fd 100644
--- a/apps/mason2/simulate_sanger.cpp
+++ b/apps/mason2/simulate_sanger.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                         Mason - A Read Simulator
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/mason2/variation_size_tsv.h b/apps/mason2/variation_size_tsv.h
index 98b8f9b..ef8c51c 100644
--- a/apps/mason2/variation_size_tsv.h
+++ b/apps/mason2/variation_size_tsv.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                         Mason - A Read Simulator
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/mason2/vcf_materialization.cpp b/apps/mason2/vcf_materialization.cpp
index 6e3dc5f..3cc7472 100644
--- a/apps/mason2/vcf_materialization.cpp
+++ b/apps/mason2/vcf_materialization.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                         Mason - A Read Simulator
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -484,6 +484,8 @@ void VcfMaterializer::_appendToVariants(Variants & variants, seqan::VcfRecord co
         seqan::CharString buffer;
         snpRecord.haplotype = 0;
         for (; !atEnd(inputIter); ++inputIter)
+        {
+            if (*inputIter == ':') break;
             if ((*inputIter == '|' || *inputIter == '/'))
             {
                 if (!empty(buffer))
@@ -504,6 +506,7 @@ void VcfMaterializer::_appendToVariants(Variants & variants, seqan::VcfRecord co
             {
                 appendValue(buffer, *inputIter);
             }
+        }
         if (!empty(buffer))
         {
             unsigned idx = std::min(seqan::lexicalCast<unsigned>(buffer),
@@ -522,8 +525,8 @@ void VcfMaterializer::_appendToVariants(Variants & variants, seqan::VcfRecord co
         smallIndel.rId = vcfRecord.rID;
         smallIndel.pos = vcfRecord.beginPos + 1;
 
-        SEQAN_ASSERT_NOT(contains(vcfRecord.alt, ","));  // only one alternative
-        SEQAN_ASSERT((length(vcfRecord.alt) == 1u) != (length(vcfRecord.ref) == 1u));  // XOR
+        if (contains(vcfRecord.alt, ",")) return;  // only one alternative
+        if (length(vcfRecord.alt) > 1u && length(vcfRecord.ref) > 1u) return; // skip MNP and COMPLEX variants
 
         smallIndel.haplotype = 0;
         if (length(vcfRecord.ref) == 1u)  // insertion
diff --git a/apps/mason2/vcf_materialization.h b/apps/mason2/vcf_materialization.h
index 0e4c740..c7e0613 100644
--- a/apps/mason2/vcf_materialization.h
+++ b/apps/mason2/vcf_materialization.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                         Mason - A Read Simulator
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/micro_razers/CMakeLists.txt b/apps/micro_razers/CMakeLists.txt
index 5e2dd4f..1a4193d 100644
--- a/apps/micro_razers/CMakeLists.txt
+++ b/apps/micro_razers/CMakeLists.txt
@@ -10,7 +10,7 @@ cmake_minimum_required (VERSION 3.0.0)
 project (seqan_apps_micro_razers CXX)
 message (STATUS "Configuring apps/micro_razers")
 
-set (SEQAN_APP_VERSION "1.0.10")
+set (SEQAN_APP_VERSION "1.0.11")
 
 # ----------------------------------------------------------------------------
 # Dependencies
@@ -62,7 +62,7 @@ endif (NOT SEQAN_PREFIX_SHARE_DOC)
 
 # Install micro_razers in ${PREFIX}/bin directory
 install (TARGETS micro_razers
-         DESTINATION bin)
+         DESTINATION ${CMAKE_INSTALL_BINDIR})
 
 # Install non-binary files for the package to "." for app builds and
 # ${PREFIX}/share/doc/micro_razers for SeqAn release builds.
diff --git a/apps/micro_razers/README b/apps/micro_razers/README
index a176f66..2289160 100644
--- a/apps/micro_razers/README
+++ b/apps/micro_razers/README
@@ -43,16 +43,14 @@ MicroRazerS is distributed with SeqAn - The C++ Sequence Analysis Library
   5)  cd micro_razers
   6)  ./micro_razers --help
 
-Alternatively you can check out the latest SVN version of MicroRazerS and SeqAn
+Alternatively you can check out the latest Git version of MicroRazerS and SeqAn
 with:
 
-  1)  svn co http://svn.mi.fu-berlin.de/seqan/trunk/seqan
-  2)  cd seqan
-  3)  make forwards
-  4)  cd projects/library/apps
-  5)  make micro_razers
-  6)  cd micro_razers
-  7)  ./micro_razers --help
+  1)  git clone https://github.com/seqan/seqan.git
+  2)  mkdir seqan/buld; cd seqan/build
+  3)  cmake .. -DCMAKE_BUILD_TYPE=Release
+  4)  make micro_razers
+  5)  ./bin/micro_razers --help
 
 On success, an executable file micro_razers was built and a brief usage 
 description was dumped.
diff --git a/apps/micro_razers/micro_razers.cpp b/apps/micro_razers/micro_razers.cpp
index 439bae4..6cf9ff3 100644
--- a/apps/micro_razers/micro_razers.cpp
+++ b/apps/micro_razers/micro_razers.cpp
@@ -212,6 +212,7 @@ int main(int argc, const char *argv[])
     
     
     ArgumentParser parser("micro_razers");
+    setShortDescription(parser, "Map small RNA reads possibly containing 3' adapter sequence");
     addUsageLine(parser, "[\\fIOPTIONS\\fP] <\\fIGENOME FILE\\fP> <\\fIREADS FILE\\fP>");
     addDescription(parser, "MicroRazerS uses a prefix-based mapping strategy to map "
                            "small RNA reads possibly containing 3' adapter sequence. ");
diff --git a/apps/ngs_roi/CMakeLists.txt b/apps/ngs_roi/CMakeLists.txt
index 980224b..9f79b0a 100644
--- a/apps/ngs_roi/CMakeLists.txt
+++ b/apps/ngs_roi/CMakeLists.txt
@@ -10,7 +10,7 @@ cmake_minimum_required (VERSION 3.0.0)
 project (seqan_apps_ngs_roi CXX)
 message (STATUS "Configuring apps/ngs_roi")
 
-set (SEQAN_APP_VERSION "0.2.11")
+set (SEQAN_APP_VERSION "0.2.12")
 
 # ----------------------------------------------------------------------------
 # Dependencies
@@ -23,6 +23,11 @@ if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP")
     find_package (SeqAn CONFIG REQUIRED)
 endif ()
 
+if (NOT ZLIB_FOUND)
+  message (STATUS "  ZLIB not found: ngs_roi will not be built.")
+  return ()
+endif ()
+
 # ----------------------------------------------------------------------------
 # Build Setup
 # ----------------------------------------------------------------------------
@@ -72,7 +77,7 @@ endif (NOT SEQAN_PREFIX_SHARE_DOC)
 install (TARGETS bam2roi
                  roi_feature_projection
                  roi_plot_thumbnails
-         DESTINATION bin)
+         DESTINATION ${CMAKE_INSTALL_BINDIR})
 
 # Install helper scripts into ${PREFIX}/bin directory.
 install (FILES # Scripts for sorting.
@@ -83,7 +88,7 @@ install (FILES # Scripts for sorting.
                  tool_shed/roi_plot_9.sh
                  tool_shed/plot.awk
                  tool_shed/ps2pswLinks.gawk
-         DESTINATION bin)
+         DESTINATION ${CMAKE_INSTALL_BINDIR})
 
 # Install non-binary files for the package to "." for app builds and
 # ${PREFIX}/share/doc/ngs_roi for SeqAn release builds.
diff --git a/apps/ngs_roi/LICENSE b/apps/ngs_roi/LICENSE
index c5ba484..118fd9c 100644
--- a/apps/ngs_roi/LICENSE
+++ b/apps/ngs_roi/LICENSE
@@ -21,4 +21,4 @@ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/apps/ngs_roi/bam2roi.cpp b/apps/ngs_roi/bam2roi.cpp
index 28f44b5..6d73ec9 100644
--- a/apps/ngs_roi/bam2roi.cpp
+++ b/apps/ngs_roi/bam2roi.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                   NGS: Regions of Interest Analysis
 // ==========================================================================
-// Copyright (c) 2012-2013, Bernd Jagla, Institut Pasteur
+// Copyright (c) 2012-2018, Bernd Jagla, Institut Pasteur
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/ngs_roi/bam2roi.h b/apps/ngs_roi/bam2roi.h
index f851911..778f631 100644
--- a/apps/ngs_roi/bam2roi.h
+++ b/apps/ngs_roi/bam2roi.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                   NGS: Regions of Interest Analysis
 // ==========================================================================
-// Copyright (c) 2012-2013, Bernd Jagla, Institut Pasteur
+// Copyright (c) 2012-2018, Bernd Jagla, Institut Pasteur
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/ngs_roi/png_canvas.h b/apps/ngs_roi/png_canvas.h
index f4fda92..59b776c 100644
--- a/apps/ngs_roi/png_canvas.h
+++ b/apps/ngs_roi/png_canvas.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                   NGS: Regions of Interest Analysis
 // ==========================================================================
-// Copyright (c) 2012-2013, Bernd Jagla, Institut Pasteur
+// Copyright (c) 2012-2018, Bernd Jagla, Institut Pasteur
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/ngs_roi/project_interval.cpp b/apps/ngs_roi/project_interval.cpp
index e471d7d..f9e730f 100644
--- a/apps/ngs_roi/project_interval.cpp
+++ b/apps/ngs_roi/project_interval.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                   NGS: Regions of Interest Analysis
 // ==========================================================================
-// Copyright (c) 2012-2013, Bernd Jagla, Institut Pasteur
+// Copyright (c) 2012-2018, Bernd Jagla, Institut Pasteur
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/ngs_roi/project_interval.h b/apps/ngs_roi/project_interval.h
index 8afb9fd..4226ceb 100644
--- a/apps/ngs_roi/project_interval.h
+++ b/apps/ngs_roi/project_interval.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                   NGS: Regions of Interest Analysis
 // ==========================================================================
-// Copyright (c) 2012-2013, Bernd Jagla, Institut Pasteur
+// Copyright (c) 2012-2018, Bernd Jagla, Institut Pasteur
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/ngs_roi/project_spliced.cpp b/apps/ngs_roi/project_spliced.cpp
index 3b5b1e2..339b3a6 100644
--- a/apps/ngs_roi/project_spliced.cpp
+++ b/apps/ngs_roi/project_spliced.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                   NGS: Regions of Interest Analysis
 // ==========================================================================
-// Copyright (c) 2012-2013, Bernd Jagla, Institut Pasteur
+// Copyright (c) 2012-2018, Bernd Jagla, Institut Pasteur
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -77,7 +77,7 @@ void ProjectSplicedRoi::beginContig()
     clear(ranges);
 
     // Set current group to invalid.
-    currentGroup = seqan::maxValue<unsigned>();
+    currentGroup = std::numeric_limits<unsigned>::max();
 }
 
 // ---------------------------------------------------------------------------
@@ -122,7 +122,7 @@ void ProjectSplicedRoi::_updateRanges(seqan::GffRecord const & record,
         std::cerr << "Updating " << name << "\t" << record.beginPos << "\t" << record.endPos << "\n";
 
     unsigned idx = 0;
-    if (getIdByName(groupNames, name, idx, groupNamesCache))
+    if (getIdByName(idx, groupNamesCache, name))
     {
         ranges[idx].i1 = std::min(ranges[idx].i1, (int)record.beginPos);
         ranges[idx].i2 = std::max(ranges[idx].i2, (int)record.endPos);
@@ -130,7 +130,7 @@ void ProjectSplicedRoi::_updateRanges(seqan::GffRecord const & record,
     else
     {
         idx = length(groupNames);
-        appendName(groupNames, name, groupNamesCache);
+        appendName(groupNamesCache, name);
         appendValue(ranges, TIntPair(record.beginPos, record.endPos));
     }
 }
diff --git a/apps/ngs_roi/project_spliced.h b/apps/ngs_roi/project_spliced.h
index 27a0dea..1fddbe9 100644
--- a/apps/ngs_roi/project_spliced.h
+++ b/apps/ngs_roi/project_spliced.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                   NGS: Regions of Interest Analysis
 // ==========================================================================
-// Copyright (c) 2012-2013, Bernd Jagla, Institut Pasteur
+// Copyright (c) 2012-2018, Bernd Jagla, Institut Pasteur
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/ngs_roi/record_ext.h b/apps/ngs_roi/record_ext.h
index a3d6e67..fd9ef0c 100644
--- a/apps/ngs_roi/record_ext.h
+++ b/apps/ngs_roi/record_ext.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                   NGS: Regions of Interest Analysis
 // ==========================================================================
-// Copyright (c) 2012-2013, Bernd Jagla, Institut Pasteur
+// Copyright (c) 2012-2018, Bernd Jagla, Institut Pasteur
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/ngs_roi/roi_builder.cpp b/apps/ngs_roi/roi_builder.cpp
index 8e36b13..0ea2e91 100644
--- a/apps/ngs_roi/roi_builder.cpp
+++ b/apps/ngs_roi/roi_builder.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                   NGS: Regions of Interest Analysis
 // ==========================================================================
-// Copyright (c) 2012-2013, Bernd Jagla, Institut Pasteur
+// Copyright (c) 2012-2018, Bernd Jagla, Institut Pasteur
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/ngs_roi/roi_builder.h b/apps/ngs_roi/roi_builder.h
index 72801f6..e690735 100644
--- a/apps/ngs_roi/roi_builder.h
+++ b/apps/ngs_roi/roi_builder.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                   NGS: Regions of Interest Analysis
 // ==========================================================================
-// Copyright (c) 2012-2013, Bernd Jagla, Institut Pasteur
+// Copyright (c) 2012-2018, Bernd Jagla, Institut Pasteur
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/ngs_roi/roi_feature_projection.cpp b/apps/ngs_roi/roi_feature_projection.cpp
index d6c8f96..ccb5a54 100644
--- a/apps/ngs_roi/roi_feature_projection.cpp
+++ b/apps/ngs_roi/roi_feature_projection.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                   NGS: Regions of Interest Analysis
 // ==========================================================================
-// Copyright (c) 2012-2013, Bernd Jagla, Institut Pasteur
+// Copyright (c) 2012-2018, Bernd Jagla, Institut Pasteur
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -136,7 +136,7 @@ template <typename TRecord>
 void makeSentinel(TRecord & record)
 {
     clear(record.ref);
-    record.beginPos = seqan::maxValue<int>();
+    record.beginPos = std::numeric_limits<int>::max();
 }
 
 // Configuration object for directly reading BED records with IntersectDriver.
diff --git a/apps/ngs_roi/roi_plot_thumbnails.cpp b/apps/ngs_roi/roi_plot_thumbnails.cpp
index 61cef6f..62ca964 100644
--- a/apps/ngs_roi/roi_plot_thumbnails.cpp
+++ b/apps/ngs_roi/roi_plot_thumbnails.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                   NGS: Regions of Interest Analysis
 // ==========================================================================
-// Copyright (c) 2012-2013, Bernd Jagla, Institut Pasteur
+// Copyright (c) 2012-2018, Bernd Jagla, Institut Pasteur
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/pair_align/CMakeLists.txt b/apps/pair_align/CMakeLists.txt
index 70f9e5c..98ca6d3 100644
--- a/apps/pair_align/CMakeLists.txt
+++ b/apps/pair_align/CMakeLists.txt
@@ -10,7 +10,12 @@ cmake_minimum_required (VERSION 3.0.0)
 project (seqan_apps_pair_align CXX)
 message (STATUS "Configuring apps/pair_align")
 
-set (SEQAN_APP_VERSION "1.3.7")
+set (SEQAN_APP_VERSION "1.3.8")
+
+if (SEQAN_TRAVIS_BUILD)
+    message (STATUS "  Skipping build and test of pair_align on Travis CI.")
+    return ()
+endif (SEQAN_TRAVIS_BUILD)
 
 # ----------------------------------------------------------------------------
 # Dependencies
@@ -60,7 +65,7 @@ endif (NOT SEQAN_PREFIX_SHARE_DOC)
 
 # Install pair_align in ${PREFIX}/bin directory
 install (TARGETS pair_align
-         DESTINATION bin)
+         DESTINATION ${CMAKE_INSTALL_BINDIR})
 
 # Install non-binary files for the package to "." for app builds and
 # ${PREFIX}/share/doc/pair_align for SeqAn release builds.
diff --git a/apps/pair_align/lib/pair_align_global.cpp b/apps/pair_align/lib/pair_align_global.cpp
index 050bb93..bcf68c9 100644
--- a/apps/pair_align/lib/pair_align_global.cpp
+++ b/apps/pair_align/lib/pair_align_global.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                           pair_align_global.cpp
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/pair_align/lib/pair_align_lcs.cpp b/apps/pair_align/lib/pair_align_lcs.cpp
index d61f336..6a63c83 100644
--- a/apps/pair_align/lib/pair_align_lcs.cpp
+++ b/apps/pair_align/lib/pair_align_lcs.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                            pair_align_lcs.cpp
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/pair_align/lib/pair_align_lib.cpp b/apps/pair_align/lib/pair_align_lib.cpp
index 52bdcb4..81fcb32 100644
--- a/apps/pair_align/lib/pair_align_lib.cpp
+++ b/apps/pair_align/lib/pair_align_lib.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                            pair_align_lib.cpp
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -37,4 +37,4 @@
 #include "pair_align_lib.h"
 
 // Definition of static variable has to be moved to cpp file.
-int const Options::INVALID_DIAGONAL = seqan::MaxValue<int>::VALUE;
+int const Options::INVALID_DIAGONAL = std::numeric_limits<int>::max();
diff --git a/apps/pair_align/lib/pair_align_lib.h b/apps/pair_align/lib/pair_align_lib.h
index 2cf5b9e..88e4322 100644
--- a/apps/pair_align/lib/pair_align_lib.h
+++ b/apps/pair_align/lib/pair_align_lib.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                            pair_align_lib.h
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/pair_align/lib/pair_align_local.cpp b/apps/pair_align/lib/pair_align_local.cpp
index 9ee2e72..9cf1587 100644
--- a/apps/pair_align/lib/pair_align_local.cpp
+++ b/apps/pair_align/lib/pair_align_local.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                           pair_align_local.cpp
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/param_chooser/CMakeLists.txt b/apps/param_chooser/CMakeLists.txt
index ef4cfeb..7385124 100644
--- a/apps/param_chooser/CMakeLists.txt
+++ b/apps/param_chooser/CMakeLists.txt
@@ -10,7 +10,7 @@ cmake_minimum_required (VERSION 3.0.0)
 project (seqan_apps_param_chooser CXX)
 message (STATUS "Configuring apps/param_chooser")
 
-set (SEQAN_APP_VERSION "0.0.8")
+set (SEQAN_APP_VERSION "0.0.9")
 
 # ----------------------------------------------------------------------------
 # Dependencies
@@ -62,7 +62,7 @@ endif (NOT SEQAN_PREFIX_SHARE_DOC)
 
 # Install param_chooser in ${PREFIX}/bin directory
 install (TARGETS param_chooser
-         DESTINATION bin)
+         DESTINATION ${CMAKE_INSTALL_BINDIR})
 
 # Install non-binary files for the package to "." for app builds and
 # ${PREFIX}/share/doc/param_chooser for SeqAn release builds.
diff --git a/apps/param_chooser/test_param_chooser.cpp b/apps/param_chooser/test_param_chooser.cpp
index d947cb0..41e583c 100644
--- a/apps/param_chooser/test_param_chooser.cpp
+++ b/apps/param_chooser/test_param_chooser.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/rabema/CMakeLists.txt b/apps/rabema/CMakeLists.txt
index 723e225..efe5068 100644
--- a/apps/rabema/CMakeLists.txt
+++ b/apps/rabema/CMakeLists.txt
@@ -10,7 +10,7 @@ cmake_minimum_required (VERSION 3.0.0)
 project (seqan_apps_rabema CXX)
 message (STATUS "Configuring apps/rabema")
 
-set (SEQAN_APP_VERSION "1.2.9")
+set (SEQAN_APP_VERSION "1.2.10")
 
 # ----------------------------------------------------------------------------
 # Dependencies
@@ -91,11 +91,11 @@ endif (NOT SEQAN_PREFIX_SHARE_DOC)
 install (TARGETS rabema_prepare_sam
                  rabema_build_gold_standard
                  rabema_evaluate
-         DESTINATION bin)
+         DESTINATION ${CMAKE_INSTALL_BINDIR})
 
 # Install rabema in /bin directory
 install (TARGETS rabema_prepare_sam rabema_build_gold_standard rabema_evaluate
-        DESTINATION bin)
+        DESTINATION ${CMAKE_INSTALL_BINDIR})
 
 # Install non-binary files for the package to "." for app builds and
 # ${PREFIX}/share/doc/pair_align for SeqAn release builds.
diff --git a/apps/rabema/rabema_build_gold_standard.cpp b/apps/rabema/rabema_build_gold_standard.cpp
index b6febd0..1edbe30 100644
--- a/apps/rabema/rabema_build_gold_standard.cpp
+++ b/apps/rabema/rabema_build_gold_standard.cpp
@@ -275,8 +275,8 @@ int intervalizeAndDumpErrorCurves(TStream & stream,
         // The position of the previous match, so we can consider only the ones with the smallest error.
         //
         // The following two vars should be != first pos and contigId.
-        size_t previousPos = maxValue<size_t>();
-        size_t previousContigId = maxValue<size_t>();
+        size_t previousPos = std::numeric_limits<size_t>::max();
+        size_t previousContigId = std::numeric_limits<size_t>::max();
         typedef Iterator<TWeightedMatches>::Type TWeightedMatchesIter;
         for (TWeightedMatchesIter it = begin(sortedMatches);
              it != end(sortedMatches); ++it)
@@ -396,7 +396,7 @@ void buildErrorCurvePoints(String<WeightedMatch> & errorCurve,
 
     // In oracle Sam mode, the maximum error is the error at the position given in the Sam alignment.
     bool oracleMode = false;
-    if (maxError == maxValue<int>())  // We are in oracle mode.
+    if (maxError == std::numeric_limits<int>::max())  // We are in oracle mode.
     {
         oracleMode = true;
         Finder<TContigSeq> finder(contig);
@@ -827,10 +827,10 @@ int matchesToErrorFunction(TErrorCurves & errorCurves,
             append(record.qName, "/1");
         // Translate read to read id.
         unsigned readId = 0;
-        if (!getIdByName(readNameStore, record.qName, readId, readNameStoreCache))
+        if (!getIdByName(readId, readNameStoreCache, record.qName))
         {
             readId = length(readNameStore);
-            appendName(readNameStore, record.qName, readNameStoreCache);
+            appendName(readNameStoreCache, record.qName);
             appendValue(readLengthStore, length(record.seq));
             if (options.oracleMode)
                 appendValue(readAlignmentDistances, -1);
@@ -888,7 +888,7 @@ int matchesToErrorFunction(TErrorCurves & errorCurves,
 
         // In oracle mode, set max error to -1, buildErrorCurvePoints() will use the error at the alignment position
         // from the SAM/BAM file.  In normal mode, convert from error rate from options to error count.
-        int maxError = maxValue<int>();
+        int maxError = std::numeric_limits<int>::max();
         if (!options.oracleMode)
             maxError = static_cast<int>(floor(0.01 * options.maxError * length(record.seq)));
 
@@ -1003,7 +1003,7 @@ parseCommandLine(BuildGoldStandardOptions & options, int argc, char const ** arg
     addOption(parser, seqan::ArgParseOption("r", "reference", "Path to load reference FASTA from.",
                                             seqan::ArgParseArgument::INPUT_FILE, "FASTA"));
     setRequired(parser, "reference", true);
-    setValidValues(parser, "reference", "fa fasta");
+    setValidValues(parser, "reference", seqan::SeqFileIn::getFileExtensions());
     addOption(parser, seqan::ArgParseOption("b", "in-bam", "Path to load the \"perfect\" SAM/BAM file from.",
                                             seqan::ArgParseArgument::INPUT_FILE, "BAM"));
     setValidValues(parser, "in-bam", BamFileIn::getFileExtensions());
diff --git a/apps/rabema/rabema_evaluate.cpp b/apps/rabema/rabema_evaluate.cpp
index 6d6b241..67b3bf9 100644
--- a/apps/rabema/rabema_evaluate.cpp
+++ b/apps/rabema/rabema_evaluate.cpp
@@ -260,9 +260,9 @@ void performIntervalLowering(String<GsiRecord> & gsiRecords, int maxError)
 
     // Add sentinel interval.
     GsiRecord sentinel(back(gsiRecords));
-    sentinel.firstPos = MaxValue<size_t>::VALUE;
-    sentinel.lastPos = MaxValue<size_t>::VALUE;
-    // sentinel.id = MaxValue<size_t>::VALUE;
+    sentinel.firstPos = std::numeric_limits<size_t>::max();
+    sentinel.lastPos = std::numeric_limits<size_t>::max();
+    // sentinel.id = std::numeric_limits<size_t>::max();
     appendValue(gsiRecords, sentinel);
 
     String<TInterval> openIntervals;
@@ -402,7 +402,7 @@ int benchmarkReadResult(RabemaStats & result,
     // In case of oracle mode, we ignore the distance of the intervals in the GSI file here but use it later on.
     //
     // Start with picking the smallest distance if *-best mode.
-    int smallestDistance = options.oracleMode ? maxValue<int>() : options.maxError;
+    int smallestDistance = options.oracleMode ? std::numeric_limits<int>::max() : options.maxError;
     // Note that smallestDistance (as bestDistance defined below) is expressed as percent of read length ceiled
     // and cat to an int value.
     if (options.oracleMode || options.benchmarkCategory == CATEGORY_ANY_BEST ||
@@ -410,7 +410,7 @@ int benchmarkReadResult(RabemaStats & result,
         for (unsigned i = 0; i < length(gsiRecords); ++i)
             smallestDistance = std::min(smallestDistance, gsiRecords[i].distance);
     int largestDistance = options.maxError;
-    if (options.oracleMode && smallestDistance != maxValue<int>())
+    if (options.oracleMode && smallestDistance != std::numeric_limits<int>::max())
         for (unsigned i = 0; i < length(gsiRecords); ++i)
             largestDistance = std::max(largestDistance, gsiRecords[i].distance);
     String<GsiRecord> pickedGsiRecords;
@@ -592,7 +592,7 @@ int benchmarkReadResult(RabemaStats & result,
             endPos--;
         }
 
-        int bestDistance = minValue<int>();  // Marker for "not set yet".
+        int bestDistance = std::numeric_limits<int>::min();  // Marker for "not set yet".
         // Note that bestDistance expresses the distance in percent error, relative to the read length, ceiled up
         // and converted to an int value.
         if (!options.oracleMode)
@@ -652,7 +652,7 @@ int benchmarkReadResult(RabemaStats & result,
             for (unsigned i = 0; i < length(queryResult); ++i)
                 intervalHit[queryResult[i]] = true;
         }
-        else if (bestDistance != minValue<int>())
+        else if (bestDistance != std::numeric_limits<int>::min())
         {
             // && bestDistance <= options.maxError)
 
@@ -664,7 +664,7 @@ int benchmarkReadResult(RabemaStats & result,
             // Note that all distances including allowedDistance are percent of read length, ceiled up.
             int allowedDistance = options.maxError;
             if ((options.benchmarkCategory == CATEGORY_ALL_BEST || options.benchmarkCategory == CATEGORY_ANY_BEST) &&
-                (smallestDistance != maxValue<int>()))
+                (smallestDistance != std::numeric_limits<int>::max()))
                 allowedDistance = smallestDistance;
             if (bestDistance > allowedDistance)
             {
@@ -708,7 +708,7 @@ int benchmarkReadResult(RabemaStats & result,
         resize(foundIntervalsForErrorRate, largestDistance + 1, 0);
     if (options.oracleMode || options.benchmarkCategory == CATEGORY_ANY_BEST)
     {
-        int bestDistance = maxValue<int>();
+        int bestDistance = std::numeric_limits<int>::max();
         int bestIdx = 0;
         for (unsigned i = 0; i < length(intervalDistances); ++i)
             if (intervalHit[i])
@@ -719,7 +719,7 @@ int benchmarkReadResult(RabemaStats & result,
                     bestIdx = i;
                 bestDistance = std::min(bestDistance, intervalDistances[i]);
             }
-        if (bestDistance != maxValue<int>())
+        if (bestDistance != std::numeric_limits<int>::max())
         {
             if (options.showHitIntervals)
                 std::cerr << "HIT_BEST\t" << filteredGsiRecords[bestIdx] << "\t" << filteredGsiRecords[bestIdx].originalDistance << "\n";
@@ -765,7 +765,7 @@ int benchmarkReadResult(RabemaStats & result,
         result.intervalsToFind += 1;
         result.intervalsFound += found;
         result.normalizedIntervals += found;
-        int d = (smallestDistance == maxValue<int>()) ? 0 : smallestDistance;
+        int d = (smallestDistance == std::numeric_limits<int>::max()) ? 0 : smallestDistance;
         result.intervalsToFindForErrorRate[d] += 1;
         result.intervalsFoundForErrorRate[d] += found;
         result.normalizedIntervalsToFindForErrorRate[d] += 1;
@@ -773,7 +773,7 @@ int benchmarkReadResult(RabemaStats & result,
     }
     else if (options.benchmarkCategory == CATEGORY_ANY_BEST)
     {
-        int d = (smallestDistance == maxValue<int>()) ? 0 : smallestDistance;
+        int d = (smallestDistance == std::numeric_limits<int>::max()) ? 0 : smallestDistance;
         bool toFind = (numIntervalsForErrorRate[d] > 0u);
         bool found = (foundIntervalsForErrorRate[d] > 0u);
         SEQAN_ASSERT_LEQ(found, toFind);
@@ -1064,7 +1064,7 @@ parseCommandLine(RabemaEvaluationOptions & options, int argc, char const ** argv
     // setRequired(parser, "out-gsi", true);
     addOption(parser, seqan::ArgParseOption("r", "reference", "Path to load reference FASTA from.",
                                             seqan::ArgParseArgument::INPUT_FILE, "FASTA"));
-    setValidValues(parser, "reference", "fa fasta");
+    setValidValues(parser, "reference", seqan::SeqFileIn::getFileExtensions());
     setRequired(parser, "reference", true);
     addOption(parser, seqan::ArgParseOption("g", "in-gsi",
                                             "Path to load gold standard intervals from. If compressed using gzip, "
@@ -1229,7 +1229,7 @@ parseCommandLine(RabemaEvaluationOptions & options, int argc, char const ** argv
 
     getOptionValue(options.checkSorting, parser, "dont-check-sorting");
     options.checkSorting = !options.checkSorting;
-    
+
     options.showMissedIntervals = isSet(parser, "show-missed-intervals");
     options.showSuperflousIntervals = isSet(parser, "show-invalid-hits");
     options.showAdditionalIntervals = isSet(parser, "show-additional-hits");
diff --git a/apps/rabema/ref_id_mapping.h b/apps/rabema/ref_id_mapping.h
index b858686..69cd755 100644
--- a/apps/rabema/ref_id_mapping.h
+++ b/apps/rabema/ref_id_mapping.h
@@ -79,17 +79,17 @@ inline unsigned length(RefIdMapping const & mapping)
 
 template <typename TTargetNameStore, typename TTargetNameStoreCache, typename TSourceNameStore>
 void rebuildMapping(RefIdMapping & mapping,
-                    TTargetNameStore const & targetNameStore,
+                    TTargetNameStore const & /*targetNameStore*/,
                     TTargetNameStoreCache const & targetNameStoreCache,
                     TSourceNameStore const & sourceNameStore)
 {
     clear(mapping.map);
-    resize(mapping.map, length(sourceNameStore), maxValue<unsigned>());
+    resize(mapping.map, length(sourceNameStore), std::numeric_limits<unsigned>::max());
 
     for (unsigned i = 0; i < length(sourceNameStore); ++i)
     {
         unsigned idx = 0;
-        if (getIdByName(targetNameStore, sourceNameStore[i], idx, targetNameStoreCache))
+        if (getIdByName(idx, targetNameStoreCache, sourceNameStore[i]))
             mapping.map[i] = idx;
     }
 }
diff --git a/apps/rabema/sorting.h b/apps/rabema/sorting.h
index 712b8ce..9daf54a 100644
--- a/apps/rabema/sorting.h
+++ b/apps/rabema/sorting.h
@@ -24,7 +24,7 @@
 
 /* The MIT License
 
-   Copyright (c) 2008-2010 Genome Research Ltd (GRL).
+   Copyright (c) 2008-2018 Genome Research Ltd (GRL).
 
    Permission is hereby granted, free of charge, to any person obtaining
    a copy of this software and associated documentation files (the
diff --git a/apps/razers/CMakeLists.txt b/apps/razers/CMakeLists.txt
index be52d54..2d0e3de 100644
--- a/apps/razers/CMakeLists.txt
+++ b/apps/razers/CMakeLists.txt
@@ -10,7 +10,12 @@ cmake_minimum_required (VERSION 3.0.0)
 project (seqan_apps_razers CXX)
 message (STATUS "Configuring apps/razers")
 
-set (SEQAN_APP_VERSION "1.5.7")
+set (SEQAN_APP_VERSION "1.5.8")
+
+if (SEQAN_TRAVIS_BUILD)
+    message (STATUS "  Skipping build and test of razers on Travis CI.")
+    return ()
+endif (SEQAN_TRAVIS_BUILD)
 
 # ----------------------------------------------------------------------------
 # Dependencies
@@ -66,7 +71,7 @@ endif (NOT SEQAN_PREFIX_SHARE_DOC)
 
 # Install razers in ${PREFIX}/bin directory
 install (TARGETS razers
-         DESTINATION bin)
+         DESTINATION ${CMAKE_INSTALL_BINDIR})
 
 # Install non-binary files for the package to "." for app builds and
 # ${PREFIX}/share/doc/razers for SeqAn release builds.
diff --git a/apps/razers/README b/apps/razers/README
index 284e973..3a0c105 100644
--- a/apps/razers/README
+++ b/apps/razers/README
@@ -41,16 +41,14 @@ http://www.seqan.de). To build RazerS do the following:
   5)  cd razers
   6)  ./razers --help
 
-Alternatively you can check out the latest SVN version of RazerS and SeqAn
+Alternatively you can check out the latest Git version of RazerS and SeqAn
 with:
 
-  1)  svn co http://svn.mi.fu-berlin.de/seqan/trunk/seqan
-  2)  cd seqan
-  3)  make forwards
-  4)  cd projects/library/apps
-  5)  make razers
-  6)  cd razers
-  7)  ./razers --help
+  1)  git clone https://github.com/seqan/seqan.git
+  2)  mkdir seqan/buld; cd seqan/build
+  3)  cmake .. -DCMAKE_BUILD_TYPE=Release
+  4)  make razers
+  5)  ./bin/razers --help
 
 On success, an executable file razers was build and a brief usage 
 description was dumped.
diff --git a/apps/razers/outputFormat.h b/apps/razers/outputFormat.h
index ae01817..be854c7 100644
--- a/apps/razers/outputFormat.h
+++ b/apps/razers/outputFormat.h
@@ -934,7 +934,12 @@ void dumpMatches(
 			}
 			break;
 		case 3: // Gff:  printf "$chr $name_$format read $pos %ld . $dir . ID=$col[0]$unique$rest\n",$pos+$len-1;
-			for (unsigned filecount = 0; filecount < length(genomeFileNameList); ++filecount)
+			// NOTE(marehr): filecount+=2 might be a potential bug [https://github.com/seqan/seqan/issues/2165]
+			// In revision 4dbf27b55 and before, filecount was incremented twice at the
+			// end of the for loop, which caused a compiler warning (once in the body
+			// and once in the iteration_expression of the for loop). We kept this
+			// behaviour, because we have no active maintainer for this app.
+			for (unsigned filecount = 0; filecount < length(genomeFileNameList); filecount+=2)
 			{
 				// open genome file	
 				SeqFileIn gFile;
@@ -1201,7 +1206,6 @@ void dumpMatches(
 					}
 				}
 				close(gFile);
-				++filecount;
 			}
 			break;
 	}
diff --git a/apps/razers/razers.h b/apps/razers/razers.h
index 3ea0c30..931b304 100644
--- a/apps/razers/razers.h
+++ b/apps/razers/razers.h
@@ -945,7 +945,7 @@ void countMatches(TMatches &matches, TCounts &cnt)
 	unsigned readNo = -1;
 	short editDist = -1;
 	int64_t count = 0;
-	int64_t maxVal = MaxValue<TValue>::VALUE;
+	int64_t maxVal = std::numeric_limits<TValue>::max();
 
 	for (; it != itEnd; ++it) 
 	{
@@ -982,7 +982,7 @@ setMaxErrors(TSwift &swift, TReadNo readNo, TMaxErrors maxErrors)
 	int minT = _qgramLemma(swift, readNo, maxErrors);
 	if (minT > 1)
 	{
-		if (maxErrors < 0) minT = MaxValue<int>::VALUE;
+		if (maxErrors < 0) minT = std::numeric_limits<int>::max();
 //		::std::cout<<" read:"<<readNo<<" newThresh:"<<minT;
 		setMinThreshold(swift, readNo, (unsigned)minT);
 	}
@@ -1032,7 +1032,7 @@ void compactMatches(TMatches &matches, TCounts &
 		++hitCountCutOff;	// we keep one more match than we actually want, so we can later decide
 							// whether the read mapped more than maxhits times 
 #endif
-	int editDistCutOff = MaxValue<int>::VALUE;
+	int editDistCutOff = std::numeric_limits<int>::max();
 
 	TIterator it = begin(matches, Standard());
 	TIterator itEnd = end(matches, Standard());
@@ -1204,7 +1204,7 @@ void purgeAmbiguousRnaMatches(TMatches &matches, TStats &stats, RazerSOptions<TS
 	unsigned readNo = -1;
 	unsigned hitCount = 0;
 	unsigned hitCountCutOff = options.maxHits;
-	int editDistCutOff = MaxValue<int>::VALUE;
+	int editDistCutOff = std::numeric_limits<int>::max();
 
 	TIterator it = begin(matches, Standard());
 	TIterator itEnd = end(matches, Standard());
@@ -1447,7 +1447,7 @@ matchVerify(
 #endif
 
     unsigned ndlLength = sequenceLength(rseqNo, readSet);
-	int maxScore = MinValue<int>::VALUE;
+	int maxScore = std::numeric_limits<int>::min();
 	int minScore = -(int)(ndlLength * options.errorRate);
 	TMyersFinder maxPos;
 
diff --git a/apps/razers/razers_matepairs.h b/apps/razers/razers_matepairs.h
index bc46240..06d8c6b 100644
--- a/apps/razers/razers_matepairs.h
+++ b/apps/razers/razers_matepairs.h
@@ -250,14 +250,14 @@ void compactPairMatches(TMatches &matches, TCounts & /*cnts*/, RazerSOptions<TSp
 	unsigned readNo = -1;
 	unsigned hitCount = 0;
 	unsigned hitCountCutOff = options.maxHits;
-	int scoreDistCutOff = MinValue<int>::VALUE;
+	int scoreDistCutOff = std::numeric_limits<int>::min();
 
 	TIterator it = begin(matches, Standard());
 	TIterator itEnd = end(matches, Standard());
 	TIterator dit = it;
 	TIterator ditBeg = it;
 
-    int scoreRangeBest = (options.distanceRange == 0u)? MinValue<int>::VALUE: -(int)options.distanceRange;
+    int scoreRangeBest = (options.distanceRange == 0u)? std::numeric_limits<int>::min(): -(int)options.distanceRange;
 
 	// sort 
 	::std::sort(it, itEnd, LessPairErrors<TMatch>());
@@ -468,8 +468,8 @@ void mapMatePairReads(
             }
 		}
         
-		int	bestLeftErrors = MaxValue<int>::VALUE;
-		int bestLibSizeError = MaxValue<int>::VALUE;
+		int	bestLeftErrors = std::numeric_limits<int>::max();
+		int bestLibSizeError = std::numeric_limits<int>::max();
 		TDequeueIterator bestLeft = TDequeueIterator();
 
         bool rightVerified = false;
@@ -576,7 +576,7 @@ void mapMatePairReads(
 		}
 		
         // verify right mate, if left mate matches
-		if (bestLeftErrors != MaxValue<int>::VALUE)
+		if (bestLeftErrors != std::numeric_limits<int>::max())
 		{
             // distance between left mate beginning and right mate end
             int64_t dist = (int64_t)mR.gEnd - (int64_t)(*bestLeft).i2.gBegin;
diff --git a/apps/razers/razers_spliced.h b/apps/razers/razers_spliced.h
index 36100f8..57e83e5 100644
--- a/apps/razers/razers_spliced.h
+++ b/apps/razers/razers_spliced.h
@@ -190,7 +190,7 @@ void compactSplicedMatches(TMatches &matches,
 	unsigned readNo = -1;
 	unsigned hitCount = 0;
 	unsigned hitCountCutOff = options.maxHits;
-	int scoreDistCutOff = MinValue<int>::VALUE;
+	int scoreDistCutOff = std::numeric_limits<int>::min();
 	
 	TIterator it = begin(matches, Standard());
 	TIterator itEnd = end(matches, Standard());
@@ -271,7 +271,7 @@ void compactSplicedMatchesPurgeAmbiguous(TMatches &matches, TCounts & /*cnts*/,
 	unsigned readNo = -1;
 	unsigned hitCount = 0;
 	unsigned hitCountCutOff = options.maxHits;
-	int scoreDistCutOff = MinValue<int>::VALUE;
+	int scoreDistCutOff = std::numeric_limits<int>::min();
 	
 	TIterator it = begin(matches, Standard());
 	TIterator itEnd = end(matches, Standard());
@@ -355,7 +355,7 @@ void countSplitMatches(TMatches &matches, TCounts &cnt)
 	unsigned readNo = -1;
 	short editDist = -1;
 	int64_t count = 0;
-	int64_t maxVal = MaxValue<TValue>::VALUE;
+	int64_t maxVal = std::numeric_limits<TValue>::max();
 
 	for (; it != itEnd; ++it) 
 	{
@@ -477,7 +477,7 @@ matchVerify(
 #endif
 	
 	unsigned ndlLength = _min(sequenceLength(rseqNo, readSet),options.minMatchLen);
-	int maxScore = MinValue<int>::VALUE;
+	int maxScore = std::numeric_limits<int>::min();
 	int minScore = -(int)(ndlLength * options.errorRate);
 	TMyersFinder maxPos;
 	
@@ -950,7 +950,7 @@ findBestSplitPosition(String<Pair<TScore,int> > & maxColsL,
 	::std::cout << "findBestSplitEditForward\n";
 #endif
 
-	TScore maxSum = minValue<TScore>();
+	TScore maxSum = std::numeric_limits<TScore>::min();
 	int bestL = rowPosL1;
 	int bestR = rowPosR1;
 	while (rowPosL1 <= rowPosL2 && rowPosR1 >= rowPosR2)
@@ -991,7 +991,7 @@ findBestSplitPosition(String<Pair<TScore,int> > & maxColsL,
 	::std::cout << "findBestSplitEditReverse\n";
 #endif
 
-	TScore maxSum = minValue<TScore>();
+	TScore maxSum = std::numeric_limits<TScore>::min();
 	int bestL = rowPosL2;
 	int bestR = rowPosR2;
 
diff --git a/apps/razers/readSimulator.h b/apps/razers/readSimulator.h
index bc04f2d..9b9bedc 100644
--- a/apps/razers/readSimulator.h
+++ b/apps/razers/readSimulator.h
@@ -378,7 +378,7 @@ void simulateReads(
 			TMyersPattern &myersPattern = forwardPattern;
 			
 			// find end of best semi-global alignment
-			int maxScore = MinValue<int>::VALUE;
+			int maxScore = std::numeric_limits<int>::min();
 			int minScore = -(int)countErrors;
 			TMyersFinder maxPos;
 			while (find(myersFinder, myersPattern, minScore))
diff --git a/apps/razers/tests/run_tests.py b/apps/razers/tests/run_tests.py
index 6fd2cb8..ff0b4bd 100644
--- a/apps/razers/tests/run_tests.py
+++ b/apps/razers/tests/run_tests.py
@@ -12,6 +12,7 @@ Usage:  run_tests.py SOURCE_ROOT_PATH BINARY_ROOT_PATH
 import logging
 import os.path
 import sys
+import platform
 
 # Automagically add util/py_lib to PYTHONPATH environment variable.
 path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..',
@@ -23,6 +24,12 @@ import seqan.app_tests as app_tests
 def main(source_base, binary_base):
     """Main entry point of the script."""
 
+    # gold standard binary files created on little endian
+    if platform.machine().startswith('mips64'):
+        print 'Skipping tests for Razers on mips64el'
+        print '====================================='
+        return 0
+
     print 'Executing test for razers'
     print '========================='
     print
diff --git a/apps/razers3/CMakeLists.txt b/apps/razers3/CMakeLists.txt
index 0eb5157..8d56e71 100644
--- a/apps/razers3/CMakeLists.txt
+++ b/apps/razers3/CMakeLists.txt
@@ -10,7 +10,7 @@ cmake_minimum_required (VERSION 3.0.0)
 project (seqan_apps_razers3 CXX)
 message (STATUS "Configuring apps/razers3")
 
-set (SEQAN_APP_VERSION "3.5.7")
+set (SEQAN_APP_VERSION "3.5.8")
 
 # ----------------------------------------------------------------------------
 # Dependencies
@@ -92,7 +92,7 @@ endif (NOT SEQAN_PREFIX_SHARE_DOC)
 
 # Install razers3 in ${PREFIX}/bin directory
 install (TARGETS razers3
-         DESTINATION bin)
+         DESTINATION ${CMAKE_INSTALL_BINDIR})
 
 # Install non-binary files for the package to "." for app builds and
 # ${PREFIX}/share/doc/razers3 for SeqAn release builds.
diff --git a/apps/razers3/README b/apps/razers3/README
index cd912ce..8b4e1d3 100644
--- a/apps/razers3/README
+++ b/apps/razers3/README
@@ -51,23 +51,23 @@ and BAM formats (.sam or .bam).
 2. Installation
 ------------------------------------------------------------------------------
 
-To install RazerS 3, you can either compile the latest version from the SVN
-trunk or use a precompiled binary.
+To install RazerS 3, you can either compile the latest version from the Git
+version or use a precompiled binary.
 
 ------------------------------------------------------------------------------
 2.1. Compilation from source code
 ------------------------------------------------------------------------------
 
 Follow the "Getting Started" section on http://trac.seqan.de/wiki and check
-out the latest SVN trunk. Instead of creating a project file in Debug mode,
+out the latest Git repo. Instead of creating a project file in Debug mode,
 switch to Release mode (-DCMAKE_BUILD_TYPE=Release) and compile razers3. This
 can be done as follows:
 
-  svn co http://svn.mi.fu-berlin.de/seqan/trunk/seqan seqan-trunk
-  mkdir seqan-trunk/build
-  cd seqan-trunk/build
-  cmake .. -DCMAKE_BUILD_TYPE=Release
-  make razers3
+  1)  git clone https://github.com/seqan/seqan.git
+  2)  mkdir seqan/buld; cd seqan/build
+  3)  cmake .. -DCMAKE_BUILD_TYPE=Release
+  4)  make razers3
+  5)  ./bin/razers3 --help
 
 If RazerS 3 will be run on the same machine it is compiled on, you may
 consider to optimize for the given system architecture. For gcc or llvm/clang
diff --git a/apps/razers3/profile_timeline.h b/apps/razers3/profile_timeline.h
index 0462243..1e40441 100644
--- a/apps/razers3/profile_timeline.h
+++ b/apps/razers3/profile_timeline.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/razers3/razers.h b/apps/razers3/razers.h
index f898689..d5f79e4 100644
--- a/apps/razers3/razers.h
+++ b/apps/razers3/razers.h
@@ -70,12 +70,12 @@ struct MatchRecord
     static const unsigned INVALID_ID;
 
     MatchRecord() :
-        contigId(MaxValue<unsigned>::VALUE), readId(MaxValue<unsigned>::VALUE),
+        contigId(std::numeric_limits<unsigned>::max()), readId(std::numeric_limits<unsigned>::max()),
         beginPos(0), endPos(0),
 #ifdef RAZERS_DEFER_COMPACTION
         isRegistered(false),
 #endif  // #ifndef RAZERS_DEFER_COMPACTION
-        orientation('-'), score(0), pairMatchId(MaxValue<unsigned>::VALUE),
+        orientation('-'), score(0), pairMatchId(std::numeric_limits<unsigned>::max()),
         libDiff(0), pairScore(0)
     {}
 };
@@ -89,7 +89,7 @@ operator<<(TStream & stream, MatchRecord<TPos> & record)
 }
 
 template <typename TGPos_>
-const unsigned MatchRecord<TGPos_>::INVALID_ID = MaxValue<unsigned>::VALUE;
+const unsigned MatchRecord<TGPos_>::INVALID_ID = std::numeric_limits<unsigned>::max();
 
 #ifdef RAZERS_PROFILE
 enum
@@ -551,7 +551,7 @@ struct MatchVerifier
     double compactionTime;
 
     MatchVerifier() :
-        genomeLength(0), rightClip(0), sinkPos(MaxValue<TContigPos>::VALUE), onReverseComplement(false), oneMatchPerBucket(false), compactionTime(0) {}
+        genomeLength(0), rightClip(0), sinkPos(std::numeric_limits<TContigPos>::max()), onReverseComplement(false), oneMatchPerBucket(false), compactionTime(0) {}
 
     MatchVerifier(TMatches_ & _matches, TOptions & _options, TFilterPattern & _filterPattern, TCounts & _cnts) :
         matches(&_matches),
@@ -561,7 +561,7 @@ struct MatchVerifier
     {
         genomeLength = 0;
         rightClip = 0;
-        sinkPos = MaxValue<TContigPos>::VALUE >> 1;
+        sinkPos = std::numeric_limits<TContigPos>::max() >> 1;
         onReverseComplement = false;
         oneMatchPerBucket = false;
         compactionTime = 0;
@@ -1478,7 +1478,7 @@ void countMatches(TFragmentStore & store, TCounts & cnt, TRazerSMode const &)
     unsigned readId = TAlignedRead::INVALID_ID;
     short errors = -1;
     int64_t count = 0;
-    int64_t maxVal = MaxValue<TValue>::VALUE;
+    int64_t maxVal = std::numeric_limits<TValue>::max();
 
 #ifdef RAZERS_PROFILE
     timelineBeginTask(TASK_SORT);
@@ -1534,7 +1534,7 @@ setMaxErrors(Pattern<TIndex, Swift<TSwiftSpec> > & filterPattern, TReadNo readNo
     {
 //		std::cout<<" read:"<<readNo<<" newThresh:"<<minT;
         if (maxErrors < 0)
-            minT = MaxValue<int>::VALUE;
+            minT = std::numeric_limits<int>::max();
         setMinThreshold(filterPattern, readNo, (unsigned)minT);
     }
 }
@@ -1568,8 +1568,8 @@ void compactMatches(
     unsigned readNo = -1;
     unsigned hitCount = 0;
     unsigned hitCountCutOff = options.maxHits;
-    int scoreCutOff = MinValue<int>::VALUE;
-    int scoreRangeBest = (IsSameType<TAlignMode, RazerSGlobal>::VALUE && !IsSameType<TScoreMode, RazerSScore>::VALUE) ? -(int)options.scoreDistanceRange : MaxValue<int>::VALUE;
+    int scoreCutOff = std::numeric_limits<int>::min();
+    int scoreRangeBest = (IsSameType<TAlignMode, RazerSGlobal>::VALUE && !IsSameType<TScoreMode, RazerSScore>::VALUE) ? -(int)options.scoreDistanceRange : std::numeric_limits<int>::max();
     ignoreUnusedVariableWarning(scoreRangeBest);
     ignoreUnusedVariableWarning(compactMode);
 
@@ -1863,7 +1863,7 @@ matchVerify(
     TGenomeIterator git     = begin(inf, Standard());
     TGenomeIterator gitEnd  = end(inf, Standard()) - (ndlLength - 1);
 
-    unsigned errorThresh = (verifier.oneMatchPerBucket) ? MaxValue<unsigned>::VALUE : maxErrors;
+    unsigned errorThresh = (verifier.oneMatchPerBucket) ? std::numeric_limits<unsigned>::max() : maxErrors;
     unsigned minErrors = maxErrors + 2;
     int bestHitLength = 0;
 
@@ -2007,7 +2007,7 @@ matchVerify(
     TGenomeIterator gitEnd  = end(inf, Standard()) - (ndlLength - 1);
 
     int maxScore = minScore - 1;
-    int scoreThresh = (verifier.oneMatchPerBucket) ? MaxValue<int>::VALUE : minScore;
+    int scoreThresh = (verifier.oneMatchPerBucket) ? std::numeric_limits<int>::max() : minScore;
     int score, errors;
 
     for (; git < gitEnd; ++git)
@@ -2137,14 +2137,14 @@ matchVerify(
     typedef Pattern<TReadRev, MyersUkkonenGlobal>           TMyersPatternRev;
 
     unsigned ndlLength = length(read);
-    int maxScore = MinValue<int>::VALUE;
+    int maxScore = std::numeric_limits<int>::min();
     int minScore = verifier.options->errorCutOff[readId];
     if (minScore == 0)
         return false;
 
     minScore = -minScore + 1;
 
-    TDistance minSinkDistance = MaxValue<TDistance>::VALUE;
+    TDistance minSinkDistance = std::numeric_limits<TDistance>::max();
     TPosition maxPos = 0;
     TPosition lastPos = length(inf);
 #ifdef RAZERS_ISLAND_CRITERION
@@ -2282,7 +2282,7 @@ matchVerify(
 
                 verifier.push();
                 maxScore = minScore - 1;
-                minSinkDistance = MaxValue<TDistance>::VALUE;
+                minSinkDistance = std::numeric_limits<TDistance>::max();
             }
         }
 #endif  // #ifdef RAZERS_ISLAND_CRITERION
@@ -2466,7 +2466,7 @@ void computeQGramLengths(TDelta & minDelta, TOptions const & options)
 
     unsigned seqCount = 0;
     String<unsigned> maxDelta;
-    resize(minDelta, options.maxOverlap + 1, MaxValue<unsigned>::VALUE);
+    resize(minDelta, options.maxOverlap + 1, std::numeric_limits<unsigned>::max());
     resize(maxDelta, options.maxOverlap + 1, 3);
 
     // compute delta (==stepSize) for different overlaps
diff --git a/apps/razers3/razers_match_filter.h b/apps/razers3/razers_match_filter.h
index 05bc4ef..cf8e422 100644
--- a/apps/razers3/razers_match_filter.h
+++ b/apps/razers3/razers_match_filter.h
@@ -174,7 +174,7 @@ inline void
 registerRead(MatchFilter<TOptionsSpec, TReadSeqSet, TCallback> & filter, unsigned readId, int score)
 {
     // std::cerr << "registering read " << readId << std::endl;
-    if (filter.hitCount[readId - filter.readOffset] == MaxValue<unsigned>::VALUE)
+    if (filter.hitCount[readId - filter.readOffset] == std::numeric_limits<unsigned>::max())
         return;
 
     if (++filter.hitCount[readId - filter.readOffset] < filter.matchThreshold)
@@ -254,7 +254,7 @@ processRead(MatchFilter<TOptionsSpec, TReadSeqSet, TCallback> & filter, unsigned
     {
         _freeHistogram(filter, histogramId);
         filter.readIdToHistogramId.erase(readId);
-        filter.hitCount[readId - filter.readOffset] = MaxValue<unsigned>::VALUE;
+        filter.hitCount[readId - filter.readOffset] = std::numeric_limits<unsigned>::max();
         return true;
     }
     return false;
diff --git a/apps/razers3/razers_matepairs.h b/apps/razers3/razers_matepairs.h
index bfe549e..f0329d4 100644
--- a/apps/razers3/razers_matepairs.h
+++ b/apps/razers3/razers_matepairs.h
@@ -425,8 +425,8 @@ void compactPairMatches(
     unsigned matePairId = -2;
     unsigned hitCount = 0;
     unsigned hitCountCutOff = options.maxHits;
-    int scoreDistCutOff = MinValue<int>::VALUE;
-    int scoreRangeBest = (options.scoreDistanceRange == 0u) ? MinValue<int>::VALUE : -(int)options.scoreDistanceRange;
+    int scoreDistCutOff = std::numeric_limits<int>::min();
+    int scoreRangeBest = (options.scoreDistanceRange == 0u) ? std::numeric_limits<int>::min() : -(int)options.scoreDistanceRange;
 
     TIterator it = begin(matches, Standard());
     TIterator itEnd = end(matches, Standard());
@@ -751,8 +751,8 @@ void _mapMatePairReads(
             }
         }
 
-        int bestLeftScore = MinValue<int>::VALUE;
-        int bestLibSizeError = MaxValue<int>::VALUE;
+        int bestLeftScore = std::numeric_limits<int>::min();
+        int bestLibSizeError = std::numeric_limits<int>::max();
         TDequeueIterator bestLeft = TDequeueIterator();
 
         bool rightVerified = false;
@@ -916,7 +916,7 @@ void _mapMatePairReads(
         }
 
         // verify right mate, if left mate matches
-        if (bestLeftScore != MinValue<int>::VALUE)
+        if (bestLeftScore != std::numeric_limits<int>::min())
         {
             fL.i2 = (*bestLeft).i2;
 
diff --git a/apps/razers3/razers_matepairs_parallel.h b/apps/razers3/razers_matepairs_parallel.h
index 7854ced..b57b37d 100644
--- a/apps/razers3/razers_matepairs_parallel.h
+++ b/apps/razers3/razers_matepairs_parallel.h
@@ -371,7 +371,7 @@ void initializeThreadLocalStoragesPaired(TThreadLocalStorages & threadLocalStora
         typedef typename TThreadLocalStorage::TMatchFilter TMatchFilter;
         double READ_FRAC_WITH_HISTO = 0.01;
         tls.matchFilter.reset(new TMatchFilter(tls.splitters[i + 1] - tls.splitters[i], options.matchHistoStartThreshold, READ_FRAC_WITH_HISTO, tls, tls.splitters[i], tls.globalStore->readSeqStore, tls.options));
-        tls.options.compactThresh = MaxValue<unsigned>::VALUE;
+        tls.options.compactThresh = std::numeric_limits<unsigned>::max();
 #endif // #ifdef RAZERS_DEFER_COMPACTION
 
         unsigned offset = splitters[i];
@@ -663,8 +663,8 @@ void workVerification(ThreadLocalStorage<MapPairedReads<TMatches, TFragmentStore
             }
         }
 
-        int bestLeftScore = MinValue<int>::VALUE;
-        int bestLibSizeError = MaxValue<int>::VALUE;
+        int bestLeftScore = std::numeric_limits<int>::min();
+        int bestLibSizeError = std::numeric_limits<int>::max();
         TDequeueIterator bestLeft = TDequeueIterator();
 
         bool rightVerified = false;
@@ -822,7 +822,7 @@ void workVerification(ThreadLocalStorage<MapPairedReads<TMatches, TFragmentStore
         }
 
         // (4) Verify right mate, if left mate matches.
-        if (bestLeftScore != MinValue<int>::VALUE)
+        if (bestLeftScore != std::numeric_limits<int>::min())
         {
             fL.i2 = (*bestLeft).i2;
 
@@ -1477,7 +1477,7 @@ int _mapMatePairReadsParallel(
 
     // Save compaction threshold and set global threshold to infinity, so matchVerify does not compact!
     int oldThreshold = options.compactThresh;
-    options.compactThresh = MaxValue<unsigned>::VALUE;
+    options.compactThresh = std::numeric_limits<unsigned>::max();
 
     SEQAN_PROTIMESTART(findTime);
     for (int contigId = 0; contigId < (int)length(store.contigStore); ++contigId)
diff --git a/apps/razers3/razers_paired_match_filter.h b/apps/razers3/razers_paired_match_filter.h
index c4d9049..4eaac9d 100644
--- a/apps/razers3/razers_paired_match_filter.h
+++ b/apps/razers3/razers_paired_match_filter.h
@@ -83,7 +83,7 @@ inline void
 registerRead(PairedMatchFilter<TOptionsSpec, TReadSeqSet, TCallback> & filter, unsigned pairId, int score)
 {
     // std::cerr << "registering read " << pairId << std::endl;
-    if (filter.hitCount[pairId - filter.readOffset] == MaxValue<unsigned>::VALUE)
+    if (filter.hitCount[pairId - filter.readOffset] == std::numeric_limits<unsigned>::max())
         return;
 
     if (++filter.hitCount[pairId - filter.readOffset] < filter.matchThreshold)
@@ -170,7 +170,7 @@ processRead(PairedMatchFilter<TOptionsSpec, TReadSeqSet, TCallback> & filter, un
     {
         _freeHistogram(filter, histogramId);
         filter.pairIdToHistogramId.erase(pairId);
-        filter.hitCount[pairId - filter.readOffset] = MaxValue<unsigned>::VALUE;
+        filter.hitCount[pairId - filter.readOffset] = std::numeric_limits<unsigned>::max();
         return true;
     }
     return false;
diff --git a/apps/razers3/razers_parallel.h b/apps/razers3/razers_parallel.h
index 3555004..7113973 100644
--- a/apps/razers3/razers_parallel.h
+++ b/apps/razers3/razers_parallel.h
@@ -353,8 +353,8 @@ writeBackToLocal(ThreadLocalStorage<MapSingleReads<TMatches, TFragmentStore, TFi
     unsigned const DELTA = getMaxDeviationOfOrder(tls.filterPattern);
     // std::cerr << "(DELTA=" << DELTA << ")";
     //std::cerr << "[DELTA=" << DELTA << std::endl;
-    size_t firstBeginPos = MaxValue<size_t>::VALUE;  // Leftmost sort position, required later for masking.
-    size_t firstWindowBegin = MaxValue<size_t>::VALUE;  // Leftmost sort position, required later for masking.
+    size_t firstBeginPos = std::numeric_limits<size_t>::max();  // Leftmost sort position, required later for masking.
+    size_t firstWindowBegin = std::numeric_limits<size_t>::max();  // Leftmost sort position, required later for masking.
     unsigned bucketsWrittenBack = 0;
     // (2) Write back the longest contiguous sequence of full buckets.
     for (; tls.nextBucketToWriteBack < length(tls.missingInBucket) && tls.missingInBucket[tls.nextBucketToWriteBack] == 0u; ++tls.nextBucketToWriteBack, ++bucketsWrittenBack)
@@ -394,7 +394,7 @@ writeBackToLocal(ThreadLocalStorage<MapSingleReads<TMatches, TFragmentStore, TFi
         size_t dPos = 1;
         // Exponential search backwards.  After masking, reads are sorted by begin position.
         size_t windowBegin = tls.options.windowSize * idx;
-        if (firstWindowBegin == MaxValue<size_t>::VALUE)
+        if (firstWindowBegin == std::numeric_limits<size_t>::max())
             firstWindowBegin = windowBegin;
         while (beginPos > 0u &&
                static_cast<size_t>(tls.matches[beginPos].beginPos) < windowBegin &&
@@ -414,7 +414,7 @@ writeBackToLocal(ThreadLocalStorage<MapSingleReads<TMatches, TFragmentStore, TFi
         // LessBeginPos<TMatch> cmp;
         // TIterator it = std::lower_bound(begin(tls.matches, Standard()) + beginPos, end(tls.matches, Standard()), m, cmp);
         // beginPos = it - begin(tls.matches, Standard());
-        if (firstBeginPos == MaxValue<size_t>::VALUE)
+        if (firstBeginPos == std::numeric_limits<size_t>::max())
             firstBeginPos = beginPos;
 
 // SEQAN_OMP_PRAGMA(critical)
@@ -675,7 +675,7 @@ void _mapSingleReadsParallelToContig(
 // SEQAN_OMP_PRAGMA(critical)
 //         std::cerr << "window count: " << length(tls.verificationResultBuckets) << std::endl;
         clear(tls.missingInBucket);
-        resize(tls.missingInBucket, length(tls.verificationResultBuckets), MaxValue<unsigned>::VALUE);
+        resize(tls.missingInBucket, length(tls.verificationResultBuckets), std::numeric_limits<unsigned>::max());
 
         // For each filtration window...
         bool hasMore = !empty(host(tls.filterFinder));
@@ -841,7 +841,7 @@ void initializeThreadLocalStoragesSingle(TThreadLocalStorages & threadLocalStora
         typedef typename TThreadLocalStorage::TMatchFilter TMatchFilter;
         double READ_FRAC_WITH_HISTO = 0.01;
         tls.matchFilter.reset(new TMatchFilter(tls.splitters[tls.threadId + 1] - tls.splitters[tls.threadId], options.matchHistoStartThreshold, READ_FRAC_WITH_HISTO, tls, tls.splitters[tls.threadId], tls.globalStore->readSeqStore, tls.options));
-        tls.options.compactThresh = MaxValue<unsigned>::VALUE;
+        tls.options.compactThresh = std::numeric_limits<unsigned>::max();
 #endif // #ifdef RAZERS_DEFER_COMPACTION
 
         // Clear pattern and set parameters.
@@ -1022,7 +1022,7 @@ int _mapSingleReadsParallel(
 
     // Save compaction threshold and set global threshold to infinity, so matchVerify does not compact!
     int oldThreshold = options.compactThresh;
-    options.compactThresh = MaxValue<unsigned>::VALUE;
+    options.compactThresh = std::numeric_limits<unsigned>::max();
 
     // For each contig: Map reads in parallel.
     SEQAN_PROTIMESTART(findTime);
diff --git a/apps/razers3/readSimulator.h b/apps/razers3/readSimulator.h
index aa3df4c..3a52a92 100644
--- a/apps/razers3/readSimulator.h
+++ b/apps/razers3/readSimulator.h
@@ -381,7 +381,7 @@ void simulateReads(
             TMyersPattern &myersPattern = forwardPattern;
 
             // find end of best semi-global alignment
-            int maxScore = MinValue<int>::VALUE;
+            int maxScore = std::numeric_limits<int>::min();
             int minScore = -(int)countErrors;
             TMyersFinder maxPos;
             while (find(myersFinder, myersPattern, minScore))
diff --git a/apps/rep_sep/CMakeLists.txt b/apps/rep_sep/CMakeLists.txt
index c8b6312..403ddab 100644
--- a/apps/rep_sep/CMakeLists.txt
+++ b/apps/rep_sep/CMakeLists.txt
@@ -10,7 +10,7 @@ cmake_minimum_required (VERSION 3.0.0)
 project (seqan_apps_rep_sep CXX)
 message (STATUS "Configuring apps/rep_sep")
 
-set (SEQAN_APP_VERSION "0.1.10")
+set (SEQAN_APP_VERSION "0.1.11")
 
 # ----------------------------------------------------------------------------
 # Dependencies
@@ -64,7 +64,7 @@ endif (NOT SEQAN_PREFIX_SHARE_DOC)
 
 # Install rep_sep in ${PREFIX}/bin directory
 install (TARGETS rep_sep
-         DESTINATION bin)
+         DESTINATION ${CMAKE_INSTALL_BINDIR})
 
 # Install non-binary files for the package to "." for app builds and
 # ${PREFIX}/share/doc/rep_sep for SeqAn release builds.
diff --git a/apps/sak/CMakeLists.txt b/apps/sak/CMakeLists.txt
index 3687181..6bbb84f 100644
--- a/apps/sak/CMakeLists.txt
+++ b/apps/sak/CMakeLists.txt
@@ -10,7 +10,7 @@ cmake_minimum_required (VERSION 3.0.0)
 project (seqan_apps_sak CXX)
 message (STATUS "Configuring apps/sak")
 
-set (SEQAN_APP_VERSION "0.4.7")
+set (SEQAN_APP_VERSION "0.4.8")
 
 # ----------------------------------------------------------------------------
 # Dependencies
@@ -68,7 +68,7 @@ endif (NOT SEQAN_PREFIX_SHARE_DOC)
 
 # Install sak in ${PREFIX}/bin directory
 install (TARGETS sak
-         DESTINATION bin)
+         DESTINATION ${CMAKE_INSTALL_BINDIR})
 
 # Install non-binary files for the package to "." for app builds and
 # ${PREFIX}/share/doc/sak for SeqAn release builds.
@@ -77,7 +77,7 @@ install (FILES LICENSE
                ${CMAKE_CURRENT_BINARY_DIR}/README.sak.txt
          DESTINATION ${SEQAN_PREFIX_SHARE_DOC})
 install (FILES ${CMAKE_CURRENT_BINARY_DIR}/sak.1
-         DESTINATION ${SEQAN_PREFIX_SHARE_DOC}/man)
+         DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
 
 # ----------------------------------------------------------------------------
 # App Test
diff --git a/apps/sak/sak.cpp b/apps/sak/sak.cpp
index bb1f23a..a13f549 100644
--- a/apps/sak/sak.cpp
+++ b/apps/sak/sak.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                                  SAK
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -85,9 +85,9 @@ struct SakOptions
     SakOptions() :
         verbosity(1),
         seqInfixBegin(0),
-        seqInfixEnd(seqan::maxValue<uint64_t>()),
+        seqInfixEnd(std::numeric_limits<uint64_t>::max()),
         reverseComplement(false),
-        maxLength(seqan::maxValue<uint64_t>())
+        maxLength(std::numeric_limits<uint64_t>::max())
     {
     }
 };
@@ -118,7 +118,7 @@ bool parseRange(TNum & beginPos, TNum & endPos, seqan::CharString const & rangeS
 
     if (empty(buffer))
     {
-        endPos = seqan::maxValue<TNum>();
+        endPos = std::numeric_limits<TNum>::max();
         return true;
     }
 
@@ -354,12 +354,12 @@ int main(int argc, char ** argv)
     }
 
     // Compute index of last sequence to write if any.
-    uint64_t endIdx = seqan::maxValue<uint64_t>();
+    uint64_t endIdx = std::numeric_limits<uint64_t>::max();
     for (unsigned i = 0; i < length(options.seqIndices); ++i)
-        if (endIdx == seqan::maxValue<uint64_t>() || endIdx > options.seqIndices[i] + 1)
+        if (endIdx == std::numeric_limits<uint64_t>::max() || endIdx > options.seqIndices[i] + 1)
             endIdx = options.seqIndices[i] + 1;
     for (unsigned i = 0; i < length(options.seqIndexRanges); ++i)
-        if (endIdx == seqan::maxValue<uint64_t>() || endIdx > options.seqIndexRanges[i].i2)
+        if (endIdx == std::numeric_limits<uint64_t>::max() || endIdx > options.seqIndexRanges[i].i2)
             endIdx = options.seqIndexRanges[i].i2;
     if (options.verbosity >= 2)
         std::cerr << "Sequence end idx: " << endIdx << "\n";
diff --git a/apps/sam2matrix/CMakeLists.txt b/apps/sam2matrix/CMakeLists.txt
index e0d60ad..3660c89 100644
--- a/apps/sam2matrix/CMakeLists.txt
+++ b/apps/sam2matrix/CMakeLists.txt
@@ -10,7 +10,7 @@ cmake_minimum_required (VERSION 3.0.0)
 project (seqan_apps_sam2matrix CXX)
 message (STATUS "Configuring apps/sam2matrix")
 
-set (SEQAN_APP_VERSION "0.3.7")
+set (SEQAN_APP_VERSION "0.3.8")
 
 # ----------------------------------------------------------------------------
 # Dependencies
@@ -56,7 +56,7 @@ endif (NOT SEQAN_PREFIX_SHARE_DOC)
 
 # Install sam2matrix in ${PREFIX}/bin directory
 install (TARGETS sam2matrix
-         DESTINATION bin)
+         DESTINATION ${CMAKE_INSTALL_BINDIR})
 
 # Install non-binary files for the package to "." for app builds and
 # ${PREFIX}/share/doc/sam2matrix for SeqAn release builds.
diff --git a/apps/sam2matrix/LICENSE b/apps/sam2matrix/LICENSE
index 9b933f5..948c7f4 100644
--- a/apps/sam2matrix/LICENSE
+++ b/apps/sam2matrix/LICENSE
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/sam2matrix/sam2matrix.cpp b/apps/sam2matrix/sam2matrix.cpp
index 6ed4039..5ccda5a 100644
--- a/apps/sam2matrix/sam2matrix.cpp
+++ b/apps/sam2matrix/sam2matrix.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                              sam2matrix
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/samcat/CMakeLists.txt b/apps/samcat/CMakeLists.txt
index 963ec67..2473fa0 100644
--- a/apps/samcat/CMakeLists.txt
+++ b/apps/samcat/CMakeLists.txt
@@ -10,7 +10,7 @@ cmake_minimum_required (VERSION 3.0.0)
 project (seqan_apps_samcat CXX)
 message (STATUS "Configuring apps/samcat")
 
-set (SEQAN_APP_VERSION "0.3.7")
+set (SEQAN_APP_VERSION "0.3.8")
 
 # ----------------------------------------------------------------------------
 # Dependencies
@@ -23,6 +23,11 @@ if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP")
     find_package (SeqAn CONFIG REQUIRED)
 endif ()
 
+if (NOT ZLIB_FOUND)
+  message (STATUS "  ZLIB not found: samcat will not be built.")
+  return ()
+endif ()
+
 # ----------------------------------------------------------------------------
 # Build Setup
 # ----------------------------------------------------------------------------
@@ -58,7 +63,7 @@ endif (NOT SEQAN_PREFIX_SHARE_DOC)
 
 # Install samcat in ${PREFIX}/bin directory
 install (TARGETS samcat
-         DESTINATION bin)
+         DESTINATION ${CMAKE_INSTALL_BINDIR})
 
 # Install non-binary files for the package to "." for app builds and
 # ${PREFIX}/share/doc/samcat for SeqAn release builds.
diff --git a/apps/samcat/samcat.cpp b/apps/samcat/samcat.cpp
index 51991e3..7a6e472 100755
--- a/apps/samcat/samcat.cpp
+++ b/apps/samcat/samcat.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                                   samcat
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/searchjoin/CMakeLists.txt b/apps/searchjoin/CMakeLists.txt
index 576df51..6c9bfed 100644
--- a/apps/searchjoin/CMakeLists.txt
+++ b/apps/searchjoin/CMakeLists.txt
@@ -10,7 +10,12 @@ cmake_minimum_required (VERSION 3.0.0)
 project (seqan_apps_searchjoin CXX)
 message (STATUS "Configuring apps/searchjoin")
 
-set (SEQAN_APP_VERSION "0.5.7")
+set (SEQAN_APP_VERSION "0.5.8")
+
+if (SEQAN_TRAVIS_BUILD)
+    message (STATUS "  Skipping build and test of searchjoin on Travis CI.")
+    return ()
+endif (SEQAN_TRAVIS_BUILD)
 
 # ----------------------------------------------------------------------------
 # Dependencies
@@ -30,20 +35,13 @@ endif ()
 include_directories (${SEQAN_INCLUDE_DIRS})
 
 # Add definitions set by find_package (SeqAn).
-add_definitions (${SEQAN_DEFINITIONS})
+add_definitions (${SEQAN_DEFINITIONS} -DSEARCHJOIN_HUGEDB=TRUE)
 
 # Add definitions set by the build system.
 add_definitions (-DSEQAN_APP_VERSION="${SEQAN_APP_VERSION}")
 add_definitions (-DSEQAN_REVISION="${SEQAN_REVISION}")
 add_definitions (-DSEQAN_DATE="${SEQAN_DATE}")
 
-# Lightweight CI builds.
-if (NOT SEQAN_TRAVIS_BUILD)
-    add_definitions (-DSEARCHJOIN_HUGEDB=TRUE)
-else (NOT SEQAN_TRAVIS_BUILD)
-    message (STATUS "  Building searchjoin without huge db support on Travis CI.")
-endif (NOT SEQAN_TRAVIS_BUILD)
-
 # Update the list of file names below if you add source files to your application.
 add_executable (s4_search search.cpp finder.h db.h verifier.h writer.h)
 add_executable (s4_join join.cpp finder.h db.h verifier.h writer.h)
@@ -66,7 +64,7 @@ endif (NOT SEQAN_PREFIX_SHARE_DOC)
 
 # Install searchjoin in ${PREFIX}/bin directory
 install (TARGETS s4_search s4_join
-         DESTINATION bin)
+         DESTINATION ${CMAKE_INSTALL_BINDIR})
 
 # Install non-binary files for the package to "." for app builds and
 # ${PREFIX}/share/doc/searchjoin for SeqAn release builds.
diff --git a/apps/searchjoin/LICENSE b/apps/searchjoin/LICENSE
index 9934a11..a8fe27b 100644
--- a/apps/searchjoin/LICENSE
+++ b/apps/searchjoin/LICENSE
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/searchjoin/db.h b/apps/searchjoin/db.h
index 2ef7a45..7f6d45f 100644
--- a/apps/searchjoin/db.h
+++ b/apps/searchjoin/db.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -159,7 +159,7 @@ struct Fibre<TDbGeoSaHuge, FibreSA>
 //template <typename TText>
 //struct ShapeLength
 //{
-//    static const unsigned VALUE = MaxValue<typename Size<TText>::Type>::VALUE;
+//    static const unsigned VALUE = std::numeric_limits<typename Size<TText>::Type>::max();
 //};
 //
 //template <>
@@ -511,8 +511,8 @@ bool load(Db<TText, TSpec> & db, TFileName const & fileName)
     TDbParser parser(db);
 
     // Initialize min/max text length.
-    db.minLength = MaxValue<TTextSize>::VALUE;
-    db.maxLength = MinValue<TTextSize>::VALUE;
+    db.minLength = std::numeric_limits<TTextSize>::max();
+    db.maxLength = std::numeric_limits<TTextSize>::min();
 
     // Read the file.
     while (!atEnd(inputIt))
@@ -573,10 +573,10 @@ void split(Db<TText, Query> & dbShort, Db<TText, Query> & dbLong, Db<TText, Quer
     TDbSize dbSize = length(db.text);
 
     // Initialize min/max text length.
-    dbShort.minLength = MaxValue<TTextSize>::VALUE;
-    dbShort.maxLength = MinValue<TTextSize>::VALUE;
-    dbLong.minLength = MaxValue<TTextSize>::VALUE;
-    dbLong.maxLength = MinValue<TTextSize>::VALUE;
+    dbShort.minLength = std::numeric_limits<TTextSize>::max();
+    dbShort.maxLength = std::numeric_limits<TTextSize>::min();
+    dbLong.minLength = std::numeric_limits<TTextSize>::max();
+    dbLong.maxLength = std::numeric_limits<TTextSize>::min();
 
     for (TDbSize dbId = 0; dbId < dbSize; ++dbId)
     {
@@ -834,7 +834,7 @@ void build(DbIndex<Index<TText, TIndexSpec>, TDbIndexSpec> & dbIndex,
 //        }
 //    }
 //
-//    QGramLess_<TIndexSAPos, TText const> less(db.text, MaxValue<TTextSize>::VALUE);
+//    QGramLess_<TIndexSAPos, TText const> less(db.text, std::numeric_limits<TTextSize>::max());
 //    sort(sa, less, Parallel());
 }
 
@@ -923,7 +923,7 @@ void _buildSA(TIndexSAFibre & sa,
         TTextSize textLength = length(text);
 
         TErrors errors = getErrors(db, dbId);
-        
+
         TTextSize seedCount = _max(textLength / seedLength, 1u);
         TSeedErrors seedErrors_ = errors / seedCount;
         TTextSize seedCountHigh = (errors % seedCount) + 1;
diff --git a/apps/searchjoin/finder.h b/apps/searchjoin/finder.h
index e6cf4f7..be05d66 100644
--- a/apps/searchjoin/finder.h
+++ b/apps/searchjoin/finder.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/searchjoin/join.cpp b/apps/searchjoin/join.cpp
index 63357b3..8f638c9 100644
--- a/apps/searchjoin/join.cpp
+++ b/apps/searchjoin/join.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/searchjoin/search.cpp b/apps/searchjoin/search.cpp
index f769b97..4fa0a76 100644
--- a/apps/searchjoin/search.cpp
+++ b/apps/searchjoin/search.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/searchjoin/tests/run_tests.py b/apps/searchjoin/tests/run_tests.py
index 6e347bb..aef16ef 100644
--- a/apps/searchjoin/tests/run_tests.py
+++ b/apps/searchjoin/tests/run_tests.py
@@ -13,6 +13,7 @@ import logging
 import os.path
 import sys
 import glob
+import platform
 
 # Automagically add util/py_lib to PYTHONPATH environment variable.
 path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..',
@@ -29,6 +30,11 @@ transforms = [
 def main(source_base, binary_base):
     """Main entry point of the script."""
 
+    if platform.machine().startswith('alpha'):
+        print 'Skipping tests for searchjoin on alpha'
+        print '======================================'
+        return 0
+
     print 'Executing test for searchjoin'
     print '==========================='
     print
diff --git a/apps/searchjoin/verifier.h b/apps/searchjoin/verifier.h
index 2ddc1d3..aae19d0 100644
--- a/apps/searchjoin/verifier.h
+++ b/apps/searchjoin/verifier.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/searchjoin/writer.h b/apps/searchjoin/writer.h
index eb657f4..991769d 100644
--- a/apps/searchjoin/writer.h
+++ b/apps/searchjoin/writer.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/seqan_tcoffee/CMakeLists.txt b/apps/seqan_tcoffee/CMakeLists.txt
index 66e85e2..6d6ceba 100644
--- a/apps/seqan_tcoffee/CMakeLists.txt
+++ b/apps/seqan_tcoffee/CMakeLists.txt
@@ -10,7 +10,7 @@ cmake_minimum_required (VERSION 3.0.0)
 project (seqan_apps_seqan_tcoffee CXX)
 message (STATUS "Configuring apps/seqan_tcoffee")
 
-set (SEQAN_APP_VERSION "1.13.7")
+set (SEQAN_APP_VERSION "1.13.8")
 
 # ----------------------------------------------------------------------------
 # Dependencies
@@ -56,7 +56,7 @@ endif (NOT SEQAN_PREFIX_SHARE_DOC)
 
 # Install seqan_tcoffee in ${PREFIX}/bin directory
 install (TARGETS seqan_tcoffee
-         DESTINATION bin)
+         DESTINATION ${CMAKE_INSTALL_BINDIR})
 
 # Install non-binary files for the package to "." for app builds and
 # ${PREFIX}/share/doc/seqan_tcoffee for SeqAn release builds.
diff --git a/apps/seqan_tcoffee/README b/apps/seqan_tcoffee/README
index 2828c19..0f823a7 100644
--- a/apps/seqan_tcoffee/README
+++ b/apps/seqan_tcoffee/README
@@ -16,25 +16,23 @@ Table of Contents
 
 SeqAn::T-Coffee is distributed with SeqAn, http://www.seqan.de. 
 You can build it using the latest snapshot or directly from
-the SVN repository.
+the Github repository.
 
 Snapshot:
 
-  1)  Download the latest snapshot of SeqAn
+  1)  Download the latest snapshot of SeqAn::T-Coffee (http://packages.seqan.de/seqan_tcoffee/)
   2)  Unzip it to a directory of your choice (e.g. snapshot)
-  3)  cd snapshot/apps
-  4)  make seqan_tcoffee
-  5)  cd seqan_tcoffee
-  6)  ./seqan_tcoffee --help
+  3)  cd snapshot/bin
+  4)  ./seqan_tcoffee --help
 
-SVN:
+Git:
 
-  1)  svn co http://svn.mi.fu-berlin.de/seqan/trunk/seqan
-  2)  cd seqan
-  3)  make forwards
-  4)  cd projects/library/apps
+  1)  git clone https://github.com/seqan/seqan.git
+  2)  mkdir seqan_build
+  3)  cd seqan_build
+  4)  cmake ../seqan
   5)  make seqan_tcoffee
-  6)  cd seqan_tcoffee
+  6)  cd bin
   7)  ./seqan_tcoffee --help
 
 ---------------------------------------------------------------------------
diff --git a/apps/seqan_tcoffee/seqan_tcoffee.cpp b/apps/seqan_tcoffee/seqan_tcoffee.cpp
index 2c62438..0446550 100644
--- a/apps/seqan_tcoffee/seqan_tcoffee.cpp
+++ b/apps/seqan_tcoffee/seqan_tcoffee.cpp
@@ -17,6 +17,8 @@ Lesser General Public License for more details.
 
 //#define SEQAN_TCOFFEE_DEBUG
 
+#include <cstdlib>
+
 #include <seqan/basic.h>
 #include <seqan/graph_msa.h>
 #include <seqan/modifier.h>
@@ -67,7 +69,16 @@ customizedMsaAlignment(MsaOptions<TAlphabet, TScore> const& msaOpt)
     Graph<Alignment<StringSet<TSequence, Dependent<> >, void, WithoutEdgeId> > gAlign;
 
     // MSA
-    globalMsaAlignment(gAlign, sequenceSet, sequenceNames, msaOpt);
+    try
+    {
+        globalMsaAlignment(gAlign, sequenceSet, sequenceNames, msaOpt);
+    }
+    catch (const std::bad_alloc & exception)
+    {
+        std::cerr << "Allocation for globalAlignment failed. Use smaller data or try a seeded alignment. \n"
+                  << exception.what() << std::endl;
+        std::exit(EXIT_FAILURE);
+    }
 
     // Alignment output
     TOutStream outStream;
@@ -323,6 +334,26 @@ _initScoreMatrix(ArgumentParser& parser, Rna5 const)
 //////////////////////////////////////////////////////////////////////////////////
 
 inline void
+_initScoreMatrix(ArgumentParser& parser, Iupac const)
+{
+    String<char> matrix;
+    getOptionValue(matrix, parser, "matrix");
+    if (isSet(parser, "matrix"))
+    {
+        Score<int, ScoreMatrix<> > sc;
+        loadScoreMatrix(sc, toCString(matrix));
+        _initMsaParams<Iupac>(parser, sc);
+    }
+    else
+    {
+        Score<int> sc;
+        _initMsaParams<Iupac>(parser, sc);
+    }
+}
+
+//////////////////////////////////////////////////////////////////////////////////
+
+inline void
 _initScoreMatrix(ArgumentParser& parser, AminoAcid const)
 {
     String<char> matrix;
@@ -359,7 +390,7 @@ _setUpArgumentParser(ArgumentParser & parser)
     setValidValues(parser, "seq", getFileExtensions(Fasta()));  // allow only fasta files as input
 
     addOption(parser, ArgParseOption("a", "alphabet", "The used sequence alphabet.", ArgParseArgument::STRING));
-    setValidValues(parser, "alphabet", "protein dna rna");
+    setValidValues(parser, "alphabet", "protein dna rna iupac");
     setDefaultValue(parser, "alphabet", "protein");
 
     addOption(parser, ArgParseOption("o", "outfile", "Name of the output file.", ArgParseArgument::OUTPUT_FILE));
@@ -500,6 +531,8 @@ int main(int argc, const char *argv [])
         _initScoreMatrix(parser, Dna5());
     else if (alphabet == "rna")
         _initScoreMatrix(parser, Rna5());
+    else if (alphabet == "iupac")
+        _initScoreMatrix(parser, Iupac());
     else
         _initScoreMatrix(parser, AminoAcid());
 
diff --git a/apps/seqan_tcoffee/tests/run_tests.py b/apps/seqan_tcoffee/tests/run_tests.py
index 53d7459..0d58a27 100755
--- a/apps/seqan_tcoffee/tests/run_tests.py
+++ b/apps/seqan_tcoffee/tests/run_tests.py
@@ -12,6 +12,7 @@ Usage:  run_tests.py SOURCE_ROOT_PATH BINARY_ROOT_PATH
 import logging
 import os.path
 import sys
+import platform
 
 # Automagically add util/py_lib to PYTHONPATH environment variable.
 path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..',
@@ -23,6 +24,11 @@ import seqan.app_tests as app_tests
 def main(source_base, binary_base):
     """Main entry point of the script."""
 
+    if platform.machine().startswith('mips') or platform.machine().startswith('s390'):
+        print 'Skipping tests for seqan_tcoffee on mips* and s390*'
+        print '==================================================='
+        return 0
+
     print 'Executing test for seqan_tcoffee'
     print '================================'
     print
diff --git a/apps/seqcons2/CMakeLists.txt b/apps/seqcons2/CMakeLists.txt
index 8b5fcc2..a478ede 100644
--- a/apps/seqcons2/CMakeLists.txt
+++ b/apps/seqcons2/CMakeLists.txt
@@ -10,7 +10,7 @@ cmake_minimum_required (VERSION 3.0.0)
 project (seqan_apps_seqcons2 CXX)
 message (STATUS "Configuring apps/seqcons2")
 
-set (SEQAN_APP_VERSION "2.0.8")
+set (SEQAN_APP_VERSION "2.0.9")
 
 # ----------------------------------------------------------------------------
 # Dependencies
@@ -62,7 +62,7 @@ endif (NOT SEQAN_PREFIX_SHARE_DOC)
 
 # Install seqcons2 in ${PREFIX}/bin directory
 install (TARGETS seqcons2
-         DESTINATION bin)
+         DESTINATION ${CMAKE_INSTALL_BINDIR})
 
 # Install non-binary files for the package to "." for app builds and
 # ${PREFIX}/share/doc/seqcons2 for SeqAn release builds.
diff --git a/apps/seqcons2/LICENSE b/apps/seqcons2/LICENSE
index 0d02071..561f8fc 100644
--- a/apps/seqcons2/LICENSE
+++ b/apps/seqcons2/LICENSE
@@ -1,7 +1,7 @@
 // ==========================================================================
 //              Seqcons2 - Compute consensus from sequences.
 // ==========================================================================
-// Copyright (c) 2011-2015, Manuel Holtgrewe, FU Berlin
+// Copyright (c) 2011-2018, Manuel Holtgrewe, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/seqcons2/seqcons.cpp b/apps/seqcons2/seqcons.cpp
index e98df7e..7021471 100644
--- a/apps/seqcons2/seqcons.cpp
+++ b/apps/seqcons2/seqcons.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                                 SeqCons
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/seqcons2/seqcons_app.cpp b/apps/seqcons2/seqcons_app.cpp
index 5eb014d..a15fa35 100644
--- a/apps/seqcons2/seqcons_app.cpp
+++ b/apps/seqcons2/seqcons_app.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                                 SeqCons
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/seqcons2/seqcons_app.h b/apps/seqcons2/seqcons_app.h
index 04765cb..76c9ab3 100644
--- a/apps/seqcons2/seqcons_app.h
+++ b/apps/seqcons2/seqcons_app.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                                 SeqCons
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/seqcons2/seqcons_options.cpp b/apps/seqcons2/seqcons_options.cpp
index f8a5acc..76c0cc8 100644
--- a/apps/seqcons2/seqcons_options.cpp
+++ b/apps/seqcons2/seqcons_options.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                                 SeqCons
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/seqcons2/seqcons_options.h b/apps/seqcons2/seqcons_options.h
index 8a8d1e5..9d5e6aa 100644
--- a/apps/seqcons2/seqcons_options.h
+++ b/apps/seqcons2/seqcons_options.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                                 SeqCons
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/sgip/CMakeLists.txt b/apps/sgip/CMakeLists.txt
index 71a28ac..e36f1b0 100755
--- a/apps/sgip/CMakeLists.txt
+++ b/apps/sgip/CMakeLists.txt
@@ -10,7 +10,7 @@ cmake_minimum_required (VERSION 3.0.0)
 project (seqan_apps_sgip CXX)
 message (STATUS "Configuring apps/sgip")
 
-set (SEQAN_APP_VERSION "1.4.7")
+set (SEQAN_APP_VERSION "1.4.8")
 
 # ----------------------------------------------------------------------------
 # Dependencies
@@ -56,7 +56,7 @@ endif (NOT SEQAN_PREFIX_SHARE_DOC)
 
 # Install sgip in ${PREFIX}/bin directory
 install (TARGETS sgip
-         DESTINATION bin)
+         DESTINATION ${CMAKE_INSTALL_BINDIR})
 
 # Install non-binary files for the package to "." for app builds and
 # ${PREFIX}/share/doc/sgip for SeqAn release builds.
diff --git a/apps/sgip/sgip.cpp b/apps/sgip/sgip.cpp
index e2067e8..bb4d9a7 100755
--- a/apps/sgip/sgip.cpp
+++ b/apps/sgip/sgip.cpp
@@ -168,7 +168,7 @@ template <typename TParser>
 void _setupParser(TParser & parser)
 {
     setVersion(parser, SEQAN_APP_VERSION " [" SEQAN_REVISION "]");
-    addDescription(parser, " SGIP - Solution of Graph Isomorphism Problem");
+    setShortDescription(parser, "Solution of Graph Isomorphism Problem");
     addUsageLine(parser, "-o <original graph> [Option]");    
     addSection(parser, "Mandatory Options");
     addOption(parser, ArgParseOption("o", "original", "File containing original graph", ArgParseArgument::INPUT_FILE,"IN"));
diff --git a/apps/sgip/sgip_base.h b/apps/sgip/sgip_base.h
index a471240..0e3d3b6 100644
--- a/apps/sgip/sgip_base.h
+++ b/apps/sgip/sgip_base.h
@@ -310,11 +310,11 @@ inline int compare_(std::vector<TValue> const & obj1, std::vector<TValue> const
     tiEnd = obj2.end();
     while (it < itEnd && ti < tiEnd)
     {
-        if (getValue(it) < getValue(ti))
+        if (*it < *ti)
         {
             return -1;
         }
-        else if (getValue(it) > getValue(ti))
+        else if (*it > *ti)
         {
             return 1;
         }
diff --git a/apps/snp_store/CMakeLists.txt b/apps/snp_store/CMakeLists.txt
index e846ec3..83511a5 100644
--- a/apps/snp_store/CMakeLists.txt
+++ b/apps/snp_store/CMakeLists.txt
@@ -10,7 +10,7 @@ cmake_minimum_required (VERSION 3.0.0)
 project (seqan_apps_snp_store CXX)
 message (STATUS "Configuring apps/snp_store")
 
-set (SEQAN_APP_VERSION "1.3.7")
+set (SEQAN_APP_VERSION "1.3.8")
 
 # ----------------------------------------------------------------------------
 # Dependencies
@@ -71,7 +71,7 @@ endif (NOT SEQAN_PREFIX_SHARE_DOC)
 
 # Install snp_store in ${PREFIX}/bin directory
 install (TARGETS snp_store
-         DESTINATION bin)
+         DESTINATION ${CMAKE_INSTALL_BINDIR})
 
 # Install non-binary files for the package to "." for app builds and
 # ${PREFIX}/share/doc/snp_store for SeqAn release builds.
diff --git a/apps/snp_store/README b/apps/snp_store/README
index 69427cb..4112f41 100644
--- a/apps/snp_store/README
+++ b/apps/snp_store/README
@@ -26,7 +26,7 @@ Reads can optionally be realigned, using the ReAligner algorithm by Anson
 and Myers.
 
 Please note: SnpStore is work in progress! Keep yourself up to date by 
-checking out the latest version of SnpStore from the SeqAn SVN repository
+checking out the latest version of SnpStore from the SeqAn Git repository
 (instructions follow below).
 
 
@@ -45,13 +45,13 @@ http://www.seqan.de). To build SnpStore do the following:
   6)  ./apps/snp_store
 
 Alternatively - and this is what I recommend - you can check out the latest 
-SVN version of SnpStore and SeqAn with:
+Git version of SnpStore and SeqAn with:
 
-  1)  svn co http://svn.mi.fu-berlin.de/seqan/trunk/seqan
-  2)  cd seqan/build
+  1)  git clone https://github.com/seqan/seqan.git
+  2)  mkdir seqan/buld; cd seqan/build
   3)  cmake .. -DCMAKE_BUILD_TYPE=Release
-  5)  make snp_store
-  7)  ./apps/snp_store
+  4)  make snp_store
+  5)  ./bin/snp_store --help
 
 If successful, an executable file snp_store was built and a brief usage 
 description was dumped.
diff --git a/apps/snp_store/snp_store.cpp b/apps/snp_store/snp_store.cpp
index cb6ad0d..419e90f 100755
--- a/apps/snp_store/snp_store.cpp
+++ b/apps/snp_store/snp_store.cpp
@@ -158,8 +158,8 @@ copyNextWindowMatchesAndReads(TFragmentStore &fragmentStore,
     --mIt;
 
     // We will use minCoord/maxCoord to store the temporarily minimal and maximal coordinates in the window.
-    int minCoord = maxValue<int>();
-    int maxCoord = minValue<int>();
+    int minCoord = std::numeric_limits<int>::max();
+    int maxCoord = std::numeric_limits<int>::min();
     //CharString str = "discBef";
     //_dumpMatches(fragmentStore, str);
 
@@ -187,9 +187,9 @@ copyNextWindowMatchesAndReads(TFragmentStore &fragmentStore,
     }
 
     // Write minimal and maximal coordinate from reads in this window to options.minCoord/options.maxCoord.
-    if (minCoord != maxValue<int>())
+    if (minCoord != std::numeric_limits<int>::max())
         options.minCoord = minCoord;
-    if (maxCoord != minValue<int>())
+    if (maxCoord != std::numeric_limits<int>::min())
         options.maxCoord = maxCoord;
 
     if(options._debugLevel > 1)
@@ -817,7 +817,7 @@ int detectSNPs(SNPCallingOptions<TSpec> &options)
         TReadCounts tmpReadCounts;
         TReadClips tmpReadClips;
         TReadCigars tmpReadCigars;
-        options.minCoord = MaxValue<unsigned>::VALUE;
+        options.minCoord = std::numeric_limits<unsigned>::max();
         options.maxCoord = 0;
 
         // snp calling is done for all positions between windowBegin and windowEnd
diff --git a/apps/snp_store/snp_store.h b/apps/snp_store/snp_store.h
index 6aaee0f..2288c19 100755
--- a/apps/snp_store/snp_store.h
+++ b/apps/snp_store/snp_store.h
@@ -297,7 +297,7 @@ struct FragmentStoreConfig<SnpStoreGroupSpec_> :
 
             windowSize = 1000000;
             windowBuff = 70;
-            minCoord = maxValue<unsigned>();
+            minCoord = std::numeric_limits<unsigned>::max();
             maxCoord = 0;
             maxHitLength = 1;
 
@@ -1161,7 +1161,7 @@ int readMatchesFromGFF_Batch(
                 options.maxHitLength = endPos - beginPos;
 
             // remember min and max positions seen
-            if(beginPos < (TContigPos)options.minCoord || options.minCoord == maxValue<unsigned>()) options.minCoord = (unsigned)beginPos;
+            if(beginPos < (TContigPos)options.minCoord || options.minCoord == std::numeric_limits<unsigned>::max()) options.minCoord = (unsigned)beginPos;
             if(endPos > (TContigPos)options.maxCoord) options.maxCoord =  (unsigned)endPos;
 
             // create match m
@@ -1658,7 +1658,7 @@ int readMatchesFromSamBam_Batch(
                 options.maxHitLength = endPos - beginPos;
 
             // remember min and max positions seen
-            if(beginPos < (TContigPos)options.minCoord || options.minCoord == maxValue<unsigned>()) options.minCoord = (unsigned)beginPos;
+            if(beginPos < (TContigPos)options.minCoord || options.minCoord == std::numeric_limits<unsigned>::max()) options.minCoord = (unsigned)beginPos;
             if(endPos > (TContigPos)options.maxCoord) options.maxCoord =  (unsigned)endPos;
 
             // create match m
diff --git a/apps/splazers/CMakeLists.txt b/apps/splazers/CMakeLists.txt
index bb85d5d..77e0359 100644
--- a/apps/splazers/CMakeLists.txt
+++ b/apps/splazers/CMakeLists.txt
@@ -10,7 +10,7 @@ cmake_minimum_required (VERSION 3.0.0)
 project (seqan_apps_splazers CXX)
 message (STATUS "Configuring apps/splazers")
 
-set (SEQAN_APP_VERSION "1.3.7")
+set (SEQAN_APP_VERSION "1.3.8")
 
 # ----------------------------------------------------------------------------
 # Dependencies
@@ -68,7 +68,7 @@ endif (NOT SEQAN_PREFIX_SHARE_DOC)
 
 # Install splazers in ${PREFIX}/bin directory
 install (TARGETS splazers
-         DESTINATION bin)
+         DESTINATION ${CMAKE_INSTALL_BINDIR})
 
 # Install non-binary files for the package to "." for app builds and
 # ${PREFIX}/share/doc/splazers for SeqAn release builds.
diff --git a/apps/splazers/README b/apps/splazers/README
index 938b2e7..b6721f6 100644
--- a/apps/splazers/README
+++ b/apps/splazers/README
@@ -43,14 +43,13 @@ SeqAn projects download page: http://www.seqan.de/downloads/projects.html
 
 SplazerS is distributed with SeqAn - The C++ Sequence Analysis Library (see 
 http://www.seqan.de). To build SplazerS yourself you can check out the latest 
-SVN version of SplazerS and SeqAn with:
-
-  1)  svn co http://svn.mi.fu-berlin.de/seqan/trunk/seqan seqan-trunk
-  2)  mkdir seqan-trunk/build/
-  3)  cd seqan-trunk/build/
-  4)  cmake .. -DCMAKE_BUILD_TYPE=Release
-  5)  make splazers
-  6)  ./apps/splazers/splazers --help
+Git version of SplazerS and SeqAn with:
+
+  1)  git clone https://github.com/seqan/seqan.git
+  2)  mkdir seqan/buld; cd seqan/build
+  3)  cmake .. -DCMAKE_BUILD_TYPE=Release
+  4)  make splazers
+  5)  ./bin/splazers --help
 
 Alternatively, you can download the latest SeqAn snapshot and build SplazerS
 with:
diff --git a/apps/splazers/outputFormat.h b/apps/splazers/outputFormat.h
index 80557c4..3fd0f0c 100644
--- a/apps/splazers/outputFormat.h
+++ b/apps/splazers/outputFormat.h
@@ -1112,7 +1112,12 @@ void dumpMatches(
 			}
 			break;
 		case 3: // Gff:  printf "$chr $name_$format read $pos %ld . $dir . ID=$col[0]$unique$rest\n",$pos+$len-1;
-			for (unsigned filecount = 0; filecount < length(genomeFileNameList); ++filecount)
+			// NOTE(marehr): filecount+=2 might be a potential bug [https://github.com/seqan/seqan/issues/2165]
+			// In revision 4dbf27b55 and before, filecount was incremented twice at the
+			// end of the for loop, which caused a compiler warning (once in the body
+			// and once in the iteration_expression of the for loop). We kept this
+			// behaviour, because we have no active maintainer for this app.
+			for (unsigned filecount = 0; filecount < length(genomeFileNameList); filecount+=2)
 			{
 				// open genome file	
 				SeqFileIn gFile;
@@ -1358,7 +1363,6 @@ void dumpMatches(
 					}
 				}
 				close(gFile);
-				++filecount;
 			}
 			break;
 		case 4: // SAM output for splitMatches
diff --git a/apps/splazers/razers.h b/apps/splazers/razers.h
index 3c1669f..72e32ff 100644
--- a/apps/splazers/razers.h
+++ b/apps/splazers/razers.h
@@ -917,7 +917,7 @@ void countMatches(TMatches &matches, TCounts &cnt)
 	unsigned readNo = -1;
 	short editDist = -1;
 	int64_t count = 0;
-	int64_t maxVal = MaxValue<TValue>::VALUE;
+	int64_t maxVal = std::numeric_limits<TValue>::max();
 
 	for (; it != itEnd; ++it) 
 	{
@@ -954,7 +954,7 @@ setMaxErrors(TSwift &swift, TReadNo readNo, TMaxErrors maxErrors)
 	int minT = _qgramLemma(swift, readNo, maxErrors);
 	if (minT > 1)
 	{
-		if (maxErrors < 0) minT = MaxValue<int>::VALUE;
+		if (maxErrors < 0) minT = std::numeric_limits<int>::max();
 //		::std::cout<<" read:"<<readNo<<" newThresh:"<<minT;
 		setMinThreshold(swift, readNo, (unsigned)minT);
 	}
@@ -1002,7 +1002,7 @@ void compactMatches(TMatches &matches, TCounts &
 		++hitCountCutOff;	// we keep one more match than we actually want, so we can later decide
 							// whether the read mapped more than maxhits times 
 #endif
-	int editDistCutOff = MaxValue<int>::VALUE;
+	int editDistCutOff = std::numeric_limits<int>::max();
 
 	TIterator it = begin(matches, Standard());
 	TIterator itEnd = end(matches, Standard());
@@ -1165,7 +1165,7 @@ void purgeAmbiguousRnaMatches(TMatches &matches, RazerSOptions<TSpec> &options)
 	unsigned readNo = -1;
 	unsigned hitCount = 0;
 	unsigned hitCountCutOff = options.maxHits;
-	int editDistCutOff = MaxValue<int>::VALUE;
+	int editDistCutOff = std::numeric_limits<int>::max();
 
 	TIterator it = begin(matches, Standard());
 	TIterator itEnd = end(matches, Standard());
@@ -1406,7 +1406,7 @@ matchVerify(
 #endif
 
     unsigned ndlLength = sequenceLength(rseqNo, readSet);
-	int maxScore = MinValue<int>::VALUE;
+	int maxScore = std::numeric_limits<int>::min();
 	int minScore = -(int)(ndlLength * options.errorRate);
 	TMyersFinder maxPos;
 
diff --git a/apps/splazers/razers_matepairs.h b/apps/splazers/razers_matepairs.h
index f07e3d8..ff2ce7c 100644
--- a/apps/splazers/razers_matepairs.h
+++ b/apps/splazers/razers_matepairs.h
@@ -542,7 +542,7 @@ void compactPairMatches(TMatches &matches, TCounts & /*cnts*/, RazerSOptions<TSp
 	unsigned readNo = -1;
 	unsigned hitCount = 0;
 	unsigned hitCountCutOff = options.maxHits;
-	int scoreDistCutOff = MinValue<int>::VALUE;
+	int scoreDistCutOff = std::numeric_limits<int>::min();
 
 	TIterator it = begin(matches, Standard());
 	TIterator itEnd = end(matches, Standard());
@@ -744,8 +744,8 @@ void mapMatePairReads(
 				break;
 		}
 
-		int	bestLeftErrors = MaxValue<int>::VALUE;
-		int bestLibSizeError = MaxValue<int>::VALUE;
+		int	bestLeftErrors = std::numeric_limits<int>::max();
+		int bestLibSizeError = std::numeric_limits<int>::max();
 		TDequeueIterator bestLeft = TDequeueIterator();
 
 		TDequeueIterator it;
@@ -817,7 +817,7 @@ void mapMatePairReads(
 			value(fifo, lastPositive - firstNo).i1 = (int64_t)-1;
 		
 		// verify right mate, if left mate matches
-		if (bestLeftErrors != MaxValue<int>::VALUE)
+		if (bestLeftErrors != std::numeric_limits<int>::max())
 		{
 			if (matchVerify(
 					mR, infix(swiftFinderR),
diff --git a/apps/splazers/razers_spliced.h b/apps/splazers/razers_spliced.h
index 13b97c1..f370d67 100644
--- a/apps/splazers/razers_spliced.h
+++ b/apps/splazers/razers_spliced.h
@@ -210,7 +210,7 @@ bool loadReadsSam(
 	if (!open(file, fileName)) return false;
 
 	options.maxReadRegionsEnd = 0;
-	options.minReadRegionsStart = maxValue<int>();
+	options.minReadRegionsStart = std::numeric_limits<int>::max();
 	TContigPos regionBegin = options.minReadRegionsStart;
 	TContigPos regionEnd = options.maxReadRegionsEnd;
 
@@ -351,7 +351,7 @@ void compactSplicedMatches(TMatches &matches,
 	unsigned readNo = -1;
 	unsigned hitCount = 0;
 	unsigned hitCountCutOff = options.maxHits;
-	int scoreDistCutOff = MinValue<int>::VALUE;
+	int scoreDistCutOff = std::numeric_limits<int>::min();
 	
 	TIterator it = begin(matches, Standard());
 	TIterator itEnd = end(matches, Standard());
@@ -442,7 +442,7 @@ void compactAndCountSplicedMatches(TMatches &matches,
 	unsigned readNo = -1;
 	unsigned hitCount = 0;
 	unsigned hitCountCutOff = options.maxHits;
-	int scoreDistCutOff = MinValue<int>::VALUE;
+	int scoreDistCutOff = std::numeric_limits<int>::min();
 	
 	clear(states);
 	
@@ -643,7 +643,7 @@ matchVerify(
 #endif
 	
 	unsigned ndlLength = _min(sequenceLength(rseqNo, readSet),options.minMatchLen);
-	int maxScore = MinValue<int>::VALUE;
+	int maxScore = std::numeric_limits<int>::min();
 	int minScore = - maxNumSeedErrors(options,TSufPrefSpec());
 
 	TMyersFinder maxPos;
@@ -1117,7 +1117,7 @@ findBestSplitPosition(String<Pair<TScore,int> > & maxColsL,
 	::std::cout << "findBestSplitEditForward\n";
 #endif
 
-	TScore maxSum = minValue<TScore>();
+	TScore maxSum = std::numeric_limits<TScore>::min();
 	int bestL = rowPosL1;
 	int bestR = rowPosR1;
 	int bestTraceExtL = rowPosL1;
@@ -1319,8 +1319,8 @@ _alignBandedNeedlemanWunsch(TTrace& trace,
 	resize(mat, diagonalWidth);
 	resize(trace, height * diagonalWidth);
 //      ::std::cout <<height << "<-hieght\n";
-	overallMaxValue[0] = MinValue<TScoreValue>::VALUE;
-	overallMaxValue[1] = MinValue<TScoreValue>::VALUE;
+	overallMaxValue[0] = std::numeric_limits<TScoreValue>::min();
+	overallMaxValue[1] = std::numeric_limits<TScoreValue>::min();
 	overallMaxIndex[0] = diagonalWidth;     overallMaxIndex[1] = height;
 	overallMaxIndex[2] = diagonalWidth;     overallMaxIndex[3] = height;
 
@@ -1346,14 +1346,14 @@ _alignBandedNeedlemanWunsch(TTrace& trace,
 	TScoreValue verti_val = 0;
 	TScoreValue hori_val = 0;
 	for(TSize row = 0; row < height; ++row) {
-		TScoreValue maxRowVal = MinValue<TScoreValue>::VALUE;
+		TScoreValue maxRowVal = std::numeric_limits<TScoreValue>::min();
 		unsigned maxRowCol = 0;
 		actualRow = row + lo_row;
 		if (lo_diag > 0) --lo_diag;
 		if (row + lo_row >= len1 - diagU) --hi_diag;
 		TTraceIter traceIt = begin(trace, Standard()) + row * diagonalWidth + lo_diag;
 		TRowIter matIt = begin(mat, Standard()) + lo_diag;
-		hori_val = MinValue<TScoreValue>::VALUE;
+		hori_val = std::numeric_limits<TScoreValue>::min();
 		for(TSize col = lo_diag; col<hi_diag; ++col, ++matIt, ++traceIt) {
 			actualCol = col + diagL + actualRow;
 			//std::cerr << row << ',' << col << ':' << value(originalMat, actualRow * len1 + actualCol) << std::endl;
@@ -1365,14 +1365,14 @@ _alignBandedNeedlemanWunsch(TTrace& trace,
 				*traceIt = Diagonal;
 				if ((verti_val = (col < diagonalWidth - 1) ? *(matIt+1) +
 				    scoreGapExtendVertical(sc, sequenceEntryForScore(sc, str1, ((int) actualCol - 1)),
-				                           sequenceEntryForScore(sc, str2, ((int) actualRow - 1))) : MinValue<TScoreValue>::VALUE) > *matIt)
+				                           sequenceEntryForScore(sc, str2, ((int) actualRow - 1))) : std::numeric_limits<TScoreValue>::min()) > *matIt)
 				{
 					*matIt = verti_val;
 					*traceIt = Vertical;
 				}
 				if ((hori_val = (col > 0) ? hori_val +
 				    scoreGapExtendHorizontal(sc, sequenceEntryForScore(sc, str1, ((int) actualCol - 1)),
-				                             sequenceEntryForScore(sc, str2, ((int) actualRow - 1))) : MinValue<TScoreValue>::VALUE) > *matIt)
+				                             sequenceEntryForScore(sc, str2, ((int) actualRow - 1))) : std::numeric_limits<TScoreValue>::min()) > *matIt)
 				{
 					*matIt = hori_val;
 					*traceIt = Horizontal;
@@ -1481,7 +1481,7 @@ findBestSplitPosition(String<Pair<TScore,int> > & maxColsL,
 	::std::cout << "findBestSplitEditReverse\n";
 #endif
 
-	TScore maxSum = minValue<TScore>();
+	TScore maxSum = std::numeric_limits<TScore>::min();
 	int bestL = rowPosL2;
 	int bestR = rowPosR2;
 	int bestTraceExtR = rowPosL1;
diff --git a/apps/splazers/readSimulator.h b/apps/splazers/readSimulator.h
index 4c53fee..6bc11f6 100644
--- a/apps/splazers/readSimulator.h
+++ b/apps/splazers/readSimulator.h
@@ -381,7 +381,7 @@ void simulateReads(
 			TMyersPattern &myersPattern = forwardPattern;
 			
 			// find end of best semi-global alignment
-			int maxScore = MinValue<int>::VALUE;
+			int maxScore = std::numeric_limits<int>::min();
 			int minScore = -(int)countErrors;
 			TMyersFinder maxPos;
 			while (find(myersFinder, myersPattern, minScore))
diff --git a/apps/splazers/splazers.cpp b/apps/splazers/splazers.cpp
index 433b4f4..61dd6fc 100644
--- a/apps/splazers/splazers.cpp
+++ b/apps/splazers/splazers.cpp
@@ -303,6 +303,7 @@ int main(int argc, const char *argv[])
 #ifdef RAZERS_MATEPAIRS
 	addUsageLine(parser, "[\\fIOPTIONS\\fP] <\\fIGENOME FILE\\fP> <\\fIREADS FILE 1\\fP> <\\fIREADS FILE 2\\fP>");
 #endif
+    setShortDescription(parser, "Split-map read sequences");
     addDescription(parser,
             "SplazerS uses a prefix-suffix mapping strategy to split-map read sequences."
             "If a SAM file of mapped reads is given as input, all unmapped but anchored"
diff --git a/apps/stellar/CMakeLists.txt b/apps/stellar/CMakeLists.txt
index a94d1bf..3dc54aa 100644
--- a/apps/stellar/CMakeLists.txt
+++ b/apps/stellar/CMakeLists.txt
@@ -10,7 +10,7 @@ cmake_minimum_required (VERSION 3.0.0)
 project (seqan_apps_stellar CXX)
 message (STATUS "Configuring apps/stellar")
 
-set (SEQAN_APP_VERSION "1.4.10")
+set (SEQAN_APP_VERSION "1.4.11")
 
 # ----------------------------------------------------------------------------
 # Dependencies
@@ -60,7 +60,7 @@ endif (NOT SEQAN_PREFIX_SHARE_DOC)
 
 # Install stellar in ${PREFIX}/bin directory
 install (TARGETS stellar
-         DESTINATION bin)
+         DESTINATION ${CMAKE_INSTALL_BINDIR})
 
 # Install non-binary files for the package to "." for app builds and
 # ${PREFIX}/share/doc/stellar for SeqAn release builds.
diff --git a/apps/stellar/README b/apps/stellar/README
index 47e3513..e7486a4 100755
--- a/apps/stellar/README
+++ b/apps/stellar/README
@@ -47,14 +47,14 @@ http://www.seqan.de). To build STELLAR do the following:
   5)  make stellar
   6)  ./apps/stellar/stellar
 
-Alternatively you can check out the latest SVN version of STELLAR and SeqAn
+Alternatively you can check out the latest Git version of STELLAR and SeqAn
 with:
 
-  1)  svn co http://svn.mi.fu-berlin.de/seqan/trunk/seqan
-  2)  cd seqan/build/
+  1)  git clone https://github.com/seqan/seqan.git
+  2)  mkdir seqan/buld; cd seqan/build
   3)  cmake .. -DCMAKE_BUILD_TYPE=Release
   4)  make stellar
-  5)  ./apps/stellar/stellar
+  5)  ./bin/stellar --help
 
 On success, an executable file stellar was build and a brief usage 
 description was dumped.
diff --git a/apps/stellar/stellar.cpp b/apps/stellar/stellar.cpp
index 090f928..f253d47 100644
--- a/apps/stellar/stellar.cpp
+++ b/apps/stellar/stellar.cpp
@@ -187,7 +187,7 @@ _stellarOnAll(StringSet<TSequence> & databases,
     std::cout << std::endl;
 
     // file output
-    if (options.disableThresh != seqan::maxValue<unsigned>())
+    if (options.disableThresh != std::numeric_limits<unsigned>::max())
     {
         if (!_outputMatches(matches, queries, queryIDs, databases, options.verbose,
                             options.outputFile, options.outputFormat, options.disabledQueriesFile))
@@ -569,7 +569,7 @@ void _setParser(ArgumentParser & parser)
     setDefaultValue(parser, "o", "stellar.gff");
     addOption(parser, ArgParseOption("od", "outDisabled",
                                      "Name of output file for disabled query sequences.", ArgParseArgument::OUTPUT_FILE));
-    setValidValues(parser, "outDisabled", "fa fasta");
+    setValidValues(parser, "outDisabled", seqan::SeqFileOut::getFileExtensions());
     setDefaultValue(parser, "od", "stellar.disabled.fasta");
     addOption(parser, ArgParseOption("t", "no-rt", "Suppress printing running time."));
     hideOption(parser, "t");
@@ -637,7 +637,7 @@ int mainWithOptions(TOptions & options, String<TAlphabet>)
     }
     file.close();
 
-    if (options.disableThresh != seqan::maxValue<unsigned>())
+    if (options.disableThresh != std::numeric_limits<unsigned>::max())
     {
         std::ofstream daFile;
         daFile.open(toCString(options.disabledQueriesFile));
diff --git a/apps/stellar/stellar.h b/apps/stellar/stellar.h
index d67ffd0..8d9b51f 100755
--- a/apps/stellar/stellar.h
+++ b/apps/stellar/stellar.h
@@ -78,7 +78,7 @@ _appendNegativeSegment(TAlign const & align,
         }
         ++pos;
     }
-    if (pos == len) appendValue(queue, TMerger(beginPos, pos, minValue<TScoreValue>()+1));
+    if (pos == len) appendValue(queue, TMerger(beginPos, pos, MinValue<TScoreValue>::VALUE + 1));
     else appendValue(queue, TMerger(beginPos, pos, score));
 }
 
@@ -172,7 +172,7 @@ _splitAtXDrops(TAlign & align,
     String<TMerger> queue;
     TPos pos = _min(toViewPosition(row(align, 0), beginPosition(row(align, 0))),
                     toViewPosition(row(align, 1), beginPosition(row(align, 1))));
-    appendValue(queue, TMerger(pos, pos, minValue<TScoreValue1>()+1));
+    appendValue(queue, TMerger(pos, pos, MinValue<TScoreValue1>::VALUE + 1));
 
     TPos aliLength = _max(toViewPosition(row(align, 0), endPosition(row(align, 0))),
                           toViewPosition(row(align, 1), endPosition(row(align, 1))));
@@ -510,7 +510,7 @@ verifySwiftHit(Segment<TInfix, InfixSegment> const & infH,
     TScore match = 1;
     TScore mismatchIndel = (TScore)_max((TScore) ceil(-1/eps) + 1, -(TScore)length(host(infH)));
     Score<TScore> scoreMatrix(match, mismatchIndel, mismatchIndel);
-    TScore scoreDropOff = (TScore) _max((TScore) xDrop * (-mismatchIndel), minValue<TScore>()+1);
+    TScore scoreDropOff = (TScore) _max((TScore) xDrop * (-mismatchIndel), MinValue<TScore>::VALUE + 1);
 
     // diagonals for banded alignment
     int64_t upperDiag = 0;
@@ -576,7 +576,7 @@ verifySwiftHit(Segment<TInfix, InfixSegment> const & infH,
     TScore match = 1;
     TScore mismatchIndel = (TScore)_max((TScore) ceil(-1/eps) + 1, -(TScore)length(host(infH)));
     Score<TScore> scoreMatrix(match, mismatchIndel, mismatchIndel);
-    TScore scoreDropOff = (TScore) _max((TScore) xDrop * (-mismatchIndel), minValue<TScore>()+1);
+    TScore scoreDropOff = (TScore) _max((TScore) xDrop * (-mismatchIndel), MinValue<TScore>::VALUE + 1);
 
     // calculate minimal score for local alignments
     TEpsilon e = floor(eps*minLength);
diff --git a/apps/stellar/stellar_extension.h b/apps/stellar/stellar_extension.h
index b9b9cfb..3b8c879 100644
--- a/apps/stellar/stellar_extension.h
+++ b/apps/stellar/stellar_extension.h
@@ -294,7 +294,7 @@ _align_banded_nw_best_ends(TTrace& trace,
 		TTraceIter traceIt = begin(trace, Standard()) + row * diagonalWidth + lo_diag;
 		TRowIter matIt = begin(mat, Standard()) + lo_diag;
 		TRowIter lenIt = begin(len, Standard()) + lo_diag;
-		hori_val = MinValue<TScoreValue>::VALUE;
+		hori_val = std::numeric_limits<TScoreValue>::min();
 		hori_len = len1+len2+1;
 		for(TSize col = lo_diag; col<hi_diag; ++col, ++matIt, ++traceIt, ++lenIt) {
 			actualCol = col + diagL + actualRow;
@@ -308,7 +308,7 @@ _align_banded_nw_best_ends(TTrace& trace,
 				++(*lenIt);
 				if ((verti_val = (col < diagonalWidth - 1) ? *(matIt+1) +
 				    scoreGapExtendVertical(sc,sequenceEntryForScore(sc, str1, ((int) actualCol - 1)),
-				                           sequenceEntryForScore(sc, str2, ((int) actualRow - 1))) : MinValue<TScoreValue>::VALUE) > *matIt)
+				                           sequenceEntryForScore(sc, str2, ((int) actualRow - 1))) : std::numeric_limits<TScoreValue>::min()) > *matIt)
 				{
 					*matIt = verti_val;
 					*traceIt = Vertical;
@@ -316,7 +316,7 @@ _align_banded_nw_best_ends(TTrace& trace,
 				}						
 				if ((hori_val = (col > 0) ? hori_val +
 				    scoreGapExtendHorizontal(sc, sequenceEntryForScore(sc, str1, ((int) actualCol - 1)),
-				                             sequenceEntryForScore(sc, str2, ((int) actualRow - 1))) : MinValue<TScoreValue>::VALUE) > *matIt)
+				                             sequenceEntryForScore(sc, str2, ((int) actualRow - 1))) : std::numeric_limits<TScoreValue>::min()) > *matIt)
 				{
 					*matIt = hori_val;
 					*traceIt = Horizontal;
diff --git a/apps/stellar/stellar_types.h b/apps/stellar/stellar_types.h
index b754265..fc24de6 100755
--- a/apps/stellar/stellar_types.h
+++ b/apps/stellar/stellar_types.h
@@ -66,7 +66,7 @@ struct StellarOptions {
         alphabet = "dna5";
         noRT = false;
 
-		qGram = seqan::maxValue<unsigned>();
+		qGram = std::numeric_limits<unsigned>::max();
 		epsilon = 0.05;
 		minLength = 100;
 		xDrop = 5;
@@ -74,7 +74,7 @@ struct StellarOptions {
 		forward = true;
 		reverse = true;
 		fastOption = "exact";		// exact verification
-		disableThresh = seqan::maxValue<unsigned>();
+		disableThresh = std::numeric_limits<unsigned>::max();
 		compactThresh = 500;
 		numMatches = 50;
 		maxRepeatPeriod = 1;
diff --git a/apps/tree_recon/CMakeLists.txt b/apps/tree_recon/CMakeLists.txt
index d39248f..8817ae6 100644
--- a/apps/tree_recon/CMakeLists.txt
+++ b/apps/tree_recon/CMakeLists.txt
@@ -10,7 +10,7 @@ cmake_minimum_required (VERSION 3.0.0)
 project (seqan_apps_tree_recon CXX)
 message (STATUS "Configuring apps/tree_recon")
 
-set (SEQAN_APP_VERSION "1.4.7")
+set (SEQAN_APP_VERSION "1.4.8")
 
 # ----------------------------------------------------------------------------
 # Dependencies
@@ -56,7 +56,7 @@ endif (NOT SEQAN_PREFIX_SHARE_DOC)
 
 # Install tree_recon in ${PREFIX}/bin directory
 install (TARGETS tree_recon
-         DESTINATION bin)
+         DESTINATION ${CMAKE_INSTALL_BINDIR})
 
 # Install non-binary files for the package to "." for app builds and
 # ${PREFIX}/share/doc/tree_recon for SeqAn release builds.
diff --git a/apps/yara/CMakeLists.txt b/apps/yara/CMakeLists.txt
index 73ec26a..8eb1cbd 100644
--- a/apps/yara/CMakeLists.txt
+++ b/apps/yara/CMakeLists.txt
@@ -46,7 +46,7 @@ endif (NOT BZIP2_FOUND)
 # App-Level Configuration
 # ----------------------------------------------------------------------------
 
-set (SEQAN_APP_VERSION "0.9.10")
+set (SEQAN_APP_VERSION "0.9.11")
 
 option (YARA_LARGE_CONTIGS "Set to OFF to disable support for more than 32k contigs or contigs longer than 4Gbp." ON)
 if (YARA_LARGE_CONTIGS AND NOT SEQAN_TRAVIS_BUILD)
@@ -136,7 +136,7 @@ endif (NOT SEQAN_PREFIX_SHARE_DOC)
 
 # Install yara in ${PREFIX}/bin directory
 install (TARGETS yara_indexer yara_mapper
-         DESTINATION bin)
+         DESTINATION ${CMAKE_INSTALL_BINDIR})
 
 # Install non-binary files for the package to "." for app builds and
 # ${PREFIX}/share/doc/yara for SeqAn release builds.
diff --git a/apps/yara/LICENSE b/apps/yara/LICENSE
index e9a64d8..f08c3e7 100644
--- a/apps/yara/LICENSE
+++ b/apps/yara/LICENSE
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                      Yara - Yet Another Read Aligner
 // ==========================================================================
-// Copyright (c) 2011-2014, Enrico Siragusa, FU Berlin
+// Copyright (c) 2011-2018, Enrico Siragusa, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -30,4 +30,4 @@
 //
 // ==========================================================================
 // Author: Enrico Siragusa <enrico.siragusa at fu-berlin.de>
-// ==========================================================================
\ No newline at end of file
+// ==========================================================================
diff --git a/apps/yara/README.rst b/apps/yara/README.rst
index 45e948b..1382780 100644
--- a/apps/yara/README.rst
+++ b/apps/yara/README.rst
@@ -164,4 +164,4 @@ References
 ----------
 
 1. Siragusa, E. (2015). Approximate string matching for high-throughput sequencing. PhD Dissertation, Free University of Berlin.
-2. Siragusa, E., Weese D., and Reinert, K. (2013). Fast and accurate read mapping with approximate seeds and multiple backtracking. Nucleic Acids Research, 2013, 1–8.
\ No newline at end of file
+2. Siragusa, E., Weese D., and Reinert, K. (2013). Fast and accurate read mapping with approximate seeds and multiple backtracking. Nucleic Acids Research, 2013, 1–8.
diff --git a/apps/yara/basic_alphabet.h b/apps/yara/basic_alphabet.h
index 4a9ac3a..4bb43ea 100644
--- a/apps/yara/basic_alphabet.h
+++ b/apps/yara/basic_alphabet.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                      Yara - Yet Another Read Aligner
 // ==========================================================================
-// Copyright (c) 2011-2014, Enrico Siragusa, FU Berlin
+// Copyright (c) 2011-2018, Enrico Siragusa, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/yara/bits_bucket.h b/apps/yara/bits_bucket.h
index 56f610d..aa123ab 100644
--- a/apps/yara/bits_bucket.h
+++ b/apps/yara/bits_bucket.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                      Yara - Yet Another Read Aligner
 // ==========================================================================
-// Copyright (c) 2011-2014, Enrico Siragusa, FU Berlin
+// Copyright (c) 2011-2018, Enrico Siragusa, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/yara/bits_context.h b/apps/yara/bits_context.h
index a6c28bb..2d792d3 100644
--- a/apps/yara/bits_context.h
+++ b/apps/yara/bits_context.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                      Yara - Yet Another Read Aligner
 // ==========================================================================
-// Copyright (c) 2011-2014, Enrico Siragusa, FU Berlin
+// Copyright (c) 2011-2018, Enrico Siragusa, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -83,7 +83,7 @@ template <typename TSpec, typename TConfig, typename TReadSeqs>
 inline void resize(ReadsContext<TSpec, TConfig> & ctx, TReadSeqs const & readSeqs)
 {
     resize(ctx.seedErrors, getReadSeqsCount(readSeqs), 0, Exact());
-    resize(ctx.minErrors, getReadSeqsCount(readSeqs), MaxValue<unsigned char>::VALUE, Exact());
+    resize(ctx.minErrors, getReadSeqsCount(readSeqs), std::numeric_limits<unsigned char>::max(), Exact());
     resize(ctx.mapped, getReadsCount(readSeqs), false, Exact());
     resize(ctx.paired, getReadsCount(readSeqs), false, Exact());
 }
diff --git a/apps/yara/bits_hits.h b/apps/yara/bits_hits.h
index 51e5f13..8b3a647 100644
--- a/apps/yara/bits_hits.h
+++ b/apps/yara/bits_hits.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                      Yara - Yet Another Read Aligner
 // ==========================================================================
-// Copyright (c) 2011-2014, Enrico Siragusa, FU Berlin
+// Copyright (c) 2011-2018, Enrico Siragusa, FU Berlin
 // Copyright (c) 2013 NVIDIA Corporation
 // All rights reserved.
 //
diff --git a/apps/yara/bits_matches.h b/apps/yara/bits_matches.h
index e8f2feb..88398d8 100644
--- a/apps/yara/bits_matches.h
+++ b/apps/yara/bits_matches.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                      Yara - Yet Another Read Aligner
 // ==========================================================================
-// Copyright (c) 2011-2014, Enrico Siragusa, FU Berlin
+// Copyright (c) 2011-2018, Enrico Siragusa, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -615,7 +615,7 @@ getLibraryLength(Match<TSpec> const & a, Match<TSpec> const & b)
     }
     else
     {
-        return MaxValue<TContigSize>::VALUE;
+        return std::numeric_limits<TContigSize>::max();
     }
 }
 
@@ -633,7 +633,7 @@ getLibraryDeviation(Match<TSpec> const & a, Match<TSpec> const & b, TSize meanLe
     if (isValid(a) && isValid(b) && contigEqual(a, b))
         return _abs((TSignedContigSize)getLibraryLength(a, b) - (TSignedContigSize)meanLength);
     else
-        return MaxValue<TContigSize>::VALUE;
+        return std::numeric_limits<TContigSize>::max();
 }
 
 // ----------------------------------------------------------------------------
diff --git a/apps/yara/bits_reads.h b/apps/yara/bits_reads.h
index 168710c..382e606 100644
--- a/apps/yara/bits_reads.h
+++ b/apps/yara/bits_reads.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                      Yara - Yet Another Read Aligner
 // ==========================================================================
-// Copyright (c) 2011-2014, Enrico Siragusa, FU Berlin
+// Copyright (c) 2011-2018, Enrico Siragusa, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/yara/bits_seeds.h b/apps/yara/bits_seeds.h
index f777636..52f581d 100644
--- a/apps/yara/bits_seeds.h
+++ b/apps/yara/bits_seeds.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                      Yara - Yet Another Read Aligner
 // ==========================================================================
-// Copyright (c) 2011-2014, Enrico Siragusa, FU Berlin
+// Copyright (c) 2011-2018, Enrico Siragusa, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/yara/file_pair.h b/apps/yara/file_pair.h
index 6a047a9..be69b8b 100644
--- a/apps/yara/file_pair.h
+++ b/apps/yara/file_pair.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                      Yara - Yet Another Read Aligner
 // ==========================================================================
-// Copyright (c) 2011-2014, Enrico Siragusa, FU Berlin
+// Copyright (c) 2011-2018, Enrico Siragusa, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/yara/file_prefetched.h b/apps/yara/file_prefetched.h
index c41722b..76c5963 100644
--- a/apps/yara/file_prefetched.h
+++ b/apps/yara/file_prefetched.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                      Yara - Yet Another Read Aligner
 // ==========================================================================
-// Copyright (c) 2011-2014, Enrico Siragusa, FU Berlin
+// Copyright (c) 2011-2018, Enrico Siragusa, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/yara/find_extender.h b/apps/yara/find_extender.h
index d72da42..7785790 100644
--- a/apps/yara/find_extender.h
+++ b/apps/yara/find_extender.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                      Yara - Yet Another Read Aligner
 // ==========================================================================
-// Copyright (c) 2011-2014, Enrico Siragusa, FU Berlin
+// Copyright (c) 2011-2018, Enrico Siragusa, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/yara/find_verifier.h b/apps/yara/find_verifier.h
index cb1ce9d..5438fe2 100644
--- a/apps/yara/find_verifier.h
+++ b/apps/yara/find_verifier.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                      Yara - Yet Another Read Aligner
 // ==========================================================================
-// Copyright (c) 2011-2014, Enrico Siragusa, FU Berlin
+// Copyright (c) 2011-2018, Enrico Siragusa, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -48,15 +48,15 @@ using namespace seqan;
 template <typename THaystack, typename TNeedle, typename TSpec>
 struct Verifier
 {
-    typedef typename InfixOnValue<THaystack const>::Type THaystackInfix;
-    typedef String<GapAnchor<int> >                      TGapAnchors;
-    typedef AnchorGaps<TGapAnchors>                      TAnchorGaps;
-    typedef typename Size<THaystackInfix>::Type          TSize;
-    typedef typename Position<THaystackInfix>::Type      TPosition;
-    typedef TraceSegment_<TPosition, TSize>              TTraceSegment;
-    typedef String<TTraceSegment>                        TTrace;
-    typedef DPScoutState_<Default>                       TDPState;
-    typedef DPContext<int, AffineGaps>                   TDPContext;
+    typedef typename InfixOnValue<THaystack const>::Type                        THaystackInfix;
+    typedef String<GapAnchor<int> >                                             TGapAnchors;
+    typedef AnchorGaps<TGapAnchors>                                             TAnchorGaps;
+    typedef typename Size<THaystackInfix>::Type                                 TSize;
+    typedef typename Position<THaystackInfix>::Type                             TPosition;
+    typedef TraceSegment_<TPosition, TSize>                                     TTraceSegment;
+    typedef String<TTraceSegment>                                               TTrace;
+    typedef DPScoutState_<Default>                                              TDPState;
+    typedef DPContext<DPCell_<int, AffineGaps>, typename TraceBitMap_<>::Type>  TDPContext;
 
     // Thread-private data.
     TGapAnchors     contigAnchors;
diff --git a/apps/yara/index_fm.h b/apps/yara/index_fm.h
index c281ab6..01b8a67 100644
--- a/apps/yara/index_fm.h
+++ b/apps/yara/index_fm.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                      Yara - Yet Another Read Aligner
 // ==========================================================================
-// Copyright (c) 2011-2014, Enrico Siragusa, FU Berlin
+// Copyright (c) 2011-2018, Enrico Siragusa, FU Berlin
 // Copyright (c) 2013 NVIDIA Corporation
 // All rights reserved.
 //
diff --git a/apps/yara/indexer.cpp b/apps/yara/indexer.cpp
index 93dc388..cb10bd4 100644
--- a/apps/yara/indexer.cpp
+++ b/apps/yara/indexer.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                      Yara - Yet Another Read Aligner
 // ==========================================================================
-// Copyright (c) 2011-2014, Enrico Siragusa, FU Berlin
+// Copyright (c) 2011-2018, Enrico Siragusa, FU Berlin
 // Copyright (c) 2013 NVIDIA Corporation
 // All rights reserved.
 //
@@ -298,7 +298,7 @@ void saveIndex(YaraIndexer<TSpec, TConfig> & me)
 template <typename TContigsSize, typename TContigsLen, typename TSpec, typename TConfig>
 void saveIndex(YaraIndexer<TSpec, TConfig> & me)
 {
-    if (me.options.contigsSum <= MaxValue<uint32_t>::VALUE)
+    if (me.options.contigsSum <= std::numeric_limits<uint32_t>::max())
     {
         saveIndex<TContigsSize, TContigsLen, uint32_t>(me);
     }
@@ -311,7 +311,7 @@ void saveIndex(YaraIndexer<TSpec, TConfig> & me)
 template <typename TContigsSize, typename TSpec, typename TConfig>
 void saveIndex(YaraIndexer<TSpec, TConfig> & me)
 {
-    if (me.options.contigsMaxLength <= MaxValue<uint32_t>::VALUE)
+    if (me.options.contigsMaxLength <= std::numeric_limits<uint32_t>::max())
     {
         saveIndex<TContigsSize, uint32_t>(me);
     }
@@ -328,11 +328,11 @@ void saveIndex(YaraIndexer<TSpec, TConfig> & me)
 template <typename TSpec, typename TConfig>
 void saveIndex(YaraIndexer<TSpec, TConfig> & me)
 {
-    if (me.options.contigsSize <= MaxValue<uint8_t>::VALUE)
+    if (me.options.contigsSize <= std::numeric_limits<uint8_t>::max())
     {
         saveIndex<uint8_t>(me);
     }
-    else if (me.options.contigsSize <= MaxValue<uint16_t>::VALUE)
+    else if (me.options.contigsSize <= std::numeric_limits<uint16_t>::max())
     {
         saveIndex<uint16_t>(me);
     }
diff --git a/apps/yara/mapper.cpp b/apps/yara/mapper.cpp
index 1cb6e8c..53c9dbd 100644
--- a/apps/yara/mapper.cpp
+++ b/apps/yara/mapper.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                      Yara - Yet Another Read Aligner
 // ==========================================================================
-// Copyright (c) 2011-2014, Enrico Siragusa, FU Berlin
+// Copyright (c) 2011-2018, Enrico Siragusa, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -342,7 +342,7 @@ parseCommandLine(Options & options, ArgumentParser & parser, int argc, char cons
 template <typename TContigsSize, typename TContigsLen, typename TThreading, typename TSequencing, typename TStrategy>
 void configureMapper(Options const & options, TThreading const & threading, TSequencing const & sequencing, TStrategy const & strategy)
 {
-    if (options.contigsSum <= MaxValue<uint32_t>::VALUE)
+    if (options.contigsSum <= std::numeric_limits<uint32_t>::max())
     {
         spawnMapper<TContigsSize, TContigsLen, uint32_t>(options, threading, sequencing, strategy);
     }
@@ -355,7 +355,7 @@ void configureMapper(Options const & options, TThreading const & threading, TSeq
 template <typename TContigsSize, typename TThreading, typename TSequencing, typename TStrategy>
 void configureMapper(Options const & options, TThreading const & threading, TSequencing const & sequencing, TStrategy const & strategy)
 {
-    if (options.contigsMaxLength <= MaxValue<uint32_t>::VALUE)
+    if (options.contigsMaxLength <= std::numeric_limits<uint32_t>::max())
     {
         configureMapper<TContigsSize, uint32_t>(options, threading, sequencing, strategy);
     }
@@ -372,11 +372,11 @@ void configureMapper(Options const & options, TThreading const & threading, TSeq
 template <typename TThreading, typename TSequencing, typename TStrategy>
 void configureMapper(Options const & options, TThreading const & threading, TSequencing const & sequencing, TStrategy const & strategy)
 {
-    if (options.contigsSize <= MaxValue<uint8_t>::VALUE)
+    if (options.contigsSize <= std::numeric_limits<uint8_t>::max())
     {
         configureMapper<uint8_t>(options, threading, sequencing, strategy);
     }
-    else if (options.contigsSize <= MaxValue<uint16_t>::VALUE)
+    else if (options.contigsSize <= std::numeric_limits<uint16_t>::max())
     {
         configureMapper<uint16_t>(options, threading, sequencing, strategy);
     }
diff --git a/apps/yara/mapper.h b/apps/yara/mapper.h
index 10b628e..ebbe394 100644
--- a/apps/yara/mapper.h
+++ b/apps/yara/mapper.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                      Yara - Yet Another Read Aligner
 // ==========================================================================
-// Copyright (c) 2011-2014, Enrico Siragusa, FU Berlin
+// Copyright (c) 2011-2018, Enrico Siragusa, FU Berlin
 // Copyright (c) 2013 NVIDIA Corporation
 // All rights reserved.
 //
diff --git a/apps/yara/mapper_aligner.h b/apps/yara/mapper_aligner.h
index 46f1562..9f8e4ee 100644
--- a/apps/yara/mapper_aligner.h
+++ b/apps/yara/mapper_aligner.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                      Yara - Yet Another Read Aligner
 // ==========================================================================
-// Copyright (c) 2011-2014, Enrico Siragusa, FU Berlin
+// Copyright (c) 2011-2018, Enrico Siragusa, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/yara/mapper_classifier.h b/apps/yara/mapper_classifier.h
index 87e9b0c..d795512 100644
--- a/apps/yara/mapper_classifier.h
+++ b/apps/yara/mapper_classifier.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                      Yara - Yet Another Read Aligner
 // ==========================================================================
-// Copyright (c) 2011-2014, Enrico Siragusa, FU Berlin
+// Copyright (c) 2011-2018, Enrico Siragusa, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/yara/mapper_collector.h b/apps/yara/mapper_collector.h
index e9d33c1..f915260 100644
--- a/apps/yara/mapper_collector.h
+++ b/apps/yara/mapper_collector.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                      Yara - Yet Another Read Aligner
 // ==========================================================================
-// Copyright (c) 2011-2014, Enrico Siragusa, FU Berlin
+// Copyright (c) 2011-2018, Enrico Siragusa, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/yara/mapper_extender.h b/apps/yara/mapper_extender.h
index bc963e9..62e4d35 100644
--- a/apps/yara/mapper_extender.h
+++ b/apps/yara/mapper_extender.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                      Yara - Yet Another Read Aligner
 // ==========================================================================
-// Copyright (c) 2011-2014, Enrico Siragusa, FU Berlin
+// Copyright (c) 2011-2018, Enrico Siragusa, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/yara/mapper_filter.h b/apps/yara/mapper_filter.h
index 033f993..c88cef8 100644
--- a/apps/yara/mapper_filter.h
+++ b/apps/yara/mapper_filter.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                      Yara - Yet Another Read Aligner
 // ==========================================================================
-// Copyright (c) 2011-2014, Enrico Siragusa, FU Berlin
+// Copyright (c) 2011-2018, Enrico Siragusa, FU Berlin
 // Copyright (c) 2013 NVIDIA Corporation
 // All rights reserved.
 //
diff --git a/apps/yara/mapper_ranker.h b/apps/yara/mapper_ranker.h
index 9a97f03..9c4a7fb 100644
--- a/apps/yara/mapper_ranker.h
+++ b/apps/yara/mapper_ranker.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                      Yara - Yet Another Read Aligner
 // ==========================================================================
-// Copyright (c) 2011-2014, Enrico Siragusa, FU Berlin
+// Copyright (c) 2011-2018, Enrico Siragusa, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/yara/mapper_verifier.h b/apps/yara/mapper_verifier.h
index d86bc35..7e0e83f 100644
--- a/apps/yara/mapper_verifier.h
+++ b/apps/yara/mapper_verifier.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                      Yara - Yet Another Read Aligner
 // ==========================================================================
-// Copyright (c) 2011-2014, Enrico Siragusa, FU Berlin
+// Copyright (c) 2011-2018, Enrico Siragusa, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/yara/mapper_writer.h b/apps/yara/mapper_writer.h
index 78f517c..76bad67 100644
--- a/apps/yara/mapper_writer.h
+++ b/apps/yara/mapper_writer.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                      Yara - Yet Another Read Aligner
 // ==========================================================================
-// Copyright (c) 2011-2014, Enrico Siragusa, FU Berlin
+// Copyright (c) 2011-2018, Enrico Siragusa, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/yara/misc_options.h b/apps/yara/misc_options.h
index 1533c26..af83f2f 100644
--- a/apps/yara/misc_options.h
+++ b/apps/yara/misc_options.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                      Yara - Yet Another Read Aligner
 // ==========================================================================
-// Copyright (c) 2011-2014, Enrico Siragusa, FU Berlin
+// Copyright (c) 2011-2018, Enrico Siragusa, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/yara/misc_tags.h b/apps/yara/misc_tags.h
index 93f855d..8f3339e 100644
--- a/apps/yara/misc_tags.h
+++ b/apps/yara/misc_tags.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                      Yara - Yet Another Read Aligner
 // ==========================================================================
-// Copyright (c) 2011-2014, Enrico Siragusa, FU Berlin
+// Copyright (c) 2011-2018, Enrico Siragusa, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/yara/misc_timer.h b/apps/yara/misc_timer.h
index 9fbe335..c501fcd 100644
--- a/apps/yara/misc_timer.h
+++ b/apps/yara/misc_timer.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                      Yara - Yet Another Read Aligner
 // ==========================================================================
-// Copyright (c) 2011-2014, Enrico Siragusa, FU Berlin
+// Copyright (c) 2011-2018, Enrico Siragusa, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/apps/yara/misc_types.h b/apps/yara/misc_types.h
index 089eb00..fa142c4 100644
--- a/apps/yara/misc_types.h
+++ b/apps/yara/misc_types.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                      Yara - Yet Another Read Aligner
 // ==========================================================================
-// Copyright (c) 2011-2014, Enrico Siragusa, FU Berlin
+// Copyright (c) 2011-2018, Enrico Siragusa, FU Berlin
 // Copyright (c) 2013 NVIDIA Corporation
 // All rights reserved.
 //
diff --git a/apps/yara/store_seqs.h b/apps/yara/store_seqs.h
index 229d656..cde9193 100644
--- a/apps/yara/store_seqs.h
+++ b/apps/yara/store_seqs.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                      Yara - Yet Another Read Aligner
 // ==========================================================================
-// Copyright (c) 2011-2014, Enrico Siragusa, FU Berlin
+// Copyright (c) 2011-2018, Enrico Siragusa, FU Berlin
 // Copyright (c) 2013 NVIDIA Corporation
 // All rights reserved.
 //
diff --git a/apps/yara/tests/run_tests.py b/apps/yara/tests/run_tests.py
index ba87e82..32c7a8c 100644
--- a/apps/yara/tests/run_tests.py
+++ b/apps/yara/tests/run_tests.py
@@ -33,6 +33,12 @@ sam_transforms = [
 def main(source_base, binary_base):
     """Main entry point of the script."""
 
+    # gold standard binary files created on little endian
+    if sys.byteorder != 'little':
+        print 'Skipping tests for Yara on big endian'
+        print '====================================='
+        return 0
+
     print 'Executing test for Yara'
     print '=============================='
     print
diff --git a/demos/LICENSE b/demos/LICENSE
index 61f9fdf..311e417 100644
--- a/demos/LICENSE
+++ b/demos/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
diff --git a/demos/blast/blast_in_lowlevel.cpp b/demos/blast/blast_in_lowlevel.cpp
index 0c6f83c..3238fbe 100644
--- a/demos/blast/blast_in_lowlevel.cpp
+++ b/demos/blast/blast_in_lowlevel.cpp
@@ -7,7 +7,7 @@ using namespace seqan;
 
 int main()
 {
-    std::string inPath = std::string(SEQAN_PATH_TO_ROOT()) + "/tests/blast/plus_comments_defaults.m9";
+    std::string inPath = getAbsolutePath("/tests/blast/plus_comments_defaults.m9");
 
     std::ifstream fin(toCString(inPath), std::ios_base::in | std::ios_base::binary);
     auto fit = directionIterator(fin, Input());
@@ -46,4 +46,4 @@ int main()
     std::cerr << "Demo not run, because of a bug in Microsoft Visual Studio 2015.\n";
     return 0;
 }
-#endif
\ No newline at end of file
+#endif
diff --git a/demos/dox/bam_io/bam_file_in.cpp b/demos/dox/bam_io/bam_file_in.cpp
index b2be48f..267e089 100644
--- a/demos/dox/bam_io/bam_file_in.cpp
+++ b/demos/dox/bam_io/bam_file_in.cpp
@@ -7,7 +7,7 @@ using namespace seqan;
 int main()
 {
     // Open input stream, BamStream can read SAM and BAM files.
-    std::string pathSam = std::string(SEQAN_PATH_TO_ROOT()) + "/demos/bam_io/example.sam";
+    std::string pathSam = getAbsolutePath("/demos/bam_io/example.sam");
 
     BamFileIn bamFileIn;
     if (!open(bamFileIn, toCString(pathSam)))
diff --git a/demos/dox/basic/enable_if.cpp b/demos/dox/basic/enable_if.cpp
index 3a69c4b..42d46cd 100644
--- a/demos/dox/basic/enable_if.cpp
+++ b/demos/dox/basic/enable_if.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/demos/dox/basic/metaprogramming_control.cpp b/demos/dox/basic/metaprogramming_control.cpp
index 26e1bc0..6ea923a 100644
--- a/demos/dox/basic/metaprogramming_control.cpp
+++ b/demos/dox/basic/metaprogramming_control.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/demos/dox/basic/metaprogramming_logic.cpp b/demos/dox/basic/metaprogramming_logic.cpp
index c0b0c23..41f95a0 100644
--- a/demos/dox/basic/metaprogramming_logic.cpp
+++ b/demos/dox/basic/metaprogramming_logic.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/demos/dox/basic/metaprogramming_math.cpp b/demos/dox/basic/metaprogramming_math.cpp
index 825d65d..1b248a5 100644
--- a/demos/dox/basic/metaprogramming_math.cpp
+++ b/demos/dox/basic/metaprogramming_math.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/demos/dox/basic/metaprogramming_switch.cpp b/demos/dox/basic/metaprogramming_switch.cpp
index 18acf1f..2fa2048 100644
--- a/demos/dox/basic/metaprogramming_switch.cpp
+++ b/demos/dox/basic/metaprogramming_switch.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/demos/dox/index/find_repeats.cpp b/demos/dox/index/find_repeats.cpp
index cc0dbf9..3c212ab 100644
--- a/demos/dox/index/find_repeats.cpp
+++ b/demos/dox/index/find_repeats.cpp
@@ -9,7 +9,7 @@ using namespace seqan;
 int main()
 {
     // Get path to file to search for repeats in.
-    std::string path = (std::string)SEQAN_PATH_TO_ROOT() + "/demos/index/ref.fa";
+    std::string path = getAbsolutePath("/demos/index/ref.fa");
 
     // Load first sequence from file.
     CharString id;
diff --git a/demos/dox/sequence/segment.cpp b/demos/dox/sequence/segment.cpp
index 8221969..df094d5 100644
--- a/demos/dox/sequence/segment.cpp
+++ b/demos/dox/sequence/segment.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/demos/dox/sequence/string.cpp b/demos/dox/sequence/string.cpp
index 92c1b26..44581f1 100644
--- a/demos/dox/sequence/string.cpp
+++ b/demos/dox/sequence/string.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/demos/dox/statistics/build_markov_model.cpp b/demos/dox/statistics/build_markov_model.cpp
index 64904a1..60764c5 100644
--- a/demos/dox/statistics/build_markov_model.cpp
+++ b/demos/dox/statistics/build_markov_model.cpp
@@ -10,8 +10,7 @@ using namespace seqan;
 int main()
 {
     // Build path to background FASTA file.
-    CharString bgPath = SEQAN_PATH_TO_ROOT();
-    append(bgPath, "/demos/statistics/background.fa");
+    CharString bgPath = getAbsolutePath("/demos/statistics/background.fa");
 
     // Read the background from a file into X.
     StringSet<DnaString> X;
diff --git a/demos/dox/statistics/load_markov_model.cpp b/demos/dox/statistics/load_markov_model.cpp
index f90d44a..f26ff1c 100644
--- a/demos/dox/statistics/load_markov_model.cpp
+++ b/demos/dox/statistics/load_markov_model.cpp
@@ -11,8 +11,7 @@ using namespace seqan;
 int main()
 {
     // Build path to serialized MarkovModel.
-    CharString mmPath = SEQAN_PATH_TO_ROOT();
-    append(mmPath, "/demos/statistics/zscore_example_mm.3");
+    CharString mmPath = getAbsolutePath("/demos/statistics/zscore_example_mm.3");
 
     // Open the file.
     FILE * mmFile = fopen(toCString(mmPath), "rb");
diff --git a/demos/dox/store/store_example.cpp b/demos/dox/store/store_example.cpp
index f15940b..a07fb28 100644
--- a/demos/dox/store/store_example.cpp
+++ b/demos/dox/store/store_example.cpp
@@ -7,8 +7,8 @@ int main()
 {
     // instantiate emtpy FragmentStore and set file paths
     FragmentStore<> store;
-    std::string pathGenome = std::string(SEQAN_PATH_TO_ROOT()) + "/demos/tutorial/store/ex1.fa";
-    std::string pathSAM    = std::string(SEQAN_PATH_TO_ROOT()) + "/demos/tutorial/store/ex1.sam";
+    std::string pathGenome = getAbsolutePath("/demos/tutorial/store/ex1.fa");
+    std::string pathSAM    = getAbsolutePath("/demos/tutorial/store/ex1.sam");
 
     // load example genome and example reads and alignments
     loadContigs(store, pathGenome.c_str());
diff --git a/demos/howto/custom_file_ending.fa.dat b/demos/howto/custom_file_ending.fa.dat
new file mode 100644
index 0000000..20ee5de
--- /dev/null
+++ b/demos/howto/custom_file_ending.fa.dat
@@ -0,0 +1,4 @@
+>My seq
+ACGTAGCGACTGAGCTACAGGCGACGATCGACGAGCTACGGTACGCGAT
+ACGATCGAGCTACGAGCATCAGCGAGCTACGAGGGACTACTTACAGAGC
+ACGATCGAGCTTACAGCGACTAGC
diff --git a/demos/howto/custom_file_endings.cpp b/demos/howto/custom_file_endings.cpp
new file mode 100644
index 0000000..c09072a
--- /dev/null
+++ b/demos/howto/custom_file_endings.cpp
@@ -0,0 +1,76 @@
+//![includes]
+#include <seqan/stream.h>
+#include <seqan/seq_io.h>
+//![includes]
+//![custom_file]
+namespace seqan
+{
+// Your custom file format.
+struct MyFastaAdaptor_;
+using MyFastaAdaptor = Tag<MyFastaAdaptor_>;
+
+// Specilaize sequence input file with custom tag.
+using MySeqFileIn = FormattedFile<Fastq, Input, MyFastaAdaptor>;
+//![custom_file]
+//![custom_format]
+// Your custom format tag.
+struct MySeqFormat_;
+using MySeqFormat = Tag<MySeqFormat_>;
+
+// The extended TagList containing our custom format.
+using MySeqInFormats = TagList<MySeqFormat, SeqInFormats>;
+
+// Overloaded file format metafunction.
+template <>
+struct FileFormat<FormattedFile<Fastq, Input, MyFastaAdaptor> >
+{
+    using Type = TagSelector<MySeqInFormats>;
+};
+
+// Set magic header.
+template <typename T>
+struct MagicHeader<MySeqFormat, T> : public MagicHeader<Fasta, T>
+{};
+//![custom_format]
+//![custom_extension]
+// Specify the valid ending for your fasta adaptor.
+template <typename T>
+struct FileExtensions<MySeqFormat, T>
+{
+    static char const * VALUE[1];
+};
+
+template <typename T>
+char const * FileExtensions<MySeqFormat, T>::VALUE[1] =
+{
+    ".fa.dat"  // fasta file with dat ending.
+};
+//![custom_extension]
+
+//![custom_read_record]
+// Overload an inner readRecord function to delegate to the actual fasta parser.
+template <typename TIdString, typename TSeqString, typename TSpec>
+inline void
+readRecord(TIdString & meta, TSeqString & seq, FormattedFile<Fastq, Input, TSpec> & file, MySeqFormat)
+{
+    readRecord(meta, seq, file.iter, Fasta());  // Just delegate to Fasta parser.
+}
+} // namespace seqan
+//![custom_read_record]
+//![main]
+int main()
+{
+    using namespace seqan;
+    std::string path = getAbsolutePath("demos/howto/custom_file_ending.fa.dat");
+
+    MySeqFileIn seqFile(path.c_str());
+
+    CharString meta;
+    Dna5String seq;
+
+    readRecord(meta, seq, seqFile);
+
+    std::cout << "> " << meta << "\n" << seq << std::endl;
+    return 0;
+}
+//![main]
diff --git a/demos/howto/custom_file_endings.cpp.stdout b/demos/howto/custom_file_endings.cpp.stdout
new file mode 100644
index 0000000..791c47f
--- /dev/null
+++ b/demos/howto/custom_file_endings.cpp.stdout
@@ -0,0 +1,2 @@
+> My seq
+ACGTAGCGACTGAGCTACAGGCGACGATCGACGAGCTACGGTACGCGATACGATCGAGCTACGAGCATCAGCGAGCTACGAGGGACTACTTACAGAGCACGATCGAGCTTACAGCGACTAGC
diff --git a/demos/howto/using_zip_iterator.cpp b/demos/howto/using_zip_iterator.cpp
index 00be410..86b19e7 100644
--- a/demos/howto/using_zip_iterator.cpp
+++ b/demos/howto/using_zip_iterator.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/demos/tutorial/a_first_example/final_result.cpp b/demos/tutorial/a_first_example/final_result.cpp
index 4311488..5fd0974 100644
--- a/demos/tutorial/a_first_example/final_result.cpp
+++ b/demos/tutorial/a_first_example/final_result.cpp
@@ -1,4 +1,3 @@
-//![result]
 #include <iostream>
 #include <seqan/file.h>
 #include <seqan/sequence.h>
@@ -98,36 +97,33 @@ void print(TText const & score, GreaterZero const & /*tag*/)
 
 int main()
 {
-    String<char> text = "This is an awesome tutorial to get to now SeqAn!";
+    String<char> text = "This is an awesome tutorial to get to know SeqAn!";
     String<char> pattern = "tutorial";
     String<int> score = computeScore(text, pattern);
 
     print(text);
-    // > This is an awesome tutorial to get to now SeqAn!
+
     print(pattern);
-    // > tutorial
+
     print(score);
-    // > 1 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 8 0 1 0 0 0 0 2 0 1 0 0 1 0 3 0 1 1 0 0 0 0
+
     print(score, MaxOnly());
-    // > 19
+
     print(score, GreaterZero());
-    // > (2; 1) (5; 1) (12; 1) (17; 1) (19; 8) (21; 1) (26; 2) (28; 1) (31; 1) (33; 3) (35; 1) (36; 1)
 
     // And now for a protein pattern
     String<AminoAcid> protein = "tutorial";
     String<int> proteinScore = computeScore(text, protein);
 
     print(text);
-    // > This is an awesome tutorial to get to now SeqAn!
+
     print(protein);
-    // > TXTXRIAL
+
     print(proteinScore);
-    // > 6 -9 -3 -6 -6 0 -9 -8 -7 -3 -9 -5 -8 -4 -5 -6 -6 1 -6 25 -7 2 -6 -6 -9 -6 -5 -7 1 -7 -5 -4 -6 2 -6 -3 -8 -9 -10 -4 -6 0 0 0 0 0 0 0
+
     print(proteinScore, MaxOnly());
-    // > 19
+
     print(proteinScore, GreaterZero());
-    // > (17; 1) (19; 25) (21; 2) (28; 1) (33; 2)
 
     return 0;
 }
-//![result]
diff --git a/demos/tutorial/a_first_example/final_result.cpp.stdout b/demos/tutorial/a_first_example/final_result.cpp.stdout
index 5558d1a..da7f9ec 100644
--- a/demos/tutorial/a_first_example/final_result.cpp.stdout
+++ b/demos/tutorial/a_first_example/final_result.cpp.stdout
@@ -1,10 +1,11 @@
-This is an awesome tutorial to get to now SeqAn!
+This is an awesome tutorial to get to know SeqAn!
 tutorial
-1 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 8 0 1 0 0 0 0 2 0 1 0 0 1 0 3 0 1 1 0 0 0 0 
+1 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 8 0 1 0 0 0 0 2 0 1 0 0 1 0 3 0 1 0 1 0 0 0 0 
 19 
-(2; 1) (5; 1) (12; 1) (17; 1) (19; 8) (21; 1) (26; 2) (28; 1) (31; 1) (33; 3) (35; 1) (36; 1) 
-This is an awesome tutorial to get to now SeqAn!
+(2; 1) (5; 1) (12; 1) (17; 1) (19; 8) (21; 1) (26; 2) (28; 1) (31; 1) (33; 3) (35; 1) (37; 1) 
+This is an awesome tutorial to get to know SeqAn!
 TUTORIAL
-6 -9 -3 -6 -6 0 -9 -8 -7 -3 -9 -5 -8 -4 -5 -6 -6 1 -6 25 -7 2 -6 -6 -9 -6 -5 -7 1 -7 -5 -4 -6 2 -6 -3 -8 -9 -10 -4 -6 
+6 -9 -3 -6 -6 0 -9 -8 -7 -3 -9 -5 -8 -4 -5 -6 -6 1 -6 25 -7 2 -6 -6 -9 -6 -5 -7 1 -7 -5 -3 -7 1 -4 -2 -9 -8 -10 -10 -4 -6 
 19 
-(17; 1) (19; 25) (21; 2) (28; 1) (33; 2) 
+(17; 1) (19; 25) (21; 2) (28; 1) (33; 1) 
+
diff --git a/demos/tutorial/a_first_example/solution_1.cpp b/demos/tutorial/a_first_example/solution_1.cpp
index cfd9e8c..c0c1eda 100755
--- a/demos/tutorial/a_first_example/solution_1.cpp
+++ b/demos/tutorial/a_first_example/solution_1.cpp
@@ -1,5 +1,3 @@
-// Copy the code into a demo program and have a look at the result.
-
 #include <iostream>
 #include <seqan/file.h>
 #include <seqan/sequence.h>
@@ -34,7 +32,5 @@ int main()
         std::cout << score[i] << " ";
     std::cout << std::endl;
 
-    // > 1 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 8 0 1 0 0 0 0 2 0 1 0 0 1 0 3 0 1 0 1 0 0 0 0
-
     return 0;
 }
diff --git a/demos/tutorial/a_first_example/solution_2.cpp b/demos/tutorial/a_first_example/solution_2.cpp
index 47cc2ba..453fd05 100644
--- a/demos/tutorial/a_first_example/solution_2.cpp
+++ b/demos/tutorial/a_first_example/solution_2.cpp
@@ -1,5 +1,4 @@
-// Copy the code into your current file and encapsulate the print instructions.
-
+//![all]
 #include <iostream>
 #include <seqan/file.h>
 #include <seqan/sequence.h>
@@ -38,7 +37,7 @@ void print(String<int> text)
 
 int main()
 {
-    String<char> text = "This is an awesome tutorial to get to now SeqAn!";
+    String<char> text = "This is an awesome tutorial to get to know SeqAn!";
     String<char> pattern = "tutorial";
     String<int> score = computeScore(text, pattern);
 
@@ -46,3 +45,4 @@ int main()
 
     return 0;
 }
+//![all]
diff --git a/demos/tutorial/a_first_example/solution_2.cpp.stdout b/demos/tutorial/a_first_example/solution_2.cpp.stdout
index 76bbad7..b4d9330 100644
--- a/demos/tutorial/a_first_example/solution_2.cpp.stdout
+++ b/demos/tutorial/a_first_example/solution_2.cpp.stdout
@@ -1 +1 @@
-1 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 8 0 1 0 0 0 0 2 0 1 0 0 1 0 3 0 1 1 0 0 0 0 
+1 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 8 0 1 0 0 0 0 2 0 1 0 0 1 0 3 0 1 0 1 0 0 0 0 
diff --git a/demos/tutorial/a_first_example/solution_3.cpp b/demos/tutorial/a_first_example/solution_3.cpp
index b290300..119ab74 100644
--- a/demos/tutorial/a_first_example/solution_3.cpp
+++ b/demos/tutorial/a_first_example/solution_3.cpp
@@ -1,5 +1,4 @@
-// Adjust your current code to be more memory and time efficient by using references in the function header.
-
+//![all]
 #include <iostream>
 #include <seqan/file.h>
 #include <seqan/sequence.h>
@@ -40,7 +39,7 @@ void print(String<int> const & text)
 
 int main()
 {
-    String<char> text = "This is an awesome tutorial to get to now SeqAn!";
+    String<char> text = "This is an awesome tutorial to get to know SeqAn!";
     String<char> pattern = "tutorial";
     String<int> score = computeScore(text, pattern);
 
@@ -48,3 +47,4 @@ int main()
 
     return 0;
 }
+//![all]
diff --git a/demos/tutorial/a_first_example/solution_3.cpp.stdout b/demos/tutorial/a_first_example/solution_3.cpp.stdout
index 76bbad7..b4d9330 100644
--- a/demos/tutorial/a_first_example/solution_3.cpp.stdout
+++ b/demos/tutorial/a_first_example/solution_3.cpp.stdout
@@ -1 +1 @@
-1 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 8 0 1 0 0 0 0 2 0 1 0 0 1 0 3 0 1 1 0 0 0 0 
+1 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 8 0 1 0 0 0 0 2 0 1 0 0 1 0 3 0 1 0 1 0 0 0 0 
diff --git a/demos/tutorial/a_first_example/solution_4.cpp b/demos/tutorial/a_first_example/solution_4.cpp
index ee15b74..1eb50dc 100644
--- a/demos/tutorial/a_first_example/solution_4.cpp
+++ b/demos/tutorial/a_first_example/solution_4.cpp
@@ -1,5 +1,3 @@
-// Generalize the computeLocalScore function in you file.
-
 #include <iostream>
 #include <seqan/file.h>
 #include <seqan/sequence.h>
@@ -39,7 +37,7 @@ void print(String<int> const & text)
 
 int main()
 {
-    String<char> text = "This is an awesome tutorial to get to now SeqAn!";
+    String<char> text = "This is an awesome tutorial to get to know SeqAn!";
     String<char> pattern = "tutorial";
     String<int> score = computeScore(text, pattern);
     print(score);
diff --git a/demos/tutorial/a_first_example/solution_4.cpp.stdout b/demos/tutorial/a_first_example/solution_4.cpp.stdout
index 76bbad7..a6c38cf 100644
--- a/demos/tutorial/a_first_example/solution_4.cpp.stdout
+++ b/demos/tutorial/a_first_example/solution_4.cpp.stdout
@@ -1 +1,2 @@
-1 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 8 0 1 0 0 0 0 2 0 1 0 0 1 0 3 0 1 1 0 0 0 0 
+1 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 8 0 1 0 0 0 0 2 0 1 0 0 1 0 3 0 1 0 1 0 0 0 0 
+
diff --git a/demos/tutorial/a_first_example/solution_4_templateSubclassing.cpp b/demos/tutorial/a_first_example/solution_4_templateSubclassing.cpp
index 34cdbd7..180ddc6 100644
--- a/demos/tutorial/a_first_example/solution_4_templateSubclassing.cpp
+++ b/demos/tutorial/a_first_example/solution_4_templateSubclassing.cpp
@@ -1,5 +1,3 @@
-// Generalize the computeLocalScore function in you file.
-
 #include <iostream>
 #include <seqan/file.h>
 #include <seqan/sequence.h>
diff --git a/demos/tutorial/a_first_example/solution_5.cpp b/demos/tutorial/a_first_example/solution_5.cpp
index ec3f084..7801253 100644
--- a/demos/tutorial/a_first_example/solution_5.cpp
+++ b/demos/tutorial/a_first_example/solution_5.cpp
@@ -1,5 +1,3 @@
-// Provide a generic print function which is used when the input type is not String<int>.
-
 #include <iostream>
 #include <seqan/file.h>
 #include <seqan/sequence.h>
@@ -55,15 +53,15 @@ void print(String<int> const & text)
 
 int main()
 {
-    String<char> text = "This is an awesome tutorial to get to now SeqAn!";
+    String<char> text = "This is an awesome tutorial to get to know SeqAn!";
     String<char> pattern = "tutorial";
     String<int> score = computeScore(text, pattern);
 
     print(text);
-    // > This is an awesome tutorial to get to now SeqAn!
+
     print(pattern);
-    // > tutorial
+
     print(score);
-    // > 1 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 8 0 1 0 0 0 0 2 0 1 0 0 1 0 3 0 1 1 0 0 0 0
+
     return 0;
 }
diff --git a/demos/tutorial/a_first_example/solution_5.cpp.stdout b/demos/tutorial/a_first_example/solution_5.cpp.stdout
index 9d0b9b8..c78c95e 100644
--- a/demos/tutorial/a_first_example/solution_5.cpp.stdout
+++ b/demos/tutorial/a_first_example/solution_5.cpp.stdout
@@ -1,3 +1,3 @@
-This is an awesome tutorial to get to now SeqAn!
+This is an awesome tutorial to get to know SeqAn!
 tutorial
-1 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 8 0 1 0 0 0 0 2 0 1 0 0 1 0 3 0 1 1 0 0 0 0 
+1 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 8 0 1 0 0 0 0 2 0 1 0 0 1 0 3 0 1 0 1 0 0 0 0 
diff --git a/demos/tutorial/a_first_example/solution_6.cpp b/demos/tutorial/a_first_example/solution_6.cpp
index fde568e..9698125 100644
--- a/demos/tutorial/a_first_example/solution_6.cpp
+++ b/demos/tutorial/a_first_example/solution_6.cpp
@@ -99,35 +99,33 @@ void print(TText const & score, GreaterZero const & /*tag*/)
 
 int main()
 {
-    String<char> text = "This is an awesome tutorial to get to now SeqAn!";
+    String<char> text = "This is an awesome tutorial to get to know SeqAn!";
     String<char> pattern = "tutorial";
     String<int> score = computeScore(text, pattern);
 
     print(text);
-    // > This is an awesome tutorial to get to now SeqAn!
+
     print(pattern);
-    // > tutorial
+
     print(score);
-    // > 1 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 8 0 1 0 0 0 0 2 0 1 0 0 1 0 3 0 1 1 0 0 0 0
+
     print(score, MaxOnly());
-    // > 19
+
     print(score, GreaterZero());
-    // > (2; 1) (5; 1) (12; 1) (17; 1) (19; 8) (21; 1) (26; 2) (28; 1) (31; 1) (33; 3) (35; 1) (36; 1)
 
     // And now for a protein pattern
     String<AminoAcid> protein = "tutorial";
     String<int> proteinScore = computeScore(text, protein);
 
     print(text);
-    // > This is an awesome tutorial to get to now SeqAn!
+
     print(protein);
-    // > TXTXRIAL
+
     print(proteinScore);
-    // > 6 -9 -3 -6 -6 0 -9 -8 -7 -3 -9 -5 -8 -4 -5 -6 -6 1 -6 25 -7 2 -6 -6 -9 -6 -5 -7 1 -7 -5 -4 -6 2 -6 -3 -8 -9 -10 -4 -6 0 0 0 0 0 0 0
+
     print(proteinScore, MaxOnly());
-    // > 19
+
     print(proteinScore, GreaterZero());
-    // > (17; 1) (19; 25) (21; 2) (28; 1) (33; 2)
 
     return 0;
 }
diff --git a/demos/tutorial/a_first_example/solution_6.cpp.stdout b/demos/tutorial/a_first_example/solution_6.cpp.stdout
index 5558d1a..363634d 100644
--- a/demos/tutorial/a_first_example/solution_6.cpp.stdout
+++ b/demos/tutorial/a_first_example/solution_6.cpp.stdout
@@ -1,10 +1,10 @@
-This is an awesome tutorial to get to now SeqAn!
+This is an awesome tutorial to get to know SeqAn!
 tutorial
-1 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 8 0 1 0 0 0 0 2 0 1 0 0 1 0 3 0 1 1 0 0 0 0 
+1 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 8 0 1 0 0 0 0 2 0 1 0 0 1 0 3 0 1 0 1 0 0 0 0 
 19 
-(2; 1) (5; 1) (12; 1) (17; 1) (19; 8) (21; 1) (26; 2) (28; 1) (31; 1) (33; 3) (35; 1) (36; 1) 
-This is an awesome tutorial to get to now SeqAn!
+(2; 1) (5; 1) (12; 1) (17; 1) (19; 8) (21; 1) (26; 2) (28; 1) (31; 1) (33; 3) (35; 1) (37; 1) 
+This is an awesome tutorial to get to know SeqAn!
 TUTORIAL
-6 -9 -3 -6 -6 0 -9 -8 -7 -3 -9 -5 -8 -4 -5 -6 -6 1 -6 25 -7 2 -6 -6 -9 -6 -5 -7 1 -7 -5 -4 -6 2 -6 -3 -8 -9 -10 -4 -6 
+6 -9 -3 -6 -6 0 -9 -8 -7 -3 -9 -5 -8 -4 -5 -6 -6 1 -6 25 -7 2 -6 -6 -9 -6 -5 -7 1 -7 -5 -3 -7 1 -4 -2 -9 -8 -10 -10 -4 -6 
 19 
-(17; 1) (19; 25) (21; 2) (28; 1) (33; 2) 
+(17; 1) (19; 25) (21; 2) (28; 1) (33; 1) 
diff --git a/demos/tutorial/blast_io/write_assignment.cpp b/demos/tutorial/blast_io/write_assignment.cpp
index 0607186..6bc9780 100644
--- a/demos/tutorial/blast_io/write_assignment.cpp
+++ b/demos/tutorial/blast_io/write_assignment.cpp
@@ -88,12 +88,11 @@ int main(int argc, char ** argv)
             m.sStart = beginPosition(m.alignRow1);
             m.sEnd   = endPosition(m.alignRow1);
 
-            m.qLength = length(queries[q]);
             m.sLength = length(subjects[s]);
 
             computeAlignmentStats(m, context(outfile));
             computeBitScore(m, context(outfile));
-            computeEValue(m, context(outfile));
+            computeEValue(m, r.qLength, context(outfile));
 
             if (m.eValue > 1)
                 eraseBack(records[q].matches);
diff --git a/demos/tutorial/file_io_overview/solution3.cpp.stdout b/demos/tutorial/file_io_overview/solution3.cpp.stdout
index 93d2747..ea243b5 100644
--- a/demos/tutorial/file_io_overview/solution3.cpp.stdout
+++ b/demos/tutorial/file_io_overview/solution3.cpp.stdout
@@ -1,9 +1,9 @@
 @HD	VN:1.3	SO:coordinate
 @SQ	SN:ref	LN:45
 @SQ	SN:ref2	LN:40
-r001	163	ref	7	30	8M4I4M1D3M	=	37	39	TTAGATAAAGAGGATACTG	                   	XX:B:S,12561,2,20,112
-r002	0	ref	9	30	1S2I6M1P1I1P1I4M2I	*	0	0	AAAAGATAAGGGATAAA	                 
-r003	0	ref	9	30	5H6M	*	0	0	AGCTAA	      
-r004	0	ref	16	30	6M14N1I5M	*	0	0	ATAGCTCTCAGC	            
-r003	16	ref	29	30	6H5M	*	0	0	TAGGC	     
-r001	83	ref	37	30	9M	=	7	-39	CAGCGCCAT	         
+r001	163	ref	7	30	8M4I4M1D3M	=	37	39	TTAGATAAAGAGGATACTG	*	XX:B:S,12561,2,20,112
+r002	0	ref	9	30	1S2I6M1P1I1P1I4M2I	*	0	0	AAAAGATAAGGGATAAA	*
+r003	0	ref	9	30	5H6M	*	0	0	AGCTAA	*
+r004	0	ref	16	30	6M14N1I5M	*	0	0	ATAGCTCTCAGC	*
+r003	16	ref	29	30	6H5M	*	0	0	TAGGC	*
+r001	83	ref	37	30	9M	=	7	-39	CAGCGCCAT	*
diff --git a/demos/tutorial/generic_programming/template_subclassing.cpp b/demos/tutorial/generic_programming/template_subclassing.cpp
index 61dfe99..16d30b8 100644
--- a/demos/tutorial/generic_programming/template_subclassing.cpp
+++ b/demos/tutorial/generic_programming/template_subclassing.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/demos/tutorial/genome_annotations/base.cpp b/demos/tutorial/genome_annotations/base.cpp
index 679b96f..7452900 100644
--- a/demos/tutorial/genome_annotations/base.cpp
+++ b/demos/tutorial/genome_annotations/base.cpp
@@ -66,4 +66,4 @@ int main()
     writeRecords(fileOut, store);
 //![OUT]
     return 0;
-}
\ No newline at end of file
+}
diff --git a/demos/tutorial/indices/find2_index_approx.cpp b/demos/tutorial/indices/find2_index_approx.cpp
new file mode 100644
index 0000000..ca675f7
--- /dev/null
+++ b/demos/tutorial/indices/find2_index_approx.cpp
@@ -0,0 +1,57 @@
+//![Complete]
+#include <set>
+#include <mutex>
+
+#include <seqan/index.h>
+
+using namespace seqan;
+
+int main()
+{
+
+    DnaString genome(
+        "GAGAGGCCACTCGCAGGATTAAGTCAATAAGTTAATGGCGTGGGGTTATGGTATGGGGGTTCTCGCCCACAGTGACCTCATCGGT"
+        "GCATTTCCTCATCGTAGGCGGAACGGTAGACACAAGGCATGATGTCAAATCGCGACTCCAATCCCAAGGTCGCAAGCCTATATAG"
+        "GAACCCGCTTATGCCCTCTAATCCCGGACAGACCCCAAATATGGCATAGCTGGTTGGGGGTACCTACTAGGCACAGCCGGAAGCA");
+    Index<DnaString, BidirectionalIndex<FMIndex<> > > index(genome);
+
+    //![Delegate]
+    auto delegate = [](auto & iter, DnaString const & needle, uint8_t errors)
+    {
+        for (auto occ : getOccurrences(iter))
+            std::cout << occ << std::endl;
+    };
+    //![Delegate]
+
+    DnaString pattern("GGGGTTAT");
+    std::cout << "Hits with up to 2 errors (HammingDistance):" << std::endl;
+    //![SinglePattern]
+    find<0, 2>(delegate, index, pattern, HammingDistance());
+    //![SinglePattern]
+
+    StringSet<DnaString> patterns;
+    appendValue(patterns, "GGGGTTAT");
+    appendValue(patterns, "CTAGCTAA");
+    std::cout << "Hits with 1-2 errors (HammingDistance):" << std::endl;
+    //![MultiplePatterns]
+    find<1, 2>(delegate, index, patterns, HammingDistance(), Serial());
+    //![MultiplePatterns]
+
+    //![ParallelMode]
+    std::mutex mtx;
+    std::set<Pair<DnaString, unsigned> > hits;
+    auto delegateParallel = [&hits, &mtx](auto & iter, DnaString const & needle, uint8_t errors)
+    {
+        std::lock_guard<std::mutex> lck(mtx); // critical section below this line
+        for (auto occ : getOccurrences(iter))
+            hits.insert(Pair<DnaString, unsigned>(needle, occ));
+    };
+    find<2, 3>(delegateParallel, index, patterns, HammingDistance(), Parallel());
+    std::cout << "Hits with 2-3 errors (HammingDistance, no duplicates):" << std::endl;
+    for (auto hit : hits)
+        std::cout << hit << std::endl;
+    //![ParallelMode]
+
+    return 0;
+}
+//![Complete]
diff --git a/demos/tutorial/indices/find2_index_approx.stdout b/demos/tutorial/indices/find2_index_approx.stdout
new file mode 100644
index 0000000..a0a07c7
--- /dev/null
+++ b/demos/tutorial/indices/find2_index_approx.stdout
@@ -0,0 +1,23 @@
+Hits with up to 2 errors (HammingDistance):
+225
+41
+55
+Hits with 1-2 errors (HammingDistance):
+225
+55
+Hits with 1-2 errors (EditDistance, no duplicates):
+< CTAGCTAA , 27 >
+< CTAGCTAA , 61 >
+< CTAGCTAA , 157 >
+< CTAGCTAA , 162 >
+< CTAGCTAA , 173 >
+< CTAGCTAA , 183 >
+< CTAGCTAA , 215 >
+< CTAGCTAA , 229 >
+< CTAGCTAA , 236 >
+< GGGGTTAT , 14 >
+< GGGGTTAT , 54 >
+< GGGGTTAT , 120 >
+< GGGGTTAT , 174 >
+< GGGGTTAT , 225 >
+< GGGGTTAT , 226 >
diff --git a/demos/tutorial/iterators/assignment_1_solution.cpp b/demos/tutorial/iterators/assignment_1_solution.cpp
index b46682b..93fb8a9 100644
--- a/demos/tutorial/iterators/assignment_1_solution.cpp
+++ b/demos/tutorial/iterators/assignment_1_solution.cpp
@@ -13,8 +13,8 @@ int main()
 
     for (; it != itEnd; goNext(it))
     {
-        if (getValue(it) == 'N')
-            value(it) = 'A';
+        if (*it == 'N')
+            *it = 'A';
     }
     std::cout << "Modified genome: " << genome << std::endl;
     return 0;
diff --git a/demos/tutorial/journaled_string_tree/journaled_string_tree_base.cpp b/demos/tutorial/journaled_string_tree/journaled_string_tree_base.cpp
index d6bc1da..ab4aaf3 100644
--- a/demos/tutorial/journaled_string_tree/journaled_string_tree_base.cpp
+++ b/demos/tutorial/journaled_string_tree/journaled_string_tree_base.cpp
@@ -61,4 +61,4 @@ int main()
 
     return 0;
 }
-//![search]
\ No newline at end of file
+//![search]
diff --git a/demos/tutorial/sam_and_bam_io/base.cpp b/demos/tutorial/sam_and_bam_io/base.cpp
index ac3a181..ceca6a5 100644
--- a/demos/tutorial/sam_and_bam_io/base.cpp
+++ b/demos/tutorial/sam_and_bam_io/base.cpp
@@ -10,11 +10,11 @@ class myBamAlignmentRecord
 {
 public:
     CharString qName;               // QNAME
-    __uint16 flag;                  // FLAG
+    uint16_t flag;                  // FLAG
     int32_t rID;                    // REF
     int32_t beginPos;               // POS
-    __uint8 mapQ;                   // MAPQ mapping quality, 255 for */invalid
-    __uint16 bin;                   // bin for indexing
+    uint8_t mapQ;                   // MAPQ mapping quality, 255 for */invalid
+    uint16_t bin;                   // bin for indexing
     String<CigarElement<> > cigar;  // CIGAR string
     int32_t rNextId;                // RNEXT (0-based)
     int32_t pNext;                  // PNEXT (0-based)
diff --git a/demos/tutorial/sam_and_bam_io/example7.cpp.stdout b/demos/tutorial/sam_and_bam_io/example7.cpp.stdout
index b87004f..eea4906 100644
--- a/demos/tutorial/sam_and_bam_io/example7.cpp.stdout
+++ b/demos/tutorial/sam_and_bam_io/example7.cpp.stdout
@@ -1,3 +1,3 @@
-r002	0	ref	9	30	1S2I6M1P1I1P1I4M2I	*	0	0	AAAAGATAAGGGATAAA	                 
-r003	0	ref	9	30	5H6M	*	0	0	AGCTAA	      
-r004	0	ref	16	30	6M14N1I5M	*	0	0	ATAGCTCTCAGC	            
+r002	0	ref	9	30	1S2I6M1P1I1P1I4M2I	*	0	0	AAAAGATAAGGGATAAA	*
+r003	0	ref	9	30	5H6M	*	0	0	AGCTAA	*
+r004	0	ref	16	30	6M14N1I5M	*	0	0	ATAGCTCTCAGC	*
diff --git a/demos/tutorial/sequences/base.cpp b/demos/tutorial/sequences/base.cpp
index 5bd6f0a..64d2b38 100644
--- a/demos/tutorial/sequences/base.cpp
+++ b/demos/tutorial/sequences/base.cpp
@@ -44,11 +44,11 @@ int main()
 
     Dna5String genome = "ATGGTTTCAACGTAATGCTGAACATGTCGCGT";
     Dna5String read = "TGGTNTCA";
-    Dna5String genomeFragment;
     unsigned beginPosition = 1;
 //![assignment5_code_to_change]
     // We have to create a copy of the corresponding fragment of the genome, where the read aligns to
     // Change this piece of code using an infix of the genome
+    Dna5String genomeFragment;
     for (unsigned i = 0; i < length(read); ++i)
     {
         appendValue(genomeFragment, genome[beginPosition + i]);
diff --git a/demos/tutorial/simple_rna_seq/genequant_assignment4.cpp b/demos/tutorial/simple_rna_seq/genequant_assignment4.cpp
index 26e5000..06dbbec 100644
--- a/demos/tutorial/simple_rna_seq/genequant_assignment4.cpp
+++ b/demos/tutorial/simple_rna_seq/genequant_assignment4.cpp
@@ -133,4 +133,4 @@ int main(int argc, char const * argv[])
 //![main2_end]
     return 0;
 }
-//![main2_end]
\ No newline at end of file
+//![main2_end]
diff --git a/demos/tutorial/string_sets/example_iterators.cpp b/demos/tutorial/string_sets/example_iterators.cpp
index f4b5f4a..bad9c1d 100644
--- a/demos/tutorial/string_sets/example_iterators.cpp
+++ b/demos/tutorial/string_sets/example_iterators.cpp
@@ -30,7 +30,7 @@ int main()
     Iterator<TConcat>::Type itEnd = end(concatSet);
     for (; it != itEnd; goNext(it))
     {
-        std::cout << getValue(it) << " ";
+        std::cout << *it << " ";
     }
     std::cout << '\n';
 //![concatenator]
diff --git a/demos/unassigned_or_unused/bam_library_size.cpp b/demos/unassigned_or_unused/bam_library_size.cpp
index 035093a..b717aaf 100644
--- a/demos/unassigned_or_unused/bam_library_size.cpp
+++ b/demos/unassigned_or_unused/bam_library_size.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/demos/unassigned_or_unused/bam_print_alignments.cpp b/demos/unassigned_or_unused/bam_print_alignments.cpp
index 70b59df..0a8b275 100644
--- a/demos/unassigned_or_unused/bam_print_alignments.cpp
+++ b/demos/unassigned_or_unused/bam_print_alignments.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/demos/unassigned_or_unused/bamutil.cpp b/demos/unassigned_or_unused/bamutil.cpp
index d7325eb..3863fec 100644
--- a/demos/unassigned_or_unused/bamutil.cpp
+++ b/demos/unassigned_or_unused/bamutil.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/demos/unassigned_or_unused/benchmark_stream.cpp b/demos/unassigned_or_unused/benchmark_stream.cpp
index 85234a7..0c52ed4 100644
--- a/demos/unassigned_or_unused/benchmark_stream.cpp
+++ b/demos/unassigned_or_unused/benchmark_stream.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/demos/unassigned_or_unused/benchmark_stream_write.cpp b/demos/unassigned_or_unused/benchmark_stream_write.cpp
index cc4dc2c..63d4e18 100644
--- a/demos/unassigned_or_unused/benchmark_stream_write.cpp
+++ b/demos/unassigned_or_unused/benchmark_stream_write.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/demos/unassigned_or_unused/filter_sam.cpp b/demos/unassigned_or_unused/filter_sam.cpp
index 806e718..4d3649b 100644
--- a/demos/unassigned_or_unused/filter_sam.cpp
+++ b/demos/unassigned_or_unused/filter_sam.cpp
@@ -112,7 +112,7 @@ void performWork(Options const & options)
     // Copy over at most options.limit alignments per read.
     std::cerr << "Filtering reads..." << std::endl;
     FragmentStore<>::TAlignedReadStore rsCopy;
-    size_t readId = MaxValue<size_t>::VALUE;
+    size_t readId = std::numeric_limits<size_t>::max();
     size_t alignmentCount = 0;
     for (TIterator it = begin(fragmentStore.alignedReadStore), itEnd = end(fragmentStore.alignedReadStore); it != itEnd; ++it)
     {
diff --git a/demos/unassigned_or_unused/parse_lm_stellar.cpp b/demos/unassigned_or_unused/parse_lm_stellar.cpp
index eb562fb..64c9e42 100644
--- a/demos/unassigned_or_unused/parse_lm_stellar.cpp
+++ b/demos/unassigned_or_unused/parse_lm_stellar.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                              parse_lm_stellar
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/demos/unassigned_or_unused/sam2svg.cpp b/demos/unassigned_or_unused/sam2svg.cpp
index d79c6b8..71253d0 100644
--- a/demos/unassigned_or_unused/sam2svg.cpp
+++ b/demos/unassigned_or_unused/sam2svg.cpp
@@ -177,7 +177,7 @@ int main(int argc, char const ** argv)
     std::cerr << "Writing " << contigs.size() << " contigs...\n";
 
     int beginLine = (options.beginLine == -1) ? 0 : options.beginLine;
-    int endLine = (options.endLine == -1) ? MaxValue<int>::VALUE : options.endLine;
+    int endLine = (options.endLine == -1) ? std::numeric_limits<int>::max() : options.endLine;
 
     for (unsigned i = 0; i < contigs.size(); ++i)
         if (contigs[i] < length(store.contigStore))
@@ -185,18 +185,18 @@ int main(int argc, char const ** argv)
             std::cerr << "Writing contig " << store.contigNameStore[contigs[i]] << " ... ";
 
             int64_t l = (options.beginPos == -1) ? 0 : options.beginPos;
-            int64_t r = (options.endPos == -1) ? MaxValue<TContigPos>::VALUE : options.endPos;
+            int64_t r = (options.endPos == -1) ? std::numeric_limits<TContigPos>::max() : options.endPos;
 
             if (!options.gapSpace)
             {
                 typedef Gaps<Nothing, AnchorGaps<TContig::TGapAnchors> >   TContigGaps;
                 TContigGaps contigGaps(store.contigStore[i].gaps);
                 l = positionSeqToGap(contigGaps, l);
-                if (r != MaxValue<TContigPos>::VALUE)
+                if (r != std::numeric_limits<TContigPos>::max())
                     r = positionSeqToGap(contigGaps, r);
             }
 
-            if (r == MaxValue<TContigPos>::VALUE)
+            if (r == std::numeric_limits<TContigPos>::max())
             {
                 r = 0;
                 for (unsigned j = 0; j < length(layout.contigRows[i]); ++j)
diff --git a/demos/unassigned_or_unused/sample_seqs.cpp b/demos/unassigned_or_unused/sample_seqs.cpp
index 01b3087..6ebb0af 100644
--- a/demos/unassigned_or_unused/sample_seqs.cpp
+++ b/demos/unassigned_or_unused/sample_seqs.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/demos/unassigned_or_unused/soft_to_hard_masking.cpp b/demos/unassigned_or_unused/soft_to_hard_masking.cpp
index f082fcd..64ea55e 100644
--- a/demos/unassigned_or_unused/soft_to_hard_masking.cpp
+++ b/demos/unassigned_or_unused/soft_to_hard_masking.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/demos/unassigned_or_unused/tutorial_file_io/solution2.cpp b/demos/unassigned_or_unused/tutorial_file_io/solution2.cpp
deleted file mode 100644
index b2487c2..0000000
--- a/demos/unassigned_or_unused/tutorial_file_io/solution2.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-#include <iostream>
-#include <fstream>
-
-#include <seqan/stream.h>
-
-using namespace seqan;
-
-// Copy from stream in to the stream out.
-
-template <typename TOutStream, typename TInStream>
-void copyStream(TOutStream & vout, TInStream & vin)
-{
-    // Create iterators to read and write.
-    typedef typename DirectionIterator<TInStream, Input>::Type TReader;
-    typedef typename DirectionIterator<TOutStream, Output>::Type TWriter;
-
-    TReader reader = directionIterator(vin, Input());
-    TWriter writer = directionIterator(vout, Output());
-
-    CharString buffer;
-    reserve(buffer, 1000);
-
-    while (!atEnd(reader))
-    {
-        clear(buffer);
-        read(buffer, reader, capacity(buffer));
-        write(writer, buffer);
-    }
-}
-
-// The main function parses the command line, opens the files
-// and then calls either copyStream.
-
-int main(int argc, char const ** argv)
-{
-    VirtualStream<char, Input> vin;
-    VirtualStream<char, Output> vout;
-
-    if (argc != 3)
-    {
-        CharString inExts = concat(vin.getFileExtensions(), "|", true);
-        CharString outExts = concat(vout.getFileExtensions(), "|", true);
-        std::cerr << "USAGE: " << argv[0] << " input[" << inExts << "] output[" << outExts << "]\n";
-        return 1;
-    }
-
-    if (!open(vin, argv[1]))
-    {
-        std::cerr << "ERROR: Could not open file " << argv[1] << "\n";
-        return 1;
-    }
-
-    if (!open(vout, argv[2]))
-    {
-        std::cerr << "ERROR: Could not open file " << argv[2] << "\n";
-        return 1;
-    }
-
-    copyStream(vout, vin);
-    return 0;
-}
diff --git a/demos/unassigned_or_unused/tutorial_file_io/solution3.cpp b/demos/unassigned_or_unused/tutorial_file_io/solution3.cpp
deleted file mode 100644
index 8dbe78b..0000000
--- a/demos/unassigned_or_unused/tutorial_file_io/solution3.cpp
+++ /dev/null
@@ -1,72 +0,0 @@
-#include <cstring>
-#include <iostream>
-#include <fstream>
-
-#include <seqan/stream.h>
-
-using namespace seqan;
-
-// Copy from stream in to the stream out.
-
-template <typename TOutStream, typename TInStream>
-void copyStream(TOutStream & vout, TInStream & vin)
-{
-    // Create iterators to read and write.
-    typedef typename DirectionIterator<TInStream, Input>::Type TReader;
-    TReader reader = directionIterator(vin, Input());
-
-    CharString buffer;
-    reserve(buffer, 1000);
-
-    while (!atEnd(reader))
-    {
-        clear(buffer);
-        read(buffer, reader, capacity(buffer));
-        write(vout, buffer);
-    }
-}
-
-// The main function parses the command line, opens the files
-// and then calls either copyStream. Read from stdin if the 1st
-// argument is - or omitted and write to stdout if the 2nd argument
-// is omitted.
-
-int main(int argc, char const ** argv)
-{
-    VirtualStream<char, Input> vin;
-    VirtualStream<char, Output> vout;
-
-    if (argc < 1 || argc > 3)
-    {
-        CharString inExts = concat(vin.getFileExtensions(), "|", true);
-        CharString outExts = concat(vout.getFileExtensions(), "|", true);
-        std::cerr << "USAGE: " << argv[0] << " input[" << inExts << "] [output[" << outExts << "]]\n";
-        return 1;
-    }
-
-    bool success;
-    if (argc >= 2 && strcmp(argv[1], "-") != 0)
-        success = open(vin, argv[1]);
-    else
-        success = open(vin, std::cin);
-
-    if (!success)
-    {
-        std::cerr << "ERROR: Could not open input file " << argv[1] << "\n";
-        return 1;
-    }
-
-    if (argc == 3)
-        success = open(vout, argv[2]);
-    else
-        success = open(vout, std::cout, Nothing());  // disable compression on stdout
-
-    if (!success)
-    {
-        std::cerr << "ERROR: Could not open output file " << ((argc == 3) ? argv[2] : "") << "\n";
-        return 1;
-    }
-
-    copyStream(vout, vin);
-    return 0;
-}
diff --git a/demos/unassigned_or_unused/tutorial_file_io/stream_compression_formats.cpp b/demos/unassigned_or_unused/tutorial_file_io/stream_compression_formats.cpp
index 567b582..6230038 100644
--- a/demos/unassigned_or_unused/tutorial_file_io/stream_compression_formats.cpp
+++ b/demos/unassigned_or_unused/tutorial_file_io/stream_compression_formats.cpp
@@ -1,5 +1,9 @@
 //![header]
 #include <fstream>
+#include <vector>
+#include <iterator>
+#include <algorithm>
+
 #include <seqan/sequence.h>
 #include <seqan/stream.h>
 
@@ -13,8 +17,12 @@ int main(int argc, char const ** argv)
 
     if (argc != 2)
     {
-        CharString exts = concat(TVStream::getFileExtensions(), "|", true);
-        std::cerr << "USAGE: " << argv[0] << " input[" << exts << "]" << std::endl;
+        std::vector<std::string> file_ext_list = TVStream::getFileExtensions();
+        std::ostream_iterator<std::string> out_it (std::cerr,"|");
+
+        std::cerr << "USAGE: " << argv[0] << " input[";
+        std::copy(file_ext_list.begin(), file_ext_list.end() - 1, out_it);
+        std::cerr << "]" << std::endl;
         return 1;
     }
 
diff --git a/dox/CMakeLists.txt b/dox/CMakeLists.txt
index 78c0597..e5e1189 100644
--- a/dox/CMakeLists.txt
+++ b/dox/CMakeLists.txt
@@ -9,56 +9,18 @@
 cmake_minimum_required (VERSION 3.0.0)
 project (seqan_dox CXX)
 
+# require python 2.7, not python3
+set(PythonInterp_FIND_VERSION 2.7)
+set(PythonInterp_FIND_VERSION_MAJOR 2)
+set(PythonInterp_FIND_VERSION_MINOR 7)
+set(PythonInterp_FIND_VERSION_COUNT 2)
+
 find_package (PythonInterp)
-if (NOT PYTHONINTERP_FOUND)
-    message (STATUS "  Python not found, not building dox as a tests.")
+if (NOT PYTHONINTERP_FOUND OR NOT(${PYTHON_VERSION_MAJOR} MATCHES "2"))
+    message (STATUS "  You need Python 2.x for building dox. (skip the tests)")
     return ()
 endif ()
 
-# find python 2.x
-if(NOT(${PYTHON_VERSION_MAJOR} MATCHES "2"))
-    set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
-    unset(_Python_NAMES)
-    foreach(_CURRENT_VERSION IN LISTS _PYTHON2_VERSIONS)
-        list(APPEND _Python_NAMES "python${_CURRENT_VERSION}")
-    endforeach()
-    unset(_PYTHON2_VERSIONS)
-
-    find_program(PYTHON2_EXECUTABLE NAMES ${_Python_NAMES})
-    if(PYTHON2_EXECUTABLE MATCHES "PYTHON2_EXECUTABLE-NOTFOUND")
-        message (STATUS "You need Python 2.x for building dox. (skip the tests)")
-        return()
-    endif()
-    set(PYTHON_EXECUTABLE "${PYTHON2_EXECUTABLE}")
-    message (STATUS "Found Python 2.x: ${PYTHON_EXECUTABLE}") 
-endif()
-
-# find python 2.x
-if(NOT(${PYTHON_VERSION_MAJOR} MATCHES "2"))
-    set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
-    unset(_Python_NAMES)
-    foreach(_CURRENT_VERSION IN LISTS _PYTHON2_VERSIONS)
-        list(APPEND _Python_NAMES "python${_CURRENT_VERSION}")
-    endforeach()
-    unset(_PYTHON2_VERSIONS)
-
-    find_program(PYTHON2_EXECUTABLE NAMES ${_Python_NAMES})
-    if(PYTHON2_EXECUTABLE MATCHES "PYTHON2_EXECUTABLE-NOTFOUND")
-        message (STATUS "You need Python 2.x for building dox. (skip the tests)")
-        return()
-    endif()
-    set(PYTHON_EXECUTABLE "${PYTHON2_EXECUTABLE}")
-    message (STATUS "Found Python 2.x: ${PYTHON_EXECUTABLE}")
-
-    # change shell scripts for building dox
-    file(READ "${CMAKE_CURRENT_SOURCE_DIR}/../dox/run.sh.in" run_content)
-    file(READ "${CMAKE_CURRENT_SOURCE_DIR}/../dox/dox_only.sh.in" dox_only_content)
-    string(REPLACE "python2 ../" "${PYTHON_EXECUTABLE} ../" run_content "${run_content}")
-    string(REPLACE "python2 ../" "${PYTHON_EXECUTABLE} ../" dox_only_content "${dox_only_content}")
-    file(WRITE "${CMAKE_CURRENT_SOURCE_DIR}/../dox/run.sh" "${run_content}")
-    file(WRITE "${CMAKE_CURRENT_SOURCE_DIR}/../dox/dox_only.sh" "${dox_only_content}")
-endif()
-
 # Add building the documentation as a test.
 add_test (build_dox
   ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/../util/bin/dox.py
@@ -77,5 +39,5 @@ if (${SEQAN_BUILD_SYSTEM} MATCHES "SEQAN_RELEASE_LIBRARY") # includes SEQAN_RELE
         --out-dir ${CMAKE_BINARY_DIR}/dox/html)
 
     install (DIRECTORY ${CMAKE_BINARY_DIR}/dox/html
-             DESTINATION share/doc/seqan)
+             DESTINATION ${CMAKE_INSTALL_DOCDIR})
 endif ()
diff --git a/include/seqan/LICENSE b/include/seqan/LICENSE
index 3d08d0d..ab6e3bf 100644
--- a/include/seqan/LICENSE
+++ b/include/seqan/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/align.h b/include/seqan/align.h
index 8e5858e..db4eeba 100644
--- a/include/seqan/align.h
+++ b/include/seqan/align.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -53,6 +53,7 @@
 #include <algorithm>
 
 #include <seqan/basic.h>
+#include <seqan/simd.h>
 #include <seqan/modifier.h>  // ModifiedAlphabet<>.
 #include <seqan/align/align_metafunctions.h>
 #include <seqan/graph_align.h>  // TODO(holtgrew): We should not have to depend on this.
@@ -76,6 +77,8 @@
 
 #include <seqan/align/fragment.h>
 
+#include <seqan/align/aligned_sequence_concept.h>
+
 #include <seqan/align/gaps_base.h>
 #include <seqan/align/gaps_iterator_base.h>
 
diff --git a/include/seqan/align/align_base.h b/include/seqan/align/align_base.h
index a23afff..58c7345 100644
--- a/include/seqan/align/align_base.h
+++ b/include/seqan/align/align_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -476,7 +476,7 @@ detach(Align<TSource, TSpec> & me)
 
 template <typename TFile, typename TSource, typename TSpec>
 inline void
-write(TFile & target,
+_write(TFile & target,
       Align<TSource, TSpec> const & source)
 {
     typedef Align<TSource, TSpec> const TAlign;
@@ -557,6 +557,15 @@ write(TFile & target,
     writeValue(target, '\n');
 }
 
+template <typename TFile, typename TSource, typename TSpec>
+[[deprecated("Old-style I/O. Use stream operator << instead.")]]
+inline void
+write(TFile & target,
+      Align<TSource, TSpec> const & source)
+{
+    _write(target, source);
+}
+
 // ----------------------------------------------------------------------------
 // Function clearClipping()
 // ----------------------------------------------------------------------------
@@ -607,7 +616,7 @@ operator<<(TStream & target,
            Align<TSource, TSpec> const & source)
 {
     typename DirectionIterator<TStream, Output>::Type it = directionIterator(target, Output());
-    write(it, source);
+    _write(it, source);
     return target;
 }
 
diff --git a/include/seqan/align/align_cols.h b/include/seqan/align/align_cols.h
index 00b625b..f0a9428 100644
--- a/include/seqan/align/align_cols.h
+++ b/include/seqan/align/align_cols.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/align/align_config.h b/include/seqan/align/align_config.h
index b76e683..0f3c261 100644
--- a/include/seqan/align/align_config.h
+++ b/include/seqan/align/align_config.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/align/align_interface_wrapper.h b/include/seqan/align/align_interface_wrapper.h
index 177d0ae..3c719ec 100644
--- a/include/seqan/align/align_interface_wrapper.h
+++ b/include/seqan/align/align_interface_wrapper.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -58,14 +58,20 @@ namespace seqan
 // Function _alignWrapperSequential(); Score; StringSet vs. StringSet
 // ----------------------------------------------------------------------------
 
-template <typename TString1, typename TSpec1,
-          typename TString2, typename TSpec2,
+template <typename TSetH,
+          typename TSetV,
           typename TScoreValue, typename TScoreSpec,
           typename TAlignConfig,
-          typename TGapModel>
+          typename TGapModel,
+          std::enable_if_t<And<And<Is<ContainerConcept<TSetH>>,
+                                   Is<ContainerConcept<typename Value<TSetH>::Type>>>,
+                               And<Is<ContainerConcept<TSetV>>,
+                                   Is<ContainerConcept<typename Value<TSetV>::Type>>>
+                               >::VALUE,
+                           int> = 0>
 inline auto
-_alignWrapperSequential(StringSet<TString1, TSpec1> const & stringsH,
-                        StringSet<TString2, TSpec2> const & stringsV,
+_alignWrapperSequential(TSetH const & stringsH,
+                        TSetV const & stringsV,
                         Score<TScoreValue, TScoreSpec> const & scoringScheme,
                         TAlignConfig const & config,
                         TGapModel const & /*gaps*/)
@@ -92,14 +98,20 @@ _alignWrapperSequential(StringSet<TString1, TSpec1> const & stringsH,
 // Function _alignWrapperSequential(); Score; String vs. StringSet
 // ----------------------------------------------------------------------------
 
-template <typename TString1,
-          typename TString2, typename TSpec,
+template <typename TSeqH,
+          typename TSetV,
           typename TScoreValue, typename TScoreSpec,
           typename TAlignConfig,
-          typename TGapModel>
+          typename TGapModel,
+          std::enable_if_t<And<And<Is<ContainerConcept<TSeqH>>,
+                                   Not<Is<ContainerConcept<typename Value<TSeqH>::Type>>>>,
+                               And<Is<ContainerConcept<TSetV>>,
+                                   Is<ContainerConcept<typename Value<TSetV>::Type>>>
+                               >::VALUE,
+                           int> = 0>
 inline auto
-_alignWrapperSequential(TString1 const & stringH,
-                        StringSet<TString2, TSpec> const & stringsV,
+_alignWrapperSequential(TSeqH const & stringH,
+                        TSetV const & stringsV,
                         Score<TScoreValue, TScoreSpec> const & scoringScheme,
                         TAlignConfig const & config,
                         TGapModel const & /*gaps*/)
@@ -125,21 +137,27 @@ _alignWrapperSequential(TString1 const & stringH,
 // Function _alignWrapperSequential(); Gaps
 // ----------------------------------------------------------------------------
 
-template <typename TSequenceH, typename TGapsSpecH, typename TSetSpecH,
-          typename TSequenceV, typename TGapsSpecV, typename TSetSpecV,
+template <typename TSetH,
+          typename TSetV,
           typename TScoreValue, typename TScoreSpec,
           typename TAlignConfig,
-          typename TGapModel>
+          typename TGapModel,
+          std::enable_if_t<And<And<Is<ContainerConcept<TSetH>>,
+                                   Is<AlignedSequenceConcept<typename Value<TSetH>::Type>>>,
+                               And<Is<ContainerConcept<TSetV>>,
+                                   Is<AlignedSequenceConcept<typename Value<TSetV>::Type>>>
+                               >::VALUE,
+                           int> = 0>
 inline auto
-_alignWrapperSequential(StringSet<Gaps<TSequenceH, TGapsSpecH>, TSetSpecH> & gapSeqSetH,
-                        StringSet<Gaps<TSequenceV, TGapsSpecV>, TSetSpecV> & gapSeqSetV,
+_alignWrapperSequential(TSetH & gapSeqSetH,
+                        TSetV & gapSeqSetV,
                         Score<TScoreValue, TScoreSpec> const & scoringScheme,
                         TAlignConfig const & config,
                         TGapModel const & /*gaps*/)
 
 {
-    typedef typename Size<TSequenceH>::Type TSize;
-    typedef typename Position<TSequenceH>::Type TPosition;
+    typedef typename Size<TSetH>::Type TSize;
+    typedef typename Position<TSetH>::Type TPosition;
     typedef TraceSegment_<TPosition, TSize> TTraceSegment;
 
     String<TScoreValue> results;
@@ -167,7 +185,8 @@ _alignWrapperSequential(StringSet<Gaps<TSequenceH, TGapsSpecH>, TSetSpecH> & gap
 template <typename... TArgs>
 inline auto _alignWrapper(TArgs && ...args)
 {
-#ifdef SEQAN_SIMD_ENABLED
+// NOTE(marehr): ume_simd is currently not working, thus falling back to sequential case
+#if defined(SEQAN_SIMD_ENABLED) && !defined(SEQAN_UMESIMD_ENABLED)
     return _alignWrapperSimd(std::forward<TArgs>(args)...);
 #else
     return _alignWrapperSequential(std::forward<TArgs>(args)...);
diff --git a/include/seqan/align/align_iterator_base.h b/include/seqan/align/align_iterator_base.h
index 4eef6b5..b35c089 100644
--- a/include/seqan/align/align_iterator_base.h
+++ b/include/seqan/align/align_iterator_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/align/align_metafunctions.h b/include/seqan/align/align_metafunctions.h
index 5ae233c..aa8eb8a 100644
--- a/include/seqan/align/align_metafunctions.h
+++ b/include/seqan/align/align_metafunctions.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/align/align_traceback.h b/include/seqan/align/align_traceback.h
index 6b9ea34..0df78ce 100644
--- a/include/seqan/align/align_traceback.h
+++ b/include/seqan/align/align_traceback.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/util/skel/header_template/library_header.h b/include/seqan/align/aligned_sequence_concept.h
similarity index 86%
copy from util/skel/header_template/library_header.h
copy to include/seqan/align/aligned_sequence_concept.h
index dbeff83..d458865 100644
--- a/util/skel/header_template/library_header.h
+++ b/include/seqan/align/aligned_sequence_concept.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -29,13 +29,14 @@
 // DAMAGE.
 //
 // ==========================================================================
-// Author: %(AUTHOR)s
+// Author: Rene Rahn <rene.rahn at fu-berlin.de>
 // ==========================================================================
 
-#ifndef %(HEADER_GUARD)s
-#define %(HEADER_GUARD)s
+#ifndef INCLUDE_SEQAN_ALIGN_ALIGNED_SEQUENCE_CONCEPT_H_
+#define INCLUDE_SEQAN_ALIGN_ALIGNED_SEQUENCE_CONCEPT_H_
 
-namespace seqan {
+namespace seqan
+{
 
 // ============================================================================
 // Forwards
@@ -45,6 +46,13 @@ namespace seqan {
 // Tags, Classes, Enums
 // ============================================================================
 
+SEQAN_CONCEPT_REFINE(AlignedSequenceConcept, (TSequence), (ContainerConcept))
+{
+
+    SEQAN_CONCEPT_USAGE(AlignedSequenceConcept)
+    {}
+};
+
 // ============================================================================
 // Metafunctions
 // ============================================================================
@@ -52,7 +60,6 @@ namespace seqan {
 // ============================================================================
 // Functions
 // ============================================================================
-
 }  // namespace seqan
 
-#endif  // #ifndef %(HEADER_GUARD)s
+#endif  // #ifndef INCLUDE_SEQAN_ALIGN_ALIGNED_SEQUENCE_CONCEPT_H_
diff --git a/include/seqan/align/alignment_algorithm_tags.h b/include/seqan/align/alignment_algorithm_tags.h
index 741645a..85561b7 100644
--- a/include/seqan/align/alignment_algorithm_tags.h
+++ b/include/seqan/align/alignment_algorithm_tags.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/align/alignment_operations.h b/include/seqan/align/alignment_operations.h
index fccc61a..af185fa 100644
--- a/include/seqan/align/alignment_operations.h
+++ b/include/seqan/align/alignment_operations.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/align/dp_algorithm_impl.h b/include/seqan/align/dp_algorithm_impl.h
index 39ae3d8..53cb9cb 100644
--- a/include/seqan/align/dp_algorithm_impl.h
+++ b/include/seqan/align/dp_algorithm_impl.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -87,7 +87,7 @@
 // are accepted. If the dp profile consists of the standard global alignment
 // algorithm (NeedlemanWunsch or Gotoh), the band is required to go through
 // the sink and the source of the dp matrix. If this is not given the
-// alignment algorithm is aborted and the score MinValue<TScoreValue>::VALUE
+// alignment algorithm is aborted and the score std::numeric_limits<TScoreValue>::min()
 // is returned.
 // There are no further restrictions.
 //
@@ -272,16 +272,18 @@ _isBandEnabled(DPBandConfig<TBandSpec> const & /*band*/)
 // ----------------------------------------------------------------------------
 
 // Computes the score and tracks it if enabled.
-template <typename TDPScout, typename TTraceMatrixNavigator, typename TScoreValue, typename TGapCosts,
+template <typename TDPScout,
+          typename TTraceMatrixNavigator,
+          typename TDPCell,
           typename TSequenceHValue, typename TSequenceVValue, typename TScoringScheme, typename TColumnDescriptor,
           typename TCellDescriptor, typename TDPProfile>
 inline void
 _computeCell(TDPScout & scout,
              TTraceMatrixNavigator & traceMatrixNavigator,
-             DPCell_<TScoreValue, TGapCosts> & activeCell,
-             DPCell_<TScoreValue, TGapCosts> const & previousDiagonal,
-             DPCell_<TScoreValue, TGapCosts> const & previousHorizontal,
-             DPCell_<TScoreValue, TGapCosts> const & previousVertical,
+             TDPCell & current,
+             TDPCell & diagonal,
+             TDPCell const & horizontal,
+             TDPCell & vertical,
              TSequenceHValue const & seqHVal,
              TSequenceVValue const & seqVVal,
              TScoringScheme const & scoringScheme,
@@ -290,16 +292,23 @@ _computeCell(TDPScout & scout,
              TDPProfile const &)
 {
     typedef DPMetaColumn_<TDPProfile, TColumnDescriptor> TMetaColumn;
+
     assignValue(traceMatrixNavigator,
-                _computeScore(activeCell, previousDiagonal, previousHorizontal, previousVertical, seqHVal, seqVVal,
-                              scoringScheme, typename RecursionDirection_<TMetaColumn, TCellDescriptor>::Type(),
+                _computeScore(current, diagonal, horizontal, vertical, seqHVal, seqVVal, scoringScheme,
+                              typename RecursionDirection_<TMetaColumn, TCellDescriptor>::Type(),
                               TDPProfile()));
 
     if (TrackingEnabled_<TMetaColumn, TCellDescriptor>::VALUE)
     {
         typedef typename LastColumnEnabled_<TDPProfile, TColumnDescriptor>::Type TIsLastColumn;
         typedef typename LastRowEnabled_<TDPProfile, TCellDescriptor, TColumnDescriptor>::Type TIsLastRow;
-        _scoutBestScore(scout, activeCell, traceMatrixNavigator,
+
+        // TODO(rrahn): Refactor to set vertical score only when max is updated.
+        if (IsTracebackEnabled_<TDPProfile>::VALUE)
+        {
+            _setVerticalScoreOfCell(current, _verticalScoreOfCell(vertical));
+        }
+        _scoutBestScore(scout, current, traceMatrixNavigator,
                         TIsLastColumn(), TIsLastRow());
     }
 }
@@ -322,10 +331,16 @@ _precomputeScoreMatrixOffset(TSeqValue const & seqVal,
 // Function _computeTrack()
 // ----------------------------------------------------------------------------
 
-// Computes one track of the dp algorithm. A track is defined as the area that is filled by the inner loop and
-// iterated by the outer loop. For the column-wise navigation the track is equivalent with the column.
-template <typename TDPScout, typename TDPScoreMatrixNavigator, typename TDPTraceMatrixNavigator, typename TSeqHValue,
-          typename TSeqVValue, typename TSeqVIterator, typename TScoringScheme, typename TColumnDescriptor, typename TDPProfile>
+template <typename TDPScout,
+          typename TDPScoreMatrixNavigator,
+          typename TDPTraceMatrixNavigator,
+          typename TSeqHValue,
+          typename TSeqVValue,
+          typename TSeqVIterator,
+          typename TScoringScheme,
+          typename TDPCell,
+          typename TColumnDescriptor,
+          typename TDPProfile>
 inline void
 _computeTrack(TDPScout & scout,
               TDPScoreMatrixNavigator & dpScoreMatrixNavigator,
@@ -335,13 +350,16 @@ _computeTrack(TDPScout & scout,
               TSeqVIterator const & seqBegin,
               TSeqVIterator const & seqEnd,
               TScoringScheme const & scoringScheme,
+              TDPCell & cacheDiag,
+              TDPCell & cacheVert,
               TColumnDescriptor const &,
               TDPProfile const &)
 {
-    // Set the iterator to the begin of the track.
     _goNextCell(dpScoreMatrixNavigator, TColumnDescriptor(), FirstCell());
     _goNextCell(dpTraceMatrixNavigator, TColumnDescriptor(), FirstCell());
 
+    _preInitCacheDiagonal(cacheDiag, dpScoreMatrixNavigator, TColumnDescriptor());
+
     // Precompute the row of the scoring matrix for future look-ups.
     TSeqHValue tmpSeqH = _precomputeScoreMatrixOffset(seqHValue, scoringScheme);
 
@@ -349,52 +367,93 @@ _computeTrack(TDPScout & scout,
     _preInitScoutVertical(scout);
 
     // Compute the first cell.
-    _computeCell(scout, dpTraceMatrixNavigator, value(dpScoreMatrixNavigator),
-                 previousCellDiagonal(dpScoreMatrixNavigator), previousCellHorizontal(dpScoreMatrixNavigator),
-                 previousCellVertical(dpScoreMatrixNavigator), tmpSeqH, seqVValue, scoringScheme,
+    _computeCell(scout,
+                 dpTraceMatrixNavigator,
+                 value(dpScoreMatrixNavigator),
+                           cacheDiag,
+                           previousCellHorizontal(dpScoreMatrixNavigator),
+                           cacheVert,
+                 tmpSeqH,
+                 seqVValue,
+                 scoringScheme,
                  TColumnDescriptor(), FirstCell(), TDPProfile());
 
     TSeqVIterator iter = seqBegin;
-    TSeqVIterator itEnd = (seqEnd - 1);
-    // Compute the inner cells of the current track.
-    for (; iter != itEnd; ++iter)
+    for (; iter != seqEnd - 1; ++iter)
     {
-        // Set the iterator to the next cell within the track.
         _goNextCell(dpScoreMatrixNavigator, TColumnDescriptor(), InnerCell());
         _goNextCell(dpTraceMatrixNavigator, TColumnDescriptor(), InnerCell());
+
+        _incVerticalPos(scout);
         // Compute the inner cell.
-        // If we have variable length simd, we need to check if we reached the end of one of the sequences.
-        // For all other cases, the function returns always false.
         if (SEQAN_UNLIKELY(_reachedVerticalEndPoint(scout, iter)))
         {
-            _computeCell(scout, dpTraceMatrixNavigator, value(dpScoreMatrixNavigator),
-                         previousCellDiagonal(dpScoreMatrixNavigator), previousCellHorizontal(dpScoreMatrixNavigator),
-                         previousCellVertical(dpScoreMatrixNavigator), tmpSeqH,
-                         sequenceEntryForScore(scoringScheme, container(iter), position(iter)), scoringScheme,
-                         TColumnDescriptor(), LastCell(), TDPProfile());
+            _computeCell(scout,
+                         dpTraceMatrixNavigator,
+                         value(dpScoreMatrixNavigator),
+                         cacheDiag,
+                         previousCellHorizontal(dpScoreMatrixNavigator),
+                         cacheVert,
+                         tmpSeqH, sequenceEntryForScore(scoringScheme, container(iter), position(iter)),
+                         scoringScheme, TColumnDescriptor(), LastCell(), TDPProfile());
             _nextVerticalEndPos(scout);
         }
         else
         {
-            _computeCell(scout, dpTraceMatrixNavigator, value(dpScoreMatrixNavigator),
-                         previousCellDiagonal(dpScoreMatrixNavigator), previousCellHorizontal(dpScoreMatrixNavigator),
-                         previousCellVertical(dpScoreMatrixNavigator), tmpSeqH,
-                         sequenceEntryForScore(scoringScheme, container(iter), position(iter)), scoringScheme,
-                         TColumnDescriptor(), InnerCell(), TDPProfile());
+            _computeCell(scout,
+                         dpTraceMatrixNavigator,
+                         value(dpScoreMatrixNavigator),
+                         cacheDiag,
+                         previousCellHorizontal(dpScoreMatrixNavigator),
+                         cacheVert,
+                         tmpSeqH, sequenceEntryForScore(scoringScheme, container(iter), position(iter)),
+                         scoringScheme, TColumnDescriptor(), InnerCell(), TDPProfile());
         }
-        _incVerticalPos(scout);
     }
-    // Set the iterator to the last cell of the track.
     _goNextCell(dpScoreMatrixNavigator, TColumnDescriptor(), LastCell());
     _goNextCell(dpTraceMatrixNavigator, TColumnDescriptor(), LastCell());
-    // Compute the last cell.
-    _computeCell(scout, dpTraceMatrixNavigator, value(dpScoreMatrixNavigator),
-                 previousCellDiagonal(dpScoreMatrixNavigator), previousCellHorizontal(dpScoreMatrixNavigator),
-                 previousCellVertical(dpScoreMatrixNavigator), tmpSeqH,
-                 sequenceEntryForScore(scoringScheme, container(iter), position(iter)), scoringScheme,
+    _incVerticalPos(scout);
+    _computeCell(scout,
+                 dpTraceMatrixNavigator,
+                 value(dpScoreMatrixNavigator),
+                           cacheDiag,
+                           previousCellHorizontal(dpScoreMatrixNavigator),
+                           cacheVert,
+                 tmpSeqH,
+                 sequenceEntryForScore(scoringScheme, container(iter), position(iter)),
+                 scoringScheme,
                  TColumnDescriptor(), LastCell(), TDPProfile());
 }
 
+template <typename TDPScout,
+          typename TDPScoreMatrixNavigator,
+          typename TDPTraceMatrixNavigator,
+          typename TSeqHValue,
+          typename TSeqVValue,
+          typename TSeqVIterator,
+          typename TScoringScheme,
+          typename TColumnDescriptor,
+          typename TDPProfile>
+inline void
+_computeTrack(TDPScout & scout,
+              TDPScoreMatrixNavigator & dpScoreMatrixNavigator,
+              TDPTraceMatrixNavigator & dpTraceMatrixNavigator,
+              TSeqHValue const & seqHValue,
+              TSeqVValue const & seqVValue,
+              TSeqVIterator const & seqBegin,
+              TSeqVIterator const & seqEnd,
+              TScoringScheme const & scoringScheme,
+              TColumnDescriptor const &,
+              TDPProfile const &)
+{
+    using TDPCell = std::decay_t<decltype(value(dpScoreMatrixNavigator))>;
+
+    TDPCell cacheDiag;
+    TDPCell cacheVert;
+    _computeTrack(scout, dpScoreMatrixNavigator, dpTraceMatrixNavigator, seqHValue, seqVValue, seqBegin, seqEnd,
+                  scoringScheme, cacheDiag, cacheVert, TColumnDescriptor{}, TDPProfile{});
+}
+
 // ----------------------------------------------------------------------------
 // Function _computeUnbandedAlignmentHelperTerminate()
 // ----------------------------------------------------------------------------
@@ -418,16 +477,24 @@ _computeAlignmentHelperCheckTerminate(DPScout_<TDPCell,Terminator_<TSpec> > cons
 // ----------------------------------------------------------------------------
 
 // Computes the standard DP-algorithm.
-template <typename TDPScout, typename TDPScoreMatrixNavigator, typename TDPTraceMatrixNavigator, typename TSequenceH,
-          typename TSequenceV, typename TScoringScheme, typename TAlignmentAlgo, typename TGapCosts, typename TTraceFlag>
+template <typename TDPScout,
+          typename TDPScoreMatrixNavigator,
+          typename TDPTraceMatrixNavigator,
+          typename TSequenceH,
+          typename TSequenceV,
+          typename TScoringScheme,
+          typename TBand,
+          typename TAlignmentAlgo, typename TGapCosts, typename TTraceFlag, typename TExecPolicy>
 inline void
-_computeUnbandedAlignment(TDPScout & scout,
-                          TDPScoreMatrixNavigator & dpScoreMatrixNavigator,
-                          TDPTraceMatrixNavigator & dpTraceMatrixNavigator,
-                          TSequenceH const & seqH,
-                          TSequenceV const & seqV,
-                          TScoringScheme const & scoringScheme,
-                          DPProfile_<TAlignmentAlgo, TGapCosts, TTraceFlag> const & dpProfile)
+_computeAlignmentImpl(TDPScout & scout,
+                      TDPScoreMatrixNavigator & dpScoreMatrixNavigator,
+                      TDPTraceMatrixNavigator & dpTraceMatrixNavigator,
+                      TSequenceH const & seqH,
+                      TSequenceV const & seqV,
+                      TScoringScheme const & scoringScheme,
+                      TBand const & /*band*/,
+                      DPProfile_<TAlignmentAlgo, TGapCosts, TTraceFlag, TExecPolicy> const & dpProfile,
+                      NavigateColumnWise const & /*tag*/)
 {
     typedef typename Iterator<TSequenceH const, Rooted>::Type TConstSeqHIterator;
     typedef typename Iterator<TSequenceV const, Rooted>::Type TConstSeqVIterator;
@@ -444,6 +511,7 @@ _computeUnbandedAlignment(TDPScout & scout,
 
     SEQAN_ASSERT_GT(length(seqH), 0u);
     SEQAN_ASSERT_GT(length(seqV), 0u);
+
     _computeTrack(scout, dpScoreMatrixNavigator, dpTraceMatrixNavigator,
                   sequenceEntryForScore(scoringScheme, seqH, 0),
                   sequenceEntryForScore(scoringScheme, seqV, 0),
@@ -458,6 +526,7 @@ _computeUnbandedAlignment(TDPScout & scout,
     TConstSeqHIterator seqHIterEnd = end(seqH, Rooted()) - 1;
     for (; seqHIter != seqHIterEnd; ++seqHIter)
     {
+        _incHorizontalPos(scout);
         // We might only select it if SIMD version is available.
         if (SEQAN_UNLIKELY(_reachedHorizontalEndPoint(scout, seqHIter)))
         {
@@ -480,13 +549,13 @@ _computeUnbandedAlignment(TDPScout & scout,
         {
             return;
         }
-        _incHorizontalPos(scout);
     }
 
     // ============================================================================
     // POSTPROCESSING
     // ============================================================================
 
+    _incHorizontalPos(scout);
     _computeTrack(scout, dpScoreMatrixNavigator, dpTraceMatrixNavigator,
                   sequenceEntryForScore(scoringScheme, seqH, position(seqHIter)),
                   sequenceEntryForScore(scoringScheme, seqV, 0),
@@ -504,22 +573,28 @@ _computeUnbandedAlignment(TDPScout & scout,
 }
 
 // ----------------------------------------------------------------------------
-// Function _computeBandedAlignment()
+// Function _computeAlignment() banded
 // ----------------------------------------------------------------------------
 
 // Computes the banded DP-algorithm.
-template <typename TDPScout, typename TDPScoreMatrixNavigator, typename TDPTraceMatrixNavigator, typename TSequenceH,
-          typename TSequenceV, typename TScoringScheme, typename TBand, typename TAlignmentAlgo, typename TGapCosts,
-          typename TTraceFlag>
+template <typename TDPScout,
+          typename TDPScoreMatrixNavigator,
+          typename TDPTraceMatrixNavigator,
+          typename TSequenceH,
+          typename TSequenceV,
+          typename TScoringScheme,
+          typename TBand,
+          typename TAlignmentAlgo, typename TGapCosts, typename TTraceFlag, typename TExecPolicy>
 inline void
-_computeBandedAlignment(TDPScout & scout,
-                        TDPScoreMatrixNavigator & dpScoreMatrixNavigator,
-                        TDPTraceMatrixNavigator & dpTraceMatrixNavigator,
-                        TSequenceH const & seqH,
-                        TSequenceV const & seqV,
-                        TScoringScheme const & scoringScheme,
-                        TBand const & band,
-                        DPProfile_<TAlignmentAlgo, TGapCosts, TTraceFlag> const & dpProfile)
+_computeAlignmentImpl(TDPScout & scout,
+                      TDPScoreMatrixNavigator & dpScoreMatrixNavigator,
+                      TDPTraceMatrixNavigator & dpTraceMatrixNavigator,
+                      TSequenceH const & seqH,
+                      TSequenceV const & seqV,
+                      TScoringScheme const & scoringScheme,
+                      TBand const & band,
+                      DPProfile_<TAlignmentAlgo, TGapCosts, TTraceFlag, TExecPolicy> const & dpProfile,
+                      NavigateColumnWiseBanded const & /*tag*/)
 {
     typedef DPProfile_<TAlignmentAlgo, TGapCosts, TTraceFlag> TDPProfile;
     typedef typename MakeSigned<typename Size<TSequenceH>::Type>::Type TSignedSizeSeqH;
@@ -527,7 +602,17 @@ _computeBandedAlignment(TDPScout & scout,
     typedef typename Iterator<TSequenceH const, Rooted>::Type TConstSeqHIterator;
     typedef typename Iterator<TSequenceV const, Rooted>::Type TConstSeqVIterator;
 
+    using TDPScoreValue = std::decay_t<decltype(value(dpScoreMatrixNavigator))>;
+    // Caching these cells improves performance significantly.
+    TDPScoreValue cacheDiag;
+    TDPScoreValue cacheVert;
 
+    if (upperDiagonal(band) == lowerDiagonal(band))
+    {
+        _computeHammingDistance(scout, dpScoreMatrixNavigator, dpTraceMatrixNavigator, seqH, seqV, scoringScheme, band,
+                                dpProfile);
+        return;
+    }
     // Now we have the problem of not knowing when we are in the last cell.
 
     // ============================================================================
@@ -569,8 +654,7 @@ _computeBandedAlignment(TDPScout & scout,
         _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnTop>(), FirstCell());
         // Only one cell
         _computeCell(scout, dpTraceMatrixNavigator, value(dpScoreMatrixNavigator),
-                     previousCellDiagonal(dpScoreMatrixNavigator), previousCellHorizontal(dpScoreMatrixNavigator),
-                     previousCellVertical(dpScoreMatrixNavigator),
+                     cacheDiag, previousCellHorizontal(dpScoreMatrixNavigator), cacheVert,
                      sequenceEntryForScore(scoringScheme, seqH, position(seqHIterBegin)),
                      sequenceEntryForScore(scoringScheme, seqV, 0), scoringScheme,
                      MetaColumnDescriptor<DPInitialColumn, PartialColumnTop>(), FirstCell(), TDPProfile());
@@ -586,8 +670,7 @@ _computeBandedAlignment(TDPScout & scout,
         _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnBottom>(), FirstCell());
         // Only one cell
         _computeCell(scout, dpTraceMatrixNavigator, value(dpScoreMatrixNavigator),
-                     previousCellDiagonal(dpScoreMatrixNavigator), previousCellHorizontal(dpScoreMatrixNavigator),
-                     previousCellVertical(dpScoreMatrixNavigator),
+                     cacheDiag, previousCellHorizontal(dpScoreMatrixNavigator), cacheVert,
                      sequenceEntryForScore(scoringScheme, seqH, 0),
                      sequenceEntryForScore(scoringScheme, seqV, position(seqVBegin)), scoringScheme,
                      MetaColumnDescriptor<DPInitialColumn, PartialColumnBottom>(), FirstCell(), TDPProfile());
@@ -618,10 +701,10 @@ _computeBandedAlignment(TDPScout & scout,
         // Set the iterator to the begin of the track.
         _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnTop>(), FirstCell());
         _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnTop>(), FirstCell());
+        //TODO(rrahn): We possibly need to set the cache values here?
         // Should we not just compute the cell?
         _computeCell(scout, dpTraceMatrixNavigator, value(dpScoreMatrixNavigator),
-                     previousCellDiagonal(dpScoreMatrixNavigator), previousCellHorizontal(dpScoreMatrixNavigator),
-                     previousCellVertical(dpScoreMatrixNavigator),
+                     cacheDiag, previousCellHorizontal(dpScoreMatrixNavigator), cacheVert,
                      sequenceEntryForScore(scoringScheme, seqH, position(seqHIterBegin)),
                      sequenceEntryForScore(scoringScheme, seqV, 0),
                      scoringScheme,
@@ -631,19 +714,24 @@ _computeBandedAlignment(TDPScout & scout,
             _scoutBestScore(scout, value(dpScoreMatrixNavigator), dpTraceMatrixNavigator, False(), False());
     }
     else  // Upper diagonal >= 0 and lower Diagonal < 0
-    if (lowerDiagonal(band) <= -seqVlength)      // The band is bounded by the top and bottom of the matrix.
-        _computeTrack(scout, dpScoreMatrixNavigator, dpTraceMatrixNavigator,
-                      sequenceEntryForScore(scoringScheme, seqH, 0),
-                      sequenceEntryForScore(scoringScheme, seqV, 0),
-                      seqVBegin, seqVEnd, scoringScheme,
-                      MetaColumnDescriptor<DPInitialColumn, FullColumn>(), dpProfile);
-    else       // The band is bounded by the top but not the bottom of the matrix.
-        _computeTrack(scout, dpScoreMatrixNavigator, dpTraceMatrixNavigator,
-                      sequenceEntryForScore(scoringScheme, seqH, 0),
-                      sequenceEntryForScore(scoringScheme, seqV, 0),
-                      seqVBegin, seqVEnd, scoringScheme,
-                      MetaColumnDescriptor<DPInitialColumn, PartialColumnTop>(), dpProfile);
-
+    {
+        if (lowerDiagonal(band) <= -seqVlength)      // The band is bounded by the top and bottom of the matrix.
+        {
+            _computeTrack(scout, dpScoreMatrixNavigator, dpTraceMatrixNavigator,
+                          sequenceEntryForScore(scoringScheme, seqH, 0),
+                          sequenceEntryForScore(scoringScheme, seqV, 0),
+                          seqVBegin, seqVEnd, scoringScheme,
+                          MetaColumnDescriptor<DPInitialColumn, FullColumn>(), dpProfile);
+        }
+        else       // The band is bounded by the top but not the bottom of the matrix.
+        {
+            _computeTrack(scout, dpScoreMatrixNavigator, dpTraceMatrixNavigator,
+                          sequenceEntryForScore(scoringScheme, seqH, 0),
+                          sequenceEntryForScore(scoringScheme, seqV, 0),
+                          seqVBegin, seqVEnd, scoringScheme,
+                          MetaColumnDescriptor<DPInitialColumn, PartialColumnTop>(), dpProfile);
+        }
+    }
     if (_computeAlignmentHelperCheckTerminate(scout))
     {
             return;
@@ -743,16 +831,20 @@ _computeBandedAlignment(TDPScout & scout,
         _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, PartialColumnBottom>(), FirstCell());
         _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, PartialColumnBottom>(), FirstCell());
 
+        _preInitCacheDiagonal(cacheDiag, dpScoreMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, PartialColumnBottom>());
+
         _computeCell(scout, dpTraceMatrixNavigator, value(dpScoreMatrixNavigator),
-                     previousCellDiagonal(dpScoreMatrixNavigator), previousCellHorizontal(dpScoreMatrixNavigator),
-                     previousCellVertical(dpScoreMatrixNavigator),
+                     cacheDiag, previousCellHorizontal(dpScoreMatrixNavigator), cacheVert,
                      sequenceEntryForScore(scoringScheme, seqH, position(seqHIter)),
                      sequenceEntryForScore(scoringScheme, seqV, position(seqVBegin)),
                      scoringScheme,
                      MetaColumnDescriptor<DPInnerColumn, PartialColumnBottom>(), FirstCell(), TDPProfile());
         // We might need to additionally track this point.
         if (TrackingEnabled_<DPMetaColumn_<TDPProfile, MetaColumnDescriptor<DPInnerColumn, PartialColumnBottom> >, LastCell>::VALUE)
+        {
+            _setVerticalScoreOfCell(value(dpScoreMatrixNavigator), _verticalScoreOfCell(cacheVert));
             _scoutBestScore(scout, value(dpScoreMatrixNavigator), dpTraceMatrixNavigator, False(), True());
+        }
     }
     else if (seqHIter == end(seqH, Rooted()) - 1) // Case 2: The band ends somewhere in the final column of the matrix.
     {
@@ -763,16 +855,20 @@ _computeBandedAlignment(TDPScout & scout,
             _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, PartialColumnBottom>(), FirstCell());
             _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, PartialColumnBottom>(), FirstCell());
 
+            _preInitCacheDiagonal(cacheDiag, dpScoreMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, PartialColumnBottom>());
+
             _computeCell(scout, dpTraceMatrixNavigator, value(dpScoreMatrixNavigator),
-                         previousCellDiagonal(dpScoreMatrixNavigator), previousCellHorizontal(dpScoreMatrixNavigator),
-                         previousCellVertical(dpScoreMatrixNavigator),
+                         cacheDiag, previousCellHorizontal(dpScoreMatrixNavigator), cacheVert,
                          sequenceEntryForScore(scoringScheme, seqH, position(seqHIter)),
                          sequenceEntryForScore(scoringScheme, seqV, position(seqVBegin)),
                          scoringScheme,
                          MetaColumnDescriptor<DPFinalColumn, PartialColumnBottom>(), FirstCell(), TDPProfile());
             // we might need to additionally track this point.
             if (TrackingEnabled_<DPMetaColumn_<TDPProfile, MetaColumnDescriptor<DPFinalColumn, PartialColumnBottom> >, LastCell>::VALUE)
+            {
+                _setVerticalScoreOfCell(value(dpScoreMatrixNavigator), _verticalScoreOfCell(cacheVert));
                 _scoutBestScore(scout, value(dpScoreMatrixNavigator), dpTraceMatrixNavigator, True(), True());
+            }
         }
         else  // Case2b: At least two cells intersect between the band and the matrix in the final column of the matrix.
         {
@@ -795,10 +891,13 @@ _computeBandedAlignment(TDPScout & scout,
                         _computeTrack(scout, dpScoreMatrixNavigator, dpTraceMatrixNavigator,
                                       sequenceEntryForScore(scoringScheme, seqH, position(seqHIter)),
                                       sequenceEntryForScore(scoringScheme, seqV, 0),
-                                      seqVBegin, seqVEnd, scoringScheme,
+                                      seqVBegin, seqVEnd, scoringScheme, cacheDiag, cacheVert,
                                       MetaColumnDescriptor<DPFinalColumn, PartialColumnTop>(), dpProfile);
                         if (TrackingEnabled_<DPMetaColumn_<TDPProfile, MetaColumnDescriptor<DPFinalColumn, FullColumn> >, LastCell>::VALUE)
+                        {
+                            _setVerticalScoreOfCell(value(dpScoreMatrixNavigator), _verticalScoreOfCell(cacheVert));
                             _scoutBestScore(scout, value(dpScoreMatrixNavigator), dpTraceMatrixNavigator, True(), True());
+                        }
                     }
                     else
                         _computeTrack(scout, dpScoreMatrixNavigator, dpTraceMatrixNavigator,
@@ -820,10 +919,13 @@ _computeBandedAlignment(TDPScout & scout,
                         _computeTrack(scout, dpScoreMatrixNavigator, dpTraceMatrixNavigator,
                                       sequenceEntryForScore(scoringScheme, seqH, position(seqHIter)),
                                       sequenceEntryForScore(scoringScheme, seqV, position(seqVBegin) - 1),
-                                      seqVBegin, seqVEnd, scoringScheme,
+                                      seqVBegin, seqVEnd, scoringScheme, cacheDiag, cacheVert,
                                       MetaColumnDescriptor<DPFinalColumn, PartialColumnMiddle>(), dpProfile);
                         if (TrackingEnabled_<DPMetaColumn_<TDPProfile, MetaColumnDescriptor<DPFinalColumn, PartialColumnBottom> >, LastCell>::VALUE)
+                        {
+                            _setVerticalScoreOfCell(value(dpScoreMatrixNavigator), _verticalScoreOfCell(cacheVert));
                             _scoutBestScore(scout, value(dpScoreMatrixNavigator), dpTraceMatrixNavigator, True(), True());
+                        }
                     }
                     else
                     {
@@ -843,334 +945,24 @@ _computeBandedAlignment(TDPScout & scout,
                                   seqVBegin, seqVEnd, scoringScheme,
                                   MetaColumnDescriptor<DPFinalColumn, PartialColumnMiddle>(), dpProfile);
                 }
-
             }
         }
     }
 }
 
-// TODO(rmaerker): This is denbug code only.
-//template <typename TDPScout, typename TDPScoreMatrixNavigator, typename TDPTraceMatrixNavigator, typename TSequenceH,
-//    typename TSequenceV, typename TScoringScheme, typename TBand, typename TAlignmentAlgo, typename TGapCosts,
-//    typename TTraceFlag>
-//inline void
-//_debugBandedAlignment(TDPScout & scout,
-//                        TDPScoreMatrixNavigator & dpScoreMatrixNavigator,
-//                        TDPTraceMatrixNavigator & dpTraceMatrixNavigator,
-//                        TSequenceH const & seqH,
-//                        TSequenceV const & seqV,
-//                        TScoringScheme const & scoringScheme,
-//                        TBand const & band,
-//                        DPProfile_<TAlignmentAlgo, TGapCosts, TTraceFlag> const & dpProfile)
-//{
-//    typedef DPProfile_<TAlignmentAlgo, TGapCosts, TTraceFlag> TDPProfile;
-//    typedef typename Value<TSequenceH>::Type TSeqHValue;
-//    typedef typename Value<TSequenceV>::Type TSeqVValue;
-//    typedef typename Iterator<TSequenceH const, Standard>::Type TConstSeqHIterator;
-//    typedef typename Iterator<TSequenceV const, Standard>::Type TConstSeqVIterator;
-//
-//
-//    String<std::string> testMatrix;
-//    resize(testMatrix, (length(seqH) + 1) * (length(seqV)+1));
-//    // Now we have the problem of not knowing when we are in the last cell.
-//
-//    // INITIALIZATION
-//    TConstSeqVIterator seqVBegin = begin(seqV, Standard()) - _min(0, 1+upperDiagonal(band));
-//    TConstSeqVIterator seqVEnd = begin(seqV, Standard()) - _min(0, _max(-static_cast<int>(length(seqV)), lowerDiagonal(band)));
-//
-////    std::cout << "Begin Pos: " << seqVBegin - begin(seqV) << "\n";
-////    std::cout << "End Pos: " << seqVEnd - begin(seqV) << "\n";
-//
-//    // We have to distinguish two band sizes. Some which spans the whole matrix in between and thus who not.
-//    // This can be distinguished, if UpperDiagonal > length(seqV) + LowerDiagonal
-//
-//    // We start at the least at the first sequence or wherever the lower diagonal begins first.
-//    TConstSeqHIterator seqHIterBegin = begin(seqH, Standard()) + _max(0, _min(static_cast<int>(length(seqH) - 1), lowerDiagonal(band)));
-//    // TODO(rmaerker): Cehck if this assertion is correct.
-////    SEQAN_ASSERT_NEQ(seqHIterBegin, end(seqH, Standard()));  // The iterator never points to the end of the horizontal sequence.
-//
-//    // The horizontal initial phase ends after the upper diagonal but at most after the horizontal sequence, or there is no horizontal initialization phase.
-//    TConstSeqHIterator seqHIterEndColumnTop = begin(seqH, Standard()) + _min(static_cast<int>(length(seqH))-1, _max(0, upperDiagonal(band)));
-//
-//    // The middle band phase ends after the lower diagonal crosses the bottom of the alignment matrix or after the horizontal sequence if it is smaller.
-//    TConstSeqHIterator seqHIterEndColumnMiddle = begin(seqH, Standard()) + _min(static_cast<int>(length(seqH))-1, _max(0,static_cast<int>(length(seqV)) + lowerDiagonal(band)));
-//    // Swap the two iterators if we are in a band that spans over the full column.
-//    if (upperDiagonal(band) > static_cast<int>(length(seqV)) + lowerDiagonal(band))
-//        std::swap(seqHIterEndColumnTop, seqHIterEndColumnMiddle);
-//
-//    // The bottom band phase ends after the upper diagonal of the band crosses the bottom of the matrix or after the horizontal sequence if it is smaller.
-//    TConstSeqHIterator seqHIterEndColumnBottom = begin(seqH, Standard()) + _max(0, _min(static_cast<int>(length(seqH)),
-//                                                 upperDiagonal(band) + static_cast<int>(length(seqV))) -1);
-//
-////    std::cout << "seqHIterBegin Pos H: " << seqHIterBegin - begin(seqH) << "\n";
-////    std::cout << "seqHIterEndColumnTop Pos H: " << seqHIterEndColumnTop - begin(seqH) << "\n";
-////    std::cout << "seqHIterEndColumnMiddle Pos H: " << seqHIterEndColumnMiddle - begin(seqH) << "\n";
-////    std::cout << "seqHIterEndColumnBottom Pos H: " << seqHIterEndColumnBottom - begin(seqH) << "\n";
-////
-////    std::cout << "_activeColIterator Pos: " << dpScoreMatrixNavigator._activeColIterator - begin(*dpScoreMatrixNavigator._ptrDataContainer) << "\n";
-////    std::cout << "_prevColIterator Pos: " << dpScoreMatrixNavigator._prevColIterator - begin(*dpScoreMatrixNavigator._ptrDataContainer) << "\n";
-//
-//    // The Initial column can be PartialColumnTop which is given if the upper diagonal is >= 0,
-//    // otherwise it only can be PartialColumnMiddle or PartialColumnBottom depending where the lower diagonal is.
-//
-//    // Have to check for single initialization cells in InitialColumn and FinalColumn.
-//    if (seqHIterBegin == end(seqH)-1)
-//    {
-//        // Set the iterator to the begin of the track.
-//        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnTop>(), FirstCell());
-//        _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnTop>(), FirstCell());
-//        // Only one cell
-//        _computeCell(scout, dpTraceMatrixNavigator, value(dpScoreMatrixNavigator),
-//                previousCellDiagonal(dpScoreMatrixNavigator), previousCellHorizontal(dpScoreMatrixNavigator),
-//                previousCellVertical(dpScoreMatrixNavigator), value(seqHIterBegin), TSeqVValue(), scoringScheme,
-//                MetaColumnDescriptor<DPInitialColumn, PartialColumnTop>(), FirstCell(), TDPProfile());
-////      std::cout << _scoreOfCell(value(dpScoreMatrixNavigator)) << "\n";
-//      std::stringstream stream;
-//      stream << _scoreOfCell(value(dpScoreMatrixNavigator));
-//      testMatrix[length(seqH) * length(seqV)] = stream.str();
-//        // we might need to additionally track this point.
-//        if (TrackingEnabled_<DPMetaColumn_<TDPProfile, MetaColumnDescriptor<DPFinalColumn, PartialColumnTop> >, FirstCell>::VALUE)
-//            _scoutBestScore(scout, _scoreOfCell(value(dpScoreMatrixNavigator)), dpTraceMatrixNavigator);
-//        return;
-//    }
-//    if (seqHIterEndColumnBottom == begin(seqH))
-//    {
-//        // Set the iterator to the begin of the track.
-//        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnBottom>(), FirstCell());
-//        _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnBottom>(), FirstCell());
-//        // Only one cell
-//        _computeCell(scout, dpTraceMatrixNavigator, value(dpScoreMatrixNavigator),
-//                previousCellDiagonal(dpScoreMatrixNavigator), previousCellHorizontal(dpScoreMatrixNavigator),
-//                previousCellVertical(dpScoreMatrixNavigator), TSeqHValue(), value(seqVBegin), scoringScheme,
-//                MetaColumnDescriptor<DPInitialColumn, PartialColumnBottom>(), FirstCell(), TDPProfile());
-////      std::cout << _scoreOfCell(value(dpScoreMatrixNavigator)) << "\n";
-//      std::stringstream stream;
-//      stream << _scoreOfCell(value(dpScoreMatrixNavigator));
-//      testMatrix[length(seqH) * length(seqV)] = stream.str();
-//        // We might need to additionally track this point.
-//        if (TrackingEnabled_<DPMetaColumn_<TDPProfile, MetaColumnDescriptor<DPInitialColumn, PartialColumnBottom> >, LastCell>::VALUE)
-//            _scoutBestScore(scout, _scoreOfCell(value(dpScoreMatrixNavigator)), dpTraceMatrixNavigator);
-//        return;
-//    }
-//
-//    if (upperDiagonal(band) < 0)
-//    {
-//        ++seqVBegin;
-//        if (lowerDiagonal(band) > -static_cast<int>(length(seqV)))
-//          _computeTrack(scout, dpScoreMatrixNavigator, dpTraceMatrixNavigator,
-//                  TSeqHValue(), value(seqVBegin-1), seqVBegin, seqVEnd, scoringScheme,
-//                  MetaColumnDescriptor<DPInitialColumn, PartialColumnMiddle>(), dpProfile, 0, seqVBegin - begin(seqV) + 1, testMatrix);
-//        else
-//          _computeTrack(scout, dpScoreMatrixNavigator, dpTraceMatrixNavigator,
-//                  TSeqHValue(), value(seqVBegin-1), seqVBegin, seqVEnd, scoringScheme,
-//                  MetaColumnDescriptor<DPInitialColumn, PartialColumnBottom>(), dpProfile, 0, seqVBegin - begin(seqV) + 1, testMatrix);
-//    }
-//    else if (lowerDiagonal(band) >= 0)
-//    {
-//        // Set the iterator to the begin of the track.
-//        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnTop>(), FirstCell());
-//        _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnTop>(), FirstCell());
-//        // Should we not just compute the cell?
-//        _computeCell(scout, dpTraceMatrixNavigator, value(dpScoreMatrixNavigator),
-//                previousCellDiagonal(dpScoreMatrixNavigator), previousCellHorizontal(dpScoreMatrixNavigator),
-//                previousCellVertical(dpScoreMatrixNavigator), value(seqHIterBegin), TSeqVValue(), scoringScheme,
-//                MetaColumnDescriptor<DPInitialColumn, PartialColumnTop>(), FirstCell(), TDPProfile());
-//        // we might need to additionally track this point.
-////      std::cout << _scoreOfCell(value(dpScoreMatrixNavigator)) << "\n";
-//      int col = lowerDiagonal(band);
-//      std::stringstream stream;
-//      stream << _scoreOfCell(value(dpScoreMatrixNavigator));
-//      testMatrix[col * (length(seqV) + 1)] = stream.str();
-//        if (TrackingEnabled_<DPMetaColumn_<TDPProfile, MetaColumnDescriptor<DPInnerColumn, PartialColumnTop> >, FirstCell>::VALUE)
-//            _scoutBestScore(scout, _scoreOfCell(value(dpScoreMatrixNavigator)), dpTraceMatrixNavigator);
-//    }
-//    else  // Upper diagonal >= 0 and lower Diagonal < 0
-//        if (lowerDiagonal(band) <= -static_cast<int>(length(seqV)))  // The band is bounded by the top and bottom of the matrix.
-//          _computeTrack(scout, dpScoreMatrixNavigator, dpTraceMatrixNavigator,
-//                  TSeqHValue(), TSeqVValue(), seqVBegin, seqVEnd, scoringScheme,
-//                  MetaColumnDescriptor<DPInitialColumn, FullColumn>(), dpProfile, 0, 0, testMatrix);
-//        else   // The band is bounded by the top but not the bottom of the matrix.
-//          _computeTrack(scout, dpScoreMatrixNavigator, dpTraceMatrixNavigator,
-//                  TSeqHValue(), TSeqVValue(), seqVBegin, seqVEnd, scoringScheme,
-//                  MetaColumnDescriptor<DPInitialColumn, PartialColumnTop>(), dpProfile, 0,0, testMatrix);
-//
-//
-//    // RECURSION
-//    TConstSeqHIterator seqHIter = seqHIterBegin;
-//    // Compute the first part of the band, where the band is bounded by the top but not by the bottom of the matrix.
-//    for (;seqHIter != seqHIterEndColumnTop; ++seqHIter)
-//    {
-////      std::cout << value(seqHIter) << ":\t";
-//        ++seqVEnd;
-//      _computeTrack(scout, dpScoreMatrixNavigator, dpTraceMatrixNavigator,
-//              value(seqHIter), TSeqVValue(), seqVBegin, seqVEnd, scoringScheme,
-//              MetaColumnDescriptor<DPInnerColumn, PartialColumnTop>(), dpProfile, ((seqHIter - begin(seqH)) + 1)*(length(seqV) +1), 0, testMatrix);
-//    }
-//
-//    // Check whether the band spans over the full column or not at some point.
-//    if (upperDiagonal(band) > static_cast<int>(length(seqV)) + lowerDiagonal(band))
-//    {
-//        // Compute the second part of the band, where the band is bounded by the top and the bottom of the matrix.
-//        // We might want to track the current cell here, since this is the first cell that crosses the bottom.
-//        // TODO(rmaerker): We have to check if the initial column/ row can be tracked!!!
-//        if (TrackingEnabled_<DPMetaColumn_<TDPProfile, MetaColumnDescriptor<DPInnerColumn, FullColumn> >, LastCell>::VALUE)
-//                _scoutBestScore(scout, _scoreOfCell(value(dpScoreMatrixNavigator)), dpTraceMatrixNavigator);
-//        for (;seqHIter != seqHIterEndColumnMiddle; ++seqHIter)
-//        {
-//          _computeTrack(scout, dpScoreMatrixNavigator, dpTraceMatrixNavigator,
-//                  value(seqHIter), TSeqVValue(), seqVBegin, seqVEnd, scoringScheme,
-//                  MetaColumnDescriptor<DPInnerColumn, FullColumn>(), dpProfile, (seqHIter - begin(seqH) + 1) * (length(seqV) + 1), 0, testMatrix);
-//        }
-//    }
-//    else // Compute the second part of the band, where the band is not bounded by the top and bottom of the matrix
-//    {
-//        for (;seqHIter != seqHIterEndColumnMiddle; ++seqHIter)
-//        {
-//            ++seqVBegin;
-//            ++seqVEnd;
-//          _computeTrack(scout, dpScoreMatrixNavigator, dpTraceMatrixNavigator,
-//                  value(seqHIter), value(seqVBegin-1), seqVBegin, seqVEnd, scoringScheme,
-//                  MetaColumnDescriptor<DPInnerColumn, PartialColumnMiddle>(), dpProfile, (seqHIter - begin(seqH) +1) * (length(seqV)+1), seqVBegin - begin(seqV), testMatrix);
-//        }   // We might want to track the current cell here, since this is the first cell that crosses the bottom.
-//        if (TrackingEnabled_<DPMetaColumn_<TDPProfile, MetaColumnDescriptor<DPInnerColumn, PartialColumnBottom> >, LastCell>::VALUE)
-//        {
-//            // TODO(rmaerker): This is only a hot fix.
-//            if (lowerDiagonal(band) + length(seqV) < length(seqH))
-//                _scoutBestScore(scout, _scoreOfCell(value(dpScoreMatrixNavigator)), dpTraceMatrixNavigator);
-//        }
-//    }
-//    // Compute the third part of the band, where the band, is bounded by the bottom but not by the top of the matrix.
-//    for (;seqHIter != seqHIterEndColumnBottom; ++seqHIter)
-//    {
-//        ++seqVBegin;
-//      _computeTrack(scout, dpScoreMatrixNavigator, dpTraceMatrixNavigator,
-//              value(seqHIter), value(seqVBegin-1), seqVBegin, seqVEnd, scoringScheme,
-//              MetaColumnDescriptor<DPInnerColumn, PartialColumnBottom>(), dpProfile, (seqHIter - begin(seqH) + 1) * (length(seqV) + 1), seqVBegin - begin(seqV), testMatrix);
-//    }
-//
-//    // Where ends the last cell?
-//    if(seqHIter - begin(seqH) < static_cast<int>(length(seqH))-1)  // Case 1: The band ends before the final column is reached.
-//    {
-//        // Set the iterator to the begin of the track.
-//        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, PartialColumnBottom>(), FirstCell());
-//        _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, PartialColumnBottom>(), FirstCell());
-//
-//        _computeCell(scout, dpTraceMatrixNavigator, value(dpScoreMatrixNavigator),
-//                previousCellDiagonal(dpScoreMatrixNavigator), previousCellHorizontal(dpScoreMatrixNavigator),
-//                previousCellVertical(dpScoreMatrixNavigator), value(seqHIter), value(seqVBegin), scoringScheme,
-//                MetaColumnDescriptor<DPInnerColumn, PartialColumnBottom>(), FirstCell(), TDPProfile());
-////      std::cout << _scoreOfCell(value(dpScoreMatrixNavigator)) << "\n";
-//      std::stringstream stream;
-//      stream << _scoreOfCell(value(dpScoreMatrixNavigator));
-//      testMatrix[(seqHIter - begin(seqH) + 1) * (length(seqV) + 1) + length(seqV)] = stream.str();
-//        // We might need to additionally track this point.
-//        if (TrackingEnabled_<DPMetaColumn_<TDPProfile, MetaColumnDescriptor<DPInnerColumn, PartialColumnBottom> >, LastCell>::VALUE)
-//            _scoutBestScore(scout, _scoreOfCell(value(dpScoreMatrixNavigator)), dpTraceMatrixNavigator);
-//    }
-//    else if(seqHIter == end(seqH)-1)  // Case 2: The band ends somewhere in the final column of the matrix.
-//    {
-//        if (upperDiagonal(band) == static_cast<int>(length(seqH))-static_cast<int>(length(seqV)))  // Case2a: The band ends in the last cell of the final column.  // He should be here....
-//        {
-//            // Set the iterator to the begin of the track.
-//            _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, PartialColumnBottom>(), FirstCell());
-//            _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, PartialColumnBottom>(), FirstCell());
-//
-//            _computeCell(scout, dpTraceMatrixNavigator, value(dpScoreMatrixNavigator),
-//                    previousCellDiagonal(dpScoreMatrixNavigator), previousCellHorizontal(dpScoreMatrixNavigator),
-//                    previousCellVertical(dpScoreMatrixNavigator), value(seqHIter), value(seqVBegin), scoringScheme,
-//                    MetaColumnDescriptor<DPFinalColumn, PartialColumnBottom>(), FirstCell(), TDPProfile());
-////          std::cout << _scoreOfCell(value(dpScoreMatrixNavigator)) << "\n";
-//          std::stringstream stream;
-//          stream << _scoreOfCell(value(dpScoreMatrixNavigator));
-//          testMatrix[(length(seqH) * (length(seqV) + 1)) + length(seqV)] = stream.str();
-//            // we might need to additionally track this point.
-//            if (TrackingEnabled_<DPMetaColumn_<TDPProfile, MetaColumnDescriptor<DPFinalColumn, PartialColumnBottom> >, LastCell>::VALUE)
-//                _scoutBestScore(scout, _scoreOfCell(value(dpScoreMatrixNavigator)), dpTraceMatrixNavigator);
-//        }
-//        else  // Case2b: At least two cells intersect between the band and the matrix in the final column of the matrix.
-//        {
-//            if (upperDiagonal(band) >= static_cast<int>(length(seqH)))  // The band is bounded by the top of the matrix only or by the top and the bottom.
-//            {
-//                if (lowerDiagonal(band) + static_cast<int>(length(seqV)) > static_cast<int>(length(seqH))) // The band is bounded by the top of the matrix
-//                {
-//                    ++seqVEnd;
-//                  _computeTrack(scout, dpScoreMatrixNavigator, dpTraceMatrixNavigator,
-//                          value(seqHIter), TSeqVValue(), seqVBegin, seqVEnd, scoringScheme,
-//                          MetaColumnDescriptor<DPFinalColumn, PartialColumnTop>(), dpProfile, length(seqH) * (length(seqV) + 1), 0, testMatrix);
-//                }
-//                else  // The band is bounded by the top and the bottom of the matrix.
-//                {
-//                    if (lowerDiagonal(band) + static_cast<int>(length(seqV)) + 1 > static_cast<int>(length(seqH)) )
-//                    {
-//                        ++seqVEnd;
-//                      _computeTrack(scout, dpScoreMatrixNavigator, dpTraceMatrixNavigator,
-//                              value(seqHIter), TSeqVValue(), seqVBegin, seqVEnd, scoringScheme,
-//                              MetaColumnDescriptor<DPFinalColumn, PartialColumnTop>(), dpProfile, length(seqH) * (length(seqV) + 1), 0, testMatrix);
-//                        if (TrackingEnabled_<DPMetaColumn_<TDPProfile, MetaColumnDescriptor<DPFinalColumn, FullColumn> >, LastCell>::VALUE)
-//                            _scoutBestScore(scout, _scoreOfCell(value(dpScoreMatrixNavigator)), dpTraceMatrixNavigator);
-//                    }
-//                    else
-//                      _computeTrack(scout, dpScoreMatrixNavigator, dpTraceMatrixNavigator,
-//                              value(seqHIter), TSeqVValue(), seqVBegin, seqVEnd, scoringScheme,
-//                              MetaColumnDescriptor<DPFinalColumn, FullColumn>(), dpProfile, length(seqH) * (length(seqV) +1), 0, testMatrix);
-//
-//                }
-//
-//            }
-//            else  // The band is bounded by bottom of matrix or completely unbounded.
-//            {
-//                ++seqVBegin;
-//                if (lowerDiagonal(band) + length(seqV) <= length(seqH)) // The band is bounded by the bottom of the matrix.
-//                {
-//                    if (lowerDiagonal(band) + length(seqV) == length(seqH))
-//                    {
-//                        ++seqVEnd;
-//                      _computeTrack(scout, dpScoreMatrixNavigator, dpTraceMatrixNavigator,
-//                          value(seqHIter), value(seqVBegin-1), seqVBegin, seqVEnd, scoringScheme,
-//                          MetaColumnDescriptor<DPFinalColumn, PartialColumnMiddle>(), dpProfile, length(seqH) * (length(seqV)+1), seqVBegin - begin(seqV), testMatrix);
-//                      if (TrackingEnabled_<DPMetaColumn_<TDPProfile, MetaColumnDescriptor<DPFinalColumn, PartialColumnBottom> >, LastCell>::VALUE)
-//                          _scoutBestScore(scout, _scoreOfCell(value(dpScoreMatrixNavigator)), dpTraceMatrixNavigator);
-//                    }
-//                    else
-//                    {
-//                      _computeTrack(scout, dpScoreMatrixNavigator, dpTraceMatrixNavigator,
-//                          value(seqHIter), value(seqVBegin-1), seqVBegin, seqVEnd, scoringScheme,
-//                          MetaColumnDescriptor<DPFinalColumn, PartialColumnBottom>(), dpProfile, length(seqH) * (length(seqV) + 1), seqVBegin - begin(seqV), testMatrix);
-//                    }
-//                }
-//                else  // The band is unbounded by the matrix.
-//                {
-//                    ++seqVEnd;
-//                  _computeTrack(scout, dpScoreMatrixNavigator, dpTraceMatrixNavigator,
-//                      value(seqHIter), value(seqVBegin-1), seqVBegin, seqVEnd, scoringScheme,
-//                      MetaColumnDescriptor<DPFinalColumn, PartialColumnMiddle>(), dpProfile, length(seqH) * (length(seqV)+1), seqVBegin - begin(seqV), testMatrix);
-//                }
-//
-//            }
-//        }
-//    }
-//
-//    for (unsigned i = 0; i <= length(seqV); ++i)
-//    {
-//      for (unsigned j = 0; j <= length(seqH); ++j)
-//      {
-//          unsigned pos = j * (length(seqV) + 1) + i;
-//          //if (!testMatrix[pos].empty())
-//              std::cout << testMatrix[pos] << "\t" << std::flush;
-//      }
-//      std::cout << std::endl;
-//    }
-//
-//}
-
 // ----------------------------------------------------------------------------
 // Function _computeHammingDistance()
 // ----------------------------------------------------------------------------
 
 // Computes the Hamming-Distance if the band-size is 1.
-template <typename TDPScout, typename TDPScoreMatrixNavigator, typename TDPTraceMatrixNavigator, typename TSequenceH,
-          typename TSequenceV, typename TScoringScheme, typename TBand, typename TAlignmentAlgo, typename TGapCosts,
-          typename TTraceFlag>
+template <typename TDPScout,
+          typename TDPScoreMatrixNavigator,
+          typename TDPTraceMatrixNavigator,
+          typename TSequenceH,
+          typename TSequenceV,
+          typename TScoringScheme,
+          typename TBand,
+          typename TAlignmentAlgo, typename TGapCosts, typename TTraceFlag, typename TExecPolicy>
 inline void
 _computeHammingDistance(TDPScout & scout,
                         TDPScoreMatrixNavigator & dpScoreMatrixNavigator,
@@ -1179,7 +971,7 @@ _computeHammingDistance(TDPScout & scout,
                         TSequenceV const & seqV,
                         TScoringScheme const & scoringScheme,
                         TBand const & band,
-                        DPProfile_<TAlignmentAlgo, TGapCosts, TTraceFlag> const &)
+                        DPProfile_<TAlignmentAlgo, TGapCosts, TTraceFlag, TExecPolicy> const &)
 {
     typedef typename MakeSigned<typename Size<TSequenceH const>::Type>::Type TSignedSizeSeqH;
     typedef typename MakeSigned<typename Size<TSequenceV const>::Type>::Type TSignedSizeSeqV;
@@ -1201,8 +993,9 @@ _computeHammingDistance(TDPScout & scout,
     TConstSeqVIterator itV = begin(seqV, Rooted()) + _max(0, _min(seqVlength - 1, -lowerDiagonal(band)));
     TConstSeqVIterator itVEnd = begin(seqV, Rooted()) + _min(seqVlength - 1, lowerDiagonal(band) + seqHlength);
 
+    TDPCell dummy;
     assignValue(dpTraceMatrixNavigator,
-                _computeScore(value(dpScoreMatrixNavigator), TDPCell(), TDPCell(), TDPCell(),
+                _computeScore(value(dpScoreMatrixNavigator), dummy, dummy, dummy,
                               sequenceEntryForScore(scoringScheme, seqH, position(itH)),
                               sequenceEntryForScore(scoringScheme, seqV, position(itV)),
                               scoringScheme, RecursionDirectionZero(), TDPProfile()));
@@ -1252,7 +1045,7 @@ _computeHammingDistance(TDPScout & scout,
         _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, FullColumn>(), FirstCell());
         _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, FullColumn>(), FirstCell());
         assignValue(dpTraceMatrixNavigator,
-                    _computeScore(value(dpScoreMatrixNavigator), prevDiagonal, TDPCell(), TDPCell(),
+                    _computeScore(value(dpScoreMatrixNavigator), prevDiagonal, dummy, dummy,
                                   sequenceEntryForScore(scoringScheme, seqH, position(itH)),
                                   sequenceEntryForScore(scoringScheme, seqV, position(itV)),
                                   scoringScheme, RecursionDirectionDiagonal(), TDPProfile()));
@@ -1271,7 +1064,7 @@ _computeHammingDistance(TDPScout & scout,
     _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, FullColumn>(), FirstCell());
 
     assignValue(dpTraceMatrixNavigator,
-                _computeScore(value(dpScoreMatrixNavigator), prevDiagonal, TDPCell(), TDPCell(),
+                _computeScore(value(dpScoreMatrixNavigator), prevDiagonal, dummy, dummy,
                               sequenceEntryForScore(scoringScheme, seqH, position(itH)),
                               sequenceEntryForScore(scoringScheme, seqV, position(itV)),
                               scoringScheme, RecursionDirectionDiagonal(), TDPProfile()));
@@ -1294,6 +1087,29 @@ _computeHammingDistance(TDPScout & scout,
 }
 
 // ----------------------------------------------------------------------------
+// Function _printScoreMatrix()
+// ----------------------------------------------------------------------------
+
+template <typename TTraceMatrix>
+void _printScoreMatrix(TTraceMatrix & scoreMatrix)
+{
+    typedef typename Size<TTraceMatrix>::Type TSize;
+    TSize dimH = length(scoreMatrix, +DPMatrixDimension_::HORIZONTAL);
+    TSize dimV = length(scoreMatrix, +DPMatrixDimension_::VERTICAL);
+
+    for (unsigned row = 0; row < dimV; ++row)
+    {
+        for (unsigned column = 0; column < dimH; ++column)
+            if (_scoreOfCell(value(scoreMatrix, row + column * dimV)) <= DPCellDefaultInfinity<DPCell_<int, LinearGaps>>::VALUE)
+                std::cout << "-∞\t";
+            else
+                std::cout << _scoreOfCell(value(scoreMatrix, row + column * dimV)) << "\t";
+        std::cout << std::endl;
+    }
+    std::cout << std::endl;
+}
+
+// ----------------------------------------------------------------------------
 // Function _printTracebackMatrix()
 // ----------------------------------------------------------------------------
 
@@ -1373,9 +1189,15 @@ inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TScoreValue> >, void)
 _correctTraceValue(TTraceNavigator & traceNavigator,
                    DPScout_<DPCell_<TScoreValue, AffineGaps>, TDPScoutSpec>  const & dpScout)
 {
-    _setToPosition(traceNavigator, maxHostPosition(dpScout));
-    TScoreValue cmpV = cmpEq(_verticalScoreOfCell(dpScout._maxScore), _scoreOfCell(dpScout._maxScore));
-    TScoreValue cmpH = cmpEq(_horizontalScoreOfCell(dpScout._maxScore), _scoreOfCell(dpScout._maxScore));
+    using TMaskType = typename SimdMaskVector<TScoreValue>::Type;
+    _setToPosition(traceNavigator, toGlobalPosition(traceNavigator,
+                                                    maxHostCoordinate(dpScout, +DPMatrixDimension_::HORIZONTAL),
+                                                    maxHostCoordinate(dpScout, +DPMatrixDimension_::VERTICAL)));
+    TMaskType flag = createVector<TMaskType>(0);
+    assignValue(flag, dpScout._simdLane, -1);
+    auto cmpV = cmpEq(_verticalScoreOfCell(dpScout._maxScore), _scoreOfCell(dpScout._maxScore)) & flag;
+    auto cmpH = cmpEq(_horizontalScoreOfCell(dpScout._maxScore), _scoreOfCell(dpScout._maxScore)) & flag;
+
     value(traceNavigator) = blend(value(traceNavigator),
                                   value(traceNavigator) & ~TraceBitMap_<TScoreValue>::DIAGONAL,
                                   cmpV | cmpH);
@@ -1410,9 +1232,13 @@ inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TScoreValue> >, void)
 _correctTraceValue(TTraceNavigator & traceNavigator,
                    DPScout_<DPCell_<TScoreValue, DynamicGaps>, TDPScoutSpec>  const & dpScout)
 {
+    using TMaskType = typename SimdMaskVector<TScoreValue>::Type;
+
     _setToPosition(traceNavigator, maxHostPosition(dpScout));
-    TScoreValue cmpV = isGapExtension(dpScout._maxScore, DynamicGapExtensionVertical());
-    TScoreValue cmpH = isGapExtension(dpScout._maxScore, DynamicGapExtensionHorizontal());
+    TMaskType flag = createVector<TMaskType>(0);
+    assignValue(flag, dpScout._simdLane, -1);
+    auto cmpV = isGapExtension(dpScout._maxScore, DynamicGapExtensionVertical()) & flag;
+    auto cmpH = isGapExtension(dpScout._maxScore, DynamicGapExtensionHorizontal()) & flag;
     value(traceNavigator) = blend(value(traceNavigator),
                                   value(traceNavigator) & ~TraceBitMap_<TScoreValue>::DIAGONAL,
                                   cmpV | cmpH);
@@ -1434,7 +1260,7 @@ template <typename TTraceTarget,
           typename TSeqH,
           typename TSeqV,
           typename TBandSwitch,
-          typename TAlignmentAlgorithm, typename TGapScheme, typename TTraceFlag>
+          typename TAlignmentAlgorithm, typename TGapScheme, typename TTraceFlag, typename TExecPolicy>
 inline SEQAN_FUNC_ENABLE_IF(Not<IsTracebackEnabled_<TTraceFlag> >, TScoreValue)
 _finishAlignment(TTraceTarget & /*traceSegments*/,
                  TTraceMatNavigator & /*dpTraceMatrixNavigator*/,
@@ -1442,7 +1268,7 @@ _finishAlignment(TTraceTarget & /*traceSegments*/,
                  TSeqH const & /*seqH*/,
                  TSeqV const & /*seqV*/,
                  DPBandConfig<TBandSwitch> const & /*band*/,
-                 DPProfile_<TAlignmentAlgorithm, TGapScheme, TTraceFlag> const & /*dpProfile*/)
+                 DPProfile_<TAlignmentAlgorithm, TGapScheme, TTraceFlag, TExecPolicy> const & /*dpProfile*/)
 {
     return maxScore(dpScout);
 }
@@ -1453,7 +1279,7 @@ template <typename TTraceTarget,
           typename TSeqH,
           typename TSeqV,
           typename TBandSwitch,
-          typename TAlignmentAlgorithm, typename TGapScheme, typename TTraceFlag>
+          typename TAlignmentAlgorithm, typename TGapScheme, typename TTraceFlag, typename TExecPolicy>
 inline SEQAN_FUNC_ENABLE_IF(And<Is<SimdVectorConcept<TScoreValue> >, IsTracebackEnabled_<TTraceFlag> >, TScoreValue)
 _finishAlignment(TTraceTarget & traceSegments,
                  TTraceMatNavigator & dpTraceMatrixNavigator,
@@ -1461,7 +1287,7 @@ _finishAlignment(TTraceTarget & traceSegments,
                  TSeqH const & seqH,
                  TSeqV const & seqV,
                  DPBandConfig<TBandSwitch> const & band,
-                 DPProfile_<TAlignmentAlgorithm, TGapScheme, TTraceFlag> const & dpProfile)
+                 DPProfile_<TAlignmentAlgorithm, TGapScheme, TTraceFlag, TExecPolicy> const & dpProfile)
 {
     typedef typename Size<TTraceTarget>::Type TSize;
 
@@ -1474,7 +1300,11 @@ _finishAlignment(TTraceTarget & traceSegments,
         {
             _correctTraceValue(dpTraceMatrixNavigator, scout);
         }
-        _computeTraceback(traceSegments[i], dpTraceMatrixNavigator, scout, _hostLengthH(scout, seqH),
+        _computeTraceback(traceSegments[i], dpTraceMatrixNavigator,
+                          toGlobalPosition(dpTraceMatrixNavigator,
+                                           maxHostCoordinate(scout, +DPMatrixDimension_::HORIZONTAL),
+                                           maxHostCoordinate(scout, +DPMatrixDimension_::VERTICAL)),
+                          _hostLengthH(scout, seqH),
                           _hostLengthV(scout, seqV), band, dpProfile);
     }
     return maxScore(scout);
@@ -1486,7 +1316,7 @@ template <typename TTraceTarget,
           typename TSeqH,
           typename TSeqV,
           typename TBandSwitch,
-          typename TAlignmentAlgorithm, typename TGapScheme, typename TTraceFlag>
+          typename TAlignmentAlgorithm, typename TGapScheme, typename TTraceFlag, typename TExecPolicy>
 inline SEQAN_FUNC_ENABLE_IF(And<Not<Is<SimdVectorConcept<TScoreValue> > >, IsTracebackEnabled_<TTraceFlag> >, TScoreValue)
 _finishAlignment(TTraceTarget & traceSegments,
                  TTraceMatNavigator & dpTraceMatrixNavigator,
@@ -1494,7 +1324,7 @@ _finishAlignment(TTraceTarget & traceSegments,
                  TSeqH const & seqH,
                  TSeqV const & seqV,
                  DPBandConfig<TBandSwitch> const & band,
-                 DPProfile_<TAlignmentAlgorithm, TGapScheme, TTraceFlag> const & dpProfile)
+                 DPProfile_<TAlignmentAlgorithm, TGapScheme, TTraceFlag, TExecPolicy> const & dpProfile)
 {
     if (IsSingleTrace_<TTraceFlag>::VALUE)
         _correctTraceValue(dpTraceMatrixNavigator, dpScout);
@@ -1507,38 +1337,45 @@ _finishAlignment(TTraceTarget & traceSegments,
 // Function _computeAligmnment()
 // ----------------------------------------------------------------------------
 
-template <typename TScoreValue, typename TGapScheme, typename TTraceTarget, typename TScoutState, typename TSequenceH, typename TSequenceV,
-          typename TScoreScheme, typename TBandSwitch, typename TAlignmentAlgorithm, typename TTraceFlag>
+template <typename TDPScoreValue, typename TTraceValue, typename TScoreMatHost, typename TTraceMatHost,
+          typename TTraceTarget,
+          typename TScoutState,
+          typename TSequenceH,
+          typename TSequenceV,
+          typename TScoreScheme,
+          typename TBandSwitch,
+          typename TAlignmentAlgorithm, typename TGapScheme, typename TTraceFlag, typename TExecPolicy>
 inline typename Value<TScoreScheme>::Type
-_computeAlignment(DPContext<TScoreValue, TGapScheme> & dpContext,
+_computeAlignment(DPContext<TDPScoreValue, TTraceValue, TScoreMatHost, TTraceMatHost> & dpContext,
                   TTraceTarget & traceSegments,
                   TScoutState & scoutState,
                   TSequenceH const & seqH,
                   TSequenceV const & seqV,
                   TScoreScheme const & scoreScheme,
                   DPBandConfig<TBandSwitch> const & band,
-                  DPProfile_<TAlignmentAlgorithm, TGapScheme, TTraceFlag> const & dpProfile)
+                  DPProfile_<TAlignmentAlgorithm, TGapScheme, TTraceFlag, TExecPolicy> const & dpProfile)
 {
-    typedef typename GetDPScoreMatrix<DPContext<TScoreValue, TGapScheme> >::Type TDPScoreMatrixHost;
-    typedef typename Value<TDPScoreMatrixHost>::Type TDPScoreValue;
-
-    typedef typename GetDPTraceMatrix<DPContext<TScoreValue, TGapScheme> >::Type TDPTraceMatrixHost;
-    typedef typename Value<TDPTraceMatrixHost>::Type TTraceValue;
 
     typedef typename DefaultScoreMatrixSpec_<TAlignmentAlgorithm>::Type TScoreMatrixSpec;
 
-    typedef DPMatrix_<TDPScoreValue, TScoreMatrixSpec> TDPScoreMatrix;
-    typedef DPMatrix_<TTraceValue, FullDPMatrix> TDPTraceMatrix;
+    typedef DPMatrix_<TDPScoreValue, TScoreMatrixSpec, TScoreMatHost>   TDPScoreMatrix;
+    typedef DPMatrix_<TTraceValue, FullDPMatrix, TTraceMatHost>         TDPTraceMatrix;
+
+    using TNavigationSpec = std::conditional_t<std::is_same<TBandSwitch, BandOff>::value,
+                                               NavigateColumnWise,
+                                               NavigateColumnWiseBanded>;
 
-    typedef DPMatrixNavigator_<TDPScoreMatrix, DPScoreMatrix, NavigateColumnWise> TDPScoreMatrixNavigator;
-    typedef DPMatrixNavigator_<TDPTraceMatrix, DPTraceMatrix<TTraceFlag>, NavigateColumnWise> TDPTraceMatrixNavigator;
+    typedef DPMatrixNavigator_<TDPScoreMatrix, DPScoreMatrix, TNavigationSpec> TDPScoreMatrixNavigator;
+    typedef DPMatrixNavigator_<TDPTraceMatrix, DPTraceMatrix<TTraceFlag>, TNavigationSpec> TDPTraceMatrixNavigator;
 
     typedef typename ScoutSpecForAlignmentAlgorithm_<TAlignmentAlgorithm, TScoutState>::Type TDPScoutSpec;
     typedef DPScout_<TDPScoreValue, TDPScoutSpec> TDPScout;
 
+    typedef typename Value<TScoreScheme>::Type TScoreValue;
+
     // Check if current dp settings are valid. If not return infinity value for dp score value.
     if (!_isValidDPSettings(seqH, seqV, band, dpProfile))
-        return createVector<TScoreValue>(MinValue<typename Value<TScoreValue>::Type>::VALUE);  // NOTE(rrahn): In case of non-simd version, createVector returns just a scalar.
+        return createVector<TScoreValue>(std::numeric_limits<typename Value<TScoreValue>::Type>::min());  // NOTE(rrahn): In case of non-simd version, createVector returns just a scalar.
 
     TDPScoreMatrix dpScoreMatrix;
     TDPTraceMatrix dpTraceMatrix;
@@ -1547,7 +1384,7 @@ _computeAlignment(DPContext<TScoreValue, TGapScheme> & dpContext,
     setLength(dpScoreMatrix, +DPMatrixDimension_::HORIZONTAL, length(seqH) + 1 - std::max(0, lowerDiagonal(band)));
     setLength(dpTraceMatrix, +DPMatrixDimension_::HORIZONTAL, length(seqH) + 1 - std::max(0, lowerDiagonal(band)));
 
-    if (IsSameType<TBandSwitch, BandOff>::VALUE)
+    SEQAN_IF_CONSTEXPR (IsSameType<TBandSwitch, BandOff>::VALUE)
     {
         setLength(dpScoreMatrix, +DPMatrixDimension_::VERTICAL, length(seqV) + 1);
         setLength(dpTraceMatrix, +DPMatrixDimension_::VERTICAL, length(seqV) + 1);
@@ -1568,11 +1405,8 @@ _computeAlignment(DPContext<TScoreValue, TGapScheme> & dpContext,
     if (IsTracebackEnabled_<TTraceFlag>::VALUE)
         resize(dpTraceMatrix);
 
-    TDPScoreMatrixNavigator dpScoreMatrixNavigator;
-    TDPTraceMatrixNavigator dpTraceMatrixNavigator;
-
-    _init(dpScoreMatrixNavigator, dpScoreMatrix, band);
-    _init(dpTraceMatrixNavigator, dpTraceMatrix, band);
+    TDPScoreMatrixNavigator dpScoreMatrixNavigator{dpScoreMatrix, band};
+    TDPTraceMatrixNavigator dpTraceMatrixNavigator{dpTraceMatrix, band};
 
     TDPScout dpScout(scoutState);
 #if SEQAN_ALIGN_SIMD_PROFILE
@@ -1580,13 +1414,9 @@ _computeAlignment(DPContext<TScoreValue, TGapScheme> & dpContext,
     timer = sysTime();
 #endif
     // Execute the alignment.
-    if (!_isBandEnabled(band))
-        _computeUnbandedAlignment(dpScout, dpScoreMatrixNavigator, dpTraceMatrixNavigator, seqH, seqV, scoreScheme, dpProfile);
-    else if (upperDiagonal(band) == lowerDiagonal(band))
-        _computeHammingDistance(dpScout, dpScoreMatrixNavigator, dpTraceMatrixNavigator, seqH, seqV, scoreScheme, band, dpProfile);
-    else
-        _computeBandedAlignment(dpScout, dpScoreMatrixNavigator, dpTraceMatrixNavigator, seqH, seqV, scoreScheme,
-                                band, dpProfile);
+    _computeAlignmentImpl(dpScout, dpScoreMatrixNavigator, dpTraceMatrixNavigator, seqH, seqV, scoreScheme, band,
+                          dpProfile, TNavigationSpec{});
+
 #if SEQAN_ALIGN_SIMD_PROFILE
     profile.alignTimer += sysTime() - timer;
     timer = sysTime();
diff --git a/include/seqan/align/dp_align_simd_helper.h b/include/seqan/align/dp_align_simd_helper.h
index 8fd634a..124f7f0 100644
--- a/include/seqan/align/dp_align_simd_helper.h
+++ b/include/seqan/align/dp_align_simd_helper.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -69,12 +69,13 @@ struct VectorLength_;
 // Tags, Classes, Enums
 // ============================================================================
 
-template <typename TSimdVector_, typename TSeqH_, typename TSeqV_>
+template <typename TSimdVector_, typename TSeqH_, typename TSeqV_, typename TDPProfile_>
 struct SimdAlignVariableLengthTraits
 {
     using TSimdVector   = TSimdVector_;
     using TSeqH         = TSeqH_;
     using TSeqV         = TSeqV_;
+    using TDPProfile    = TDPProfile_;
 };
 
 // ============================================================================
@@ -89,38 +90,27 @@ struct SimdAlignVariableLengthTraits
 // Function _createSimdRepImpl()
 // ----------------------------------------------------------------------------
 
-#define SEQAN_CREATE_SIMD_REP_IMPL_2(data, strPos, chrPos)    getValue(data[strPos + 1], chrPos), getValue(data[strPos], chrPos)
-#define SEQAN_CREATE_SIMD_REP_IMPL_4(data, strPos, chrPos)    SEQAN_CREATE_SIMD_REP_IMPL_2(data, strPos + 2, chrPos),  SEQAN_CREATE_SIMD_REP_IMPL_2(data, strPos, chrPos)
-#define SEQAN_CREATE_SIMD_REP_IMPL_8(data, strPos, chrPos)    SEQAN_CREATE_SIMD_REP_IMPL_4(data, strPos + 4, chrPos),  SEQAN_CREATE_SIMD_REP_IMPL_4(data, strPos, chrPos)
-#define SEQAN_CREATE_SIMD_REP_IMPL_16(data, strPos, chrPos)   SEQAN_CREATE_SIMD_REP_IMPL_8(data, strPos + 8, chrPos),  SEQAN_CREATE_SIMD_REP_IMPL_8(data, strPos, chrPos)
-#define SEQAN_CREATE_SIMD_REP_IMPL_32(data, strPos, chrPos)   SEQAN_CREATE_SIMD_REP_IMPL_16(data, strPos + 16, chrPos), SEQAN_CREATE_SIMD_REP_IMPL_16(data, strPos, chrPos)
-
-#define SEQAN_CREATE_SIMD_REP_FILL_IMPL_2(MACRO, data, chrPos) MACRO(data, 0, chrPos)
-#define SEQAN_CREATE_SIMD_REP_FILL_IMPL(data, chrPos, SIZE) SEQAN_CREATE_SIMD_REP_FILL_IMPL_2(SEQAN_CREATE_SIMD_REP_IMPL_##SIZE, data, chrPos)
-
-#define SEQAN_CREATE_SIMD_REP_IMPL(SIZE)                                                \
-template <typename TSimdVecs, typename TStrings>                                        \
-inline void _createSimdRepImpl(TSimdVecs & simdStr,                                     \
-                               TStrings const & strings,                                \
-                               VectorLength_<SIZE> const & /*size*/)                    \
-{                                                                                       \
-    auto itB = begin(simdStr, Standard());                                              \
-    auto itE = end(simdStr, Standard());                                                \
-    for (auto it = itB; it != itE; ++it)                                                \
-        fillVector(*it, SEQAN_CREATE_SIMD_REP_FILL_IMPL(strings, it - itB, SIZE));      \
+template <typename TSimdVecs,
+          typename TStrings,
+          size_t ...I>
+inline void
+_createSimdRepImpl(TSimdVecs & vecs,
+                   TStrings const & strs,
+                   std::index_sequence<I...> const & /*unsued*/)
+{
+    for (size_t pos = 0; pos < length(vecs); ++pos)
+        fillVector(vecs[pos], strs[I][pos]...);
 }
 
-SEQAN_CREATE_SIMD_REP_IMPL(2)
-SEQAN_CREATE_SIMD_REP_IMPL(4)
-SEQAN_CREATE_SIMD_REP_IMPL(8)
-SEQAN_CREATE_SIMD_REP_IMPL(16)
-SEQAN_CREATE_SIMD_REP_IMPL(32)
-
-template <typename TSimdVecs, typename TStrings>
-inline void _createSimdRepImpl(TSimdVecs & simdStr,
-                               TStrings const & strings)
+template <typename TSimdVecs,
+          typename TStrings>
+inline void
+_createSimdRepImpl(TSimdVecs & simdStr,
+                   TStrings const & strings)
 {
-    _createSimdRepImpl(simdStr, strings, VectorLength_<LENGTH<typename Value<TSimdVecs>::Type>::VALUE>());
+    using TSimdVec = typename Value<TSimdVecs>::Type;
+    constexpr auto length = LENGTH<TSimdVec>::VALUE;
+    _createSimdRepImpl(simdStr, strings, std::make_index_sequence<length>());
 }
 
 // Actually precompute value if scoring scheme is score matrix and simd version.
@@ -137,96 +127,73 @@ _precomputeScoreMatrixOffset(TSeqValue const & seqVal,
 // Function _prepareAndRunSimdAlignment()
 // ----------------------------------------------------------------------------
 
-template <typename TResult,
-          typename TTraces,
+template <typename TStringSimdH,
+          typename TStringSimdV,
           typename TSequencesH,
-          typename TSequencesV,
-          typename TScore,
-          typename TAlgo, typename TBand, typename TFreeEndGaps, typename TTraceback,
-          typename TGapModel>
+          typename TSequencesV>
 inline void
-_prepareAndRunSimdAlignment(TResult & results,
-                            TTraces & traces,
-                            TSequencesH const & seqH,
-                            TSequencesV const & seqV,
-                            TScore const & scoringScheme,
-                            AlignConfig2<TAlgo, TBand, TFreeEndGaps, TTraceback> const & alignConfig,
-                            TGapModel const & /*gapModel*/,
-                            SimdAlignEqualLength const & /*tag*/)
+_prepareSimdAlignment(TStringSimdH & stringSimdH,
+                      TStringSimdV & stringSimdV,
+                      TSequencesH const & seqH,
+                      TSequencesV const & seqV,
+                      DPScoutState_<SimdAlignEqualLength> const & /*unused*/)
 {
-    String<TResult, Alloc<OverAligned> > stringSimdH;
-    String<TResult, Alloc<OverAligned> > stringSimdV;
-
     resize(stringSimdH, length(seqH[0]));
     resize(stringSimdV, length(seqV[0]));
     _createSimdRepImpl(stringSimdH, seqH);
     _createSimdRepImpl(stringSimdV, seqV);
-
-    DPScoutState_<SimdAlignEqualLength> state;
-    results = _setUpAndRunAlignment(traces, state, stringSimdH, stringSimdV, scoringScheme, alignConfig, TGapModel());
 }
 
-template <typename TResult,
-          typename TTraces,
+template <typename TStringSimdH,
+          typename TStringSimdV,
           typename TSequencesH,
           typename TSequencesV,
-          typename TScore,
-          typename TAlgo, typename TBand, typename TFreeEndGaps, typename TTraceback,
-          typename TGapModel,
           typename TTraits>
 inline void
-_prepareAndRunSimdAlignment(TResult & results,
-                            TTraces & traces,
-                            TSequencesH const & seqH,
-                            TSequencesV const & seqV,
-                            TScore const & scoringScheme,
-                            AlignConfig2<TAlgo, TBand, TFreeEndGaps, TTraceback> const & alignConfig,
-                            TGapModel const & /*gapModel*/,
-                            SimdAlignVariableLength<TTraits> const /*tag*/)
+_prepareSimdAlignment(TStringSimdH & stringSimdH,
+                      TStringSimdV & stringSimdV,
+                      TSequencesH const & seqH,
+                      TSequencesV const & seqV,
+                      String<size_t> & lengthsH,
+                      String<size_t> & lengthsV,
+                      DPScoutState_<SimdAlignVariableLength<TTraits> > & state)
 {
     SEQAN_ASSERT_EQ(length(seqH), length(seqV));
-    SEQAN_ASSERT_EQ(static_cast<decltype(length(seqH))>(LENGTH<TResult>::VALUE), length(seqH));
+    SEQAN_ASSERT_EQ(static_cast<decltype(length(seqH))>(LENGTH<typename Value<TStringSimdH>::Type>::VALUE), length(seqH));
+
+    using TSimdVector = typename TTraits::TSimdVector;
+    using TSimdValueType = typename Value<TSimdVector>::Type;
 
     using TPadStringH = ModifiedString<typename Value<TSequencesH const>::Type, ModPadding>;
     using TPadStringV = ModifiedString<typename Value<TSequencesV const>::Type, ModPadding>;
 
-    String<TResult, Alloc<OverAligned> > stringSimdH;
-    String<TResult, Alloc<OverAligned> > stringSimdV;
-
-    DPScoutState_<SimdAlignVariableLength<SimdAlignVariableLengthTraits<TResult, TSequencesH, TSequencesV> > > state;
-
-    String<size_t> lengthsH;
-    String<size_t> lengthsV;
-
-    resize(lengthsH, length(seqH));
-    resize(lengthsV, length(seqV));
-    resize(state.endsH, length(seqH));
-    resize(state.endsV, length(seqV));
+    resize(lengthsH, length(seqH), Exact{});
+    resize(lengthsV, length(seqV), Exact{});
 
     for (unsigned i = 0; i < length(seqH); ++i)
     {
-        lengthsH[i] = length(seqH[i]) - 1;
-        lengthsV[i] = length(seqV[i]) - 1;
-        state.endsH[i] = i;
-        state.endsV[i] = i;
+        lengthsH[i] = length(seqH[i]);
+        lengthsV[i] = length(seqV[i]);
     }
 
-    setHost(state.sortedEndsH, lengthsH);
-    setHost(state.sortedEndsV, lengthsV);
-    setCargo(state.sortedEndsH, state.endsH);
-    setCargo(state.sortedEndsV, state.endsV);
-
+    // Sort and remove unique elements from length vectors.
     auto maxLengthLambda = [](auto& lengthLhs, auto& lengthRhs) { return lengthLhs < lengthRhs; };
-    sort(state.sortedEndsH, maxLengthLambda, Serial());
-    sort(state.sortedEndsV, maxLengthLambda, Serial());
+    std::sort(begin(lengthsH, Standard{}), end(lengthsH, Standard{}), maxLengthLambda);
+    std::sort(begin(lengthsV, Standard{}), end(lengthsV, Standard{}), maxLengthLambda);
 
-    size_t maxH = back(state.sortedEndsH) + 1;
-    size_t maxV = back(state.sortedEndsV) + 1;
+    erase(lengthsH,
+          std::unique(begin(lengthsH, Standard{}), end(lengthsH, Standard{})) - begin(lengthsH, Standard{}),
+          length(lengthsH));
+    erase(lengthsV,
+          std::unique(begin(lengthsV, Standard{}), end(lengthsV, Standard{})) - begin(lengthsV, Standard{}),
+          length(lengthsV));
 
-    // and we have to prepare the bit masks of the DPScoutState
-    resize(state.masks,  maxV, createVector<TResult>(0));
-    resize(state.masksV, maxV, createVector<TResult>(0));
-    resize(state.masksH, maxH, createVector<TResult>(0));
+    // Initialize iterator to the lengths vectors.
+    state.nextEndsH = begin(lengthsH, Rooted{});
+    state.nextEndsV = begin(lengthsV, Rooted{});
+
+    size_t maxH = back(lengthsH);
+    size_t maxV = back(lengthsV);
 
     // Create Stringset with padded strings.
     StringSet<TPadStringH> paddedH;
@@ -241,9 +208,9 @@ _prepareAndRunSimdAlignment(TResult & results,
         expand(paddedH[i], maxH);
         expand(paddedV[i], maxV);
 
-        // mark the original end position of the alignment in the masks (with -1, all bits set)
-        assignValue(state.masksH[lengthsH[i]], i, -1);
-        assignValue(state.masksV[lengthsV[i]], i, -1);
+        // Store the end points as vector in both dimensions.
+        assignValue(state.endPosVecH, i, static_cast<TSimdValueType>(length(seqH[i])));
+        assignValue(state.endPosVecV, i, static_cast<TSimdValueType>(length(seqV[i])));
     }
 
     // now create SIMD representation
@@ -251,13 +218,6 @@ _prepareAndRunSimdAlignment(TResult & results,
     resize(stringSimdV, maxV);
     _createSimdRepImpl(stringSimdH, paddedH);
     _createSimdRepImpl(stringSimdV, paddedV);
-
-    state.dimV = length(stringSimdV);
-    state.isLocalAlignment = IsLocalAlignment_<TAlgo>::VALUE;
-    state.right = IsFreeEndGap_<TFreeEndGaps, DPLastColumn>::VALUE;
-    state.bottom = IsFreeEndGap_<TFreeEndGaps, DPLastRow>::VALUE;
-
-    results = _setUpAndRunAlignment(traces, state, stringSimdH, stringSimdV, scoringScheme, alignConfig, TGapModel());
 }
 
 template <typename TResult,
@@ -283,32 +243,56 @@ _prepareAndRunSimdAlignment(TResult & results,
                                      [seqLengthH, seqLengthV](auto param)
                                      {
                                          return (length(std::get<0>(param)) == seqLengthH) &&
-                                         (length(std::get<1>(param)) == seqLengthV);
+                                                (length(std::get<1>(param)) == seqLengthV);
                                      });
+
+    String<TResult, Alloc<OverAligned> > stringSimdH;
+    String<TResult, Alloc<OverAligned> > stringSimdV;
     if(allSameLength)
-        _prepareAndRunSimdAlignment(results, traces, seqH, seqV, scoringScheme, alignConfig, TGapModel(), SimdAlignEqualLength());
+    {
+        DPScoutState_<SimdAlignEqualLength> state;
+        _prepareSimdAlignment(stringSimdH, stringSimdV, seqH, seqV, state);
+        results = _setUpAndRunAlignment(traces, state, stringSimdH, stringSimdV, scoringScheme, alignConfig, TGapModel());
+    }
     else
-        _prepareAndRunSimdAlignment(results, traces, seqH, seqV, scoringScheme, alignConfig, TGapModel(),
-                                    SimdAlignVariableLength<Nothing>());
+    {
+        using TDPProfile = typename SetupAlignmentProfile_<TAlgo, TFreeEndGaps, TGapModel, TTraceback>::Type;
+
+        DPScoutState_<SimdAlignVariableLength<SimdAlignVariableLengthTraits<TResult,
+                                                                            TSequencesH,
+                                                                            TSequencesV,
+                                                                            TDPProfile>>> state;
+        String<size_t> lengthsH;
+        String<size_t> lengthsV;
+        _prepareSimdAlignment(stringSimdH, stringSimdV, seqH, seqV, lengthsH, lengthsV, state);
+
+        results = _setUpAndRunAlignment(traces, state, stringSimdH, stringSimdV, scoringScheme, alignConfig, TGapModel());
+    }
 }
 
 // ----------------------------------------------------------------------------
 // Function _alignWrapperSimd(); Score; StringSet vs. StringSet
 // ----------------------------------------------------------------------------
 
-template <typename TString1, typename TSpec1,
-          typename TString2, typename TSpec2,
+template <typename TSetH,
+          typename TSetV,
           typename TScoreValue, typename TScoreSpec,
           typename TAlignConfig,
-          typename TGapModel>
+          typename TGapModel,
+          std::enable_if_t<And<And<Is<ContainerConcept<TSetH>>,
+                                   Is<ContainerConcept<typename Value<TSetH>::Type>>>,
+                               And<Is<ContainerConcept<TSetV>>,
+                                   Is<ContainerConcept<typename Value<TSetV>::Type>>>
+                               >::VALUE,
+                          int> = 0>
 inline auto
-_alignWrapperSimd(StringSet<TString1, TSpec1> const & stringsH,
-                  StringSet<TString2, TSpec2> const & stringsV,
+_alignWrapperSimd(TSetH const & stringsH,
+                  TSetV const & stringsV,
                   Score<TScoreValue, TScoreSpec> const & scoringScheme,
                   TAlignConfig const & config,
                   TGapModel const & /*gaps*/)
 {
-    typedef typename SimdVector<int16_t>::Type TSimdAlign;
+    typedef typename SimdVector<TScoreValue>::Type TSimdAlign;
 
     unsigned const numAlignments = length(stringsV);
     unsigned const sizeBatch = LENGTH<TSimdAlign>::VALUE;
@@ -327,8 +311,8 @@ _alignWrapperSimd(StringSet<TString1, TSpec1> const & stringsH,
         TSimdAlign resultsBatch;
         if (SEQAN_UNLIKELY(numAlignments < pos + sizeBatch))
         {
-            StringSet<TString1, Dependent<> > depSetH;
-            StringSet<TString2, Dependent<> > depSetV;
+            StringSet<std::remove_const_t<typename Value<TSetH>::Type>, Dependent<> > depSetH;
+            StringSet<std::remove_const_t<typename Value<TSetV>::Type>, Dependent<> > depSetV;
             for (unsigned i = pos; i < fullSize; ++i)
             {
                 if (i >= numAlignments)
@@ -366,19 +350,25 @@ _alignWrapperSimd(StringSet<TString1, TSpec1> const & stringsH,
 // Function _alignWrapperSimd(); Score; String vs. StringSet
 // ----------------------------------------------------------------------------
 
-template <typename TString1,
-          typename TString2, typename TSpec,
+template <typename TSeqH,
+          typename TSetV,
           typename TScoreValue, typename TScoreSpec,
           typename TAlignConfig,
-          typename TGapModel>
+          typename TGapModel,
+          std::enable_if_t<And<And<Is<ContainerConcept<TSeqH>>,
+                                   Not<Is<ContainerConcept<typename Value<TSeqH>::Type>>>>,
+                               And<Is<ContainerConcept<TSetV>>,
+                                   Is<ContainerConcept<typename Value<TSetV>::Type>>>
+                              >::VALUE,
+                           int> = 0>
 inline auto
-_alignWrapperSimd(TString1 const & stringH,
-                  StringSet<TString2, TSpec> const & stringsV,
+_alignWrapperSimd(TSeqH const & stringH,
+                  TSetV const & stringsV,
                   Score<TScoreValue, TScoreSpec> const & scoringScheme,
                   TAlignConfig const & config,
                   TGapModel const & /*gaps*/)
 {
-    typedef typename SimdVector<int16_t>::Type TSimdAlign;
+    typedef typename SimdVector<TScoreValue>::Type TSimdAlign;
 
     unsigned const numAlignments = length(stringsV);
     unsigned const sizeBatch = LENGTH<TSimdAlign>::VALUE;
@@ -388,7 +378,7 @@ _alignWrapperSimd(TString1 const & stringH,
     resize(results, numAlignments);
 
     // Prepare strings.
-    StringSet<TString1, Dependent<> > setH;
+    StringSet<TSeqH, Dependent<> > setH;
     for (auto i = 0u; i < sizeBatch; ++i)
         appendValue(setH, stringH);
 
@@ -402,7 +392,7 @@ _alignWrapperSimd(TString1 const & stringH,
         TSimdAlign resultsBatch;
         if (SEQAN_UNLIKELY(numAlignments < pos + sizeBatch))
         {
-            StringSet<TString2, Dependent<> > depSetV;
+            StringSet<std::remove_const_t<typename Value<TSetV>::Type>, Dependent<> > depSetV;
             for (unsigned i = pos; i < fullSize; ++i)
             {
                 if (i >= numAlignments)
@@ -430,25 +420,31 @@ _alignWrapperSimd(TString1 const & stringH,
 // Function _alignWrapperSimd(); Gaps
 // ----------------------------------------------------------------------------
 
-template <typename TSequenceH, typename TGapsSpecH, typename TSetSpecH,
-          typename TSequenceV, typename TGapsSpecV, typename TSetSpecV,
+template <typename TSetH,
+          typename TSetV,
           typename TScoreValue, typename TScoreSpec,
           typename TAlignConfig,
-          typename TGapModel>
+          typename TGapModel,
+          std::enable_if_t<And<And<Is<ContainerConcept<TSetH>>,
+                                   Is<AlignedSequenceConcept<typename Value<TSetH>::Type>>>,
+                               And<Is<ContainerConcept<TSetV>>,
+                                   Is<AlignedSequenceConcept<typename Value<TSetV>::Type>>>
+                              >::VALUE,
+                          int> = 0>
 inline auto
-_alignWrapperSimd(StringSet<Gaps<TSequenceH, TGapsSpecH>, TSetSpecH> & gapSeqSetH,
-                  StringSet<Gaps<TSequenceV, TGapsSpecV>, TSetSpecV> & gapSeqSetV,
+_alignWrapperSimd(TSetH & gapSeqSetH,
+                  TSetV & gapSeqSetV,
                   Score<TScoreValue, TScoreSpec> const & scoringScheme,
                   TAlignConfig const & config,
                   TGapModel const & /*gaps*/)
 {
-    typedef Gaps<TSequenceH, TGapsSpecH>                                TGapSequenceH;
-    typedef Gaps<TSequenceV, TGapsSpecV>                                TGapSequenceV;
+    typedef typename Value<TSetH>::Type                                 TGapSequenceH;
+    typedef typename Value<TSetV>::Type                                 TGapSequenceV;
     typedef typename Size<TGapSequenceH>::Type                          TSize;
     typedef typename Position<TGapSequenceH>::Type                      TPosition;
     typedef TraceSegment_<TPosition, TSize>                             TTraceSegment;
 
-    typedef typename SimdVector<int16_t>::Type                          TSimdAlign;
+    typedef typename SimdVector<TScoreValue>::Type                      TSimdAlign;
 
 #if SEQAN_ALIGN_SIMD_PROFILE
     timer = sysTime();
@@ -465,8 +461,8 @@ _alignWrapperSimd(StringSet<Gaps<TSequenceH, TGapsSpecH>, TSetSpecH> & gapSeqSet
     Score<TSimdAlign, ScoreSimdWrapper<Score<TScoreValue, TScoreSpec> > > simdScoringScheme(scoringScheme);
 
     // Prepare string sets with sequences.
-    StringSet<typename Source<TGapSequenceH>::Type, Dependent<> > depSetH;
-    StringSet<typename Source<TGapSequenceV>::Type, Dependent<> > depSetV;
+    StringSet<std::remove_const_t<typename Source<TGapSequenceH>::Type>, Dependent<> > depSetH;
+    StringSet<std::remove_const_t<typename Source<TGapSequenceV>::Type>, Dependent<> > depSetV;
     reserve(depSetH, fullSize);
     reserve(depSetV, fullSize);
     for (unsigned i = 0; i < fullSize; ++i)
@@ -514,4 +510,3 @@ _alignWrapperSimd(StringSet<Gaps<TSequenceH, TGapsSpecH>, TSetSpecH> & gapSeqSet
 
 }  // namespace seqan
 #endif  // #ifndef INCLUDE_SEQAN_ALIGN_DP_ALIGN_SIMD_HELPER_H_
-
diff --git a/include/seqan/align/dp_band.h b/include/seqan/align/dp_band.h
index b636d50..16c3c6b 100644
--- a/include/seqan/align/dp_band.h
+++ b/include/seqan/align/dp_band.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/align/dp_cell.h b/include/seqan/align/dp_cell.h
index 49f3b85..a73868c 100644
--- a/include/seqan/align/dp_cell.h
+++ b/include/seqan/align/dp_cell.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -50,6 +50,12 @@ namespace seqan {
 // Tags, Classes, Enums
 // ============================================================================
 
+struct DynamicGapExtensionHorizontal_;
+typedef Tag<DynamicGapExtensionHorizontal_> DynamicGapExtensionHorizontal;
+
+struct DynamicGapExtensionVertical_;
+typedef Tag<DynamicGapExtensionVertical_> DynamicGapExtensionVertical;
+
 // ----------------------------------------------------------------------------
 // Class DPCell_
 // ----------------------------------------------------------------------------
@@ -66,6 +72,21 @@ class DPCell_;
 // ============================================================================
 
 // ----------------------------------------------------------------------------
+// Metafunction Spec
+// ----------------------------------------------------------------------------
+
+template <typename TScoreValue, typename TGapCostFunction>
+struct Spec<DPCell_<TScoreValue, TGapCostFunction> >
+{
+    typedef TGapCostFunction Type;
+};
+
+template <typename TScoreValue, typename TGapCostFunction>
+struct Spec<DPCell_<TScoreValue, TGapCostFunction> const> :
+    Spec<DPCell_<TScoreValue, TGapCostFunction> >
+{};
+
+// ----------------------------------------------------------------------------
 // Metafunction Value
 // ----------------------------------------------------------------------------
 
@@ -109,7 +130,7 @@ struct DPCellDefaultInfinity
 };
 
 template <typename T>
-const int DPCellDefaultInfinity<T>::VALUE = MinValue<int>::VALUE;
+const int DPCellDefaultInfinity<T>::VALUE = std::numeric_limits<int>::min();
 
 // We use the min value of the score type and shift it one bits to the left.  This way we can use "infinity" without
 // checking for it during the computation.
@@ -121,7 +142,7 @@ struct DPCellDefaultInfinity<DPCell_<TScoreValue, TGapCostFunction> >
 
 template <typename TScoreValue, typename TGapCostFunction>
     const TScoreValue DPCellDefaultInfinity<DPCell_<TScoreValue, TGapCostFunction> >::VALUE =
-        createVector<TScoreValue>(MinValue<typename Value<TScoreValue>::Type>::VALUE) / createVector<TScoreValue>(2);
+        createVector<TScoreValue>(std::numeric_limits<typename Value<TScoreValue>::Type>::min()) / createVector<TScoreValue>(2);
 
 template <typename TScoreValue, typename TGapCostFunction>
 struct DPCellDefaultInfinity<DPCell_<TScoreValue, TGapCostFunction> const> :
@@ -177,9 +198,16 @@ _setScoreOfCell(DPCell_<TScoreValue, TGapCosts> & dpCell, TScoreValue const & ne
     dpCell._score = newScore;
 }
 
-template <typename TScoreValue, typename TGapCosts>
+template <typename TScoreValue, typename TGapCosts, typename TMask>
 inline void
-_setScoreOfCell(DPCell_<TScoreValue, TGapCosts> & dpCell, TScoreValue const & newScore, TScoreValue const & mask)
+_setScoreOfCell(DPCell_<TScoreValue, TGapCosts> & dpCell, TScoreValue const & newScore)
+{
+    dpCell._score = newScore;
+}
+
+template <typename TScoreValue, typename TGapCosts, typename TMask>
+inline void
+_setScoreOfCell(DPCell_<TScoreValue, TGapCosts> & dpCell, TScoreValue const & newScore, TMask const & mask)
 {
     dpCell._score = blend(dpCell._score, newScore, mask);
 }
@@ -215,9 +243,9 @@ _setVerticalScoreOfCell(DPCell_<TScoreValue, TGapSpec> & /*dpCell*/, TScoreValue
     // no-op
 }
 
-template <typename TScoreValue, typename TGapSpec>
+template <typename TScoreValue, typename TGapSpec, typename TMask>
 inline void
-_setVerticalScoreOfCell(DPCell_<TScoreValue, TGapSpec> & /*dpCell*/, TScoreValue const & /*newVerticalScore*/, TScoreValue const & /*mask*/)
+_setVerticalScoreOfCell(DPCell_<TScoreValue, TGapSpec> & /*dpCell*/, TScoreValue const & /*newVerticalScore*/, TMask const & /*mask*/)
 {
     // no-op
 }
@@ -253,9 +281,9 @@ _setHorizontalScoreOfCell(DPCell_<TScoreValue, TGapSpec> & /*dpCell*/, TScoreVal
     // no-op
 }
 
-template <typename TScoreValue, typename TGapSpec>
+template <typename TScoreValue, typename TGapSpec, typename TMask>
 inline void
-_setHorizontalScoreOfCell(DPCell_<TScoreValue, TGapSpec> & /*dpCell*/, TScoreValue const & /*newHorizontalScore*/, TScoreValue const & /*mask*/)
+_setHorizontalScoreOfCell(DPCell_<TScoreValue, TGapSpec> & /*dpCell*/, TScoreValue const & /*newHorizontalScore*/, TMask const & /*mask*/)
 {
     // no-op
 }
@@ -271,13 +299,79 @@ setGapExtension(DPCell_<TScoreValue, TGapSpec> & /*dpCell*/, TF1 , TF2)
     // no-op
 }
 
-template <typename TScoreValue, typename TGapSpec, typename TF1, typename TF2>
+template <typename TScoreValue, typename TGapSpec, typename TF1, typename TF2, typename TMask>
 inline void
-setGapExtension(DPCell_<TScoreValue, TGapSpec> & /*dpCell*/, TF1 , TF2, TScoreValue)
+setGapExtension(DPCell_<TScoreValue, TGapSpec> & /*dpCell*/, TF1 , TF2, TMask)
 {
     // no-op
 }
 
+template <typename TTarget, typename TScoreValue, typename TGapSpec>
+inline void
+write(TTarget & target, DPCell_<TScoreValue, TGapSpec> const & cell)
+{
+    write(target, _scoreOfCell(cell));
+}
+
+// ----------------------------------------------------------------------------
+// Function isGapExtension()
+// ----------------------------------------------------------------------------
+
+template <typename TScoreValue, typename TGapSpec,
+          typename TSpec>
+inline bool
+isGapExtension(DPCell_<TScoreValue, TGapSpec> const & /*cell*/,
+               TSpec const & /*spec*/)
+{
+    return false;
+}
+
+// ----------------------------------------------------------------------------
+// Function operator==()
+// ----------------------------------------------------------------------------
+
+template <typename TScoreValue, typename TGapCosts>
+inline bool operator==(DPCell_<TScoreValue, TGapCosts> const & lhs,
+                       DPCell_<TScoreValue, TGapCosts> const & rhs)
+{
+    return _scoreOfCell(lhs) == _scoreOfCell(rhs) &&
+           _horizontalScoreOfCell(lhs) == _horizontalScoreOfCell(rhs) &&
+           _verticalScoreOfCell(lhs) == _verticalScoreOfCell(rhs);
+}
+
+// ----------------------------------------------------------------------------
+// Function operator!=()
+// ----------------------------------------------------------------------------
+
+template <typename TScoreValue, typename TGapCosts>
+inline bool operator!=(DPCell_<TScoreValue, TGapCosts> const & lhs,
+                       DPCell_<TScoreValue, TGapCosts> const & rhs)
+{
+    return !(lhs == rhs);
+}
+
+// ----------------------------------------------------------------------------
+// Function operator<<()
+// ----------------------------------------------------------------------------
+
+template <typename TStream,
+          typename TScoreValue, typename TGapCosts>
+inline TStream& operator<<(TStream & stream,
+                           DPCell_<TScoreValue, TGapCosts> const & cell)
+{
+    stream << "M: " << _scoreOfCell(cell);
+    if (std::is_same<TGapCosts, AffineGaps>::value)
+    {
+        stream << " <H: " << _horizontalScoreOfCell(cell) << " V: " << _verticalScoreOfCell(cell) << ">";
+    }
+    else if (std::is_same<TGapCosts, DynamicGaps>::value)
+    {
+        stream << " <H: " << isGapExtension(cell, DynamicGapExtensionHorizontal{}) <<
+                  " V: " << isGapExtension(cell, DynamicGapExtensionVertical{}) << ">";
+    }
+    return stream;
+}
+
 }  // namespace seqan
 
 #endif  // #ifndef SEQAN_INCLUDE_SEQAN_ALIGN_DP_CELL_H_
diff --git a/include/seqan/align/dp_cell_affine.h b/include/seqan/align/dp_cell_affine.h
index c12990c..c4c08d4 100644
--- a/include/seqan/align/dp_cell_affine.h
+++ b/include/seqan/align/dp_cell_affine.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -62,7 +62,7 @@ public:
     TScoreValue _score              = DPCellDefaultInfinity<DPCell_>::VALUE;
     TScoreValue _horizontalScore    = DPCellDefaultInfinity<DPCell_>::VALUE;
     TScoreValue _verticalScore      = DPCellDefaultInfinity<DPCell_>::VALUE;
-    
+
     DPCell_() = default;
     // Copy c'tor.
     DPCell_(DPCell_<TScoreValue, AffineGaps> const & other) :
@@ -70,7 +70,7 @@ public:
         _horizontalScore(other._horizontalScore),
         _verticalScore(other._verticalScore)
     {}
-    
+
     // Move c-tor
     DPCell_(DPCell_ && other) : DPCell_()
     {
@@ -105,6 +105,19 @@ public:
 // ============================================================================
 
 // ----------------------------------------------------------------------------
+// Function operator<<()
+// ----------------------------------------------------------------------------
+
+// Needed for banded chain alignment for the set.
+template <typename TStream, typename TScore>
+inline TStream& operator<<(TStream & stream,
+                           DPCell_<TScore, AffineGaps> const & dpCell)
+{
+    stream << "<S = " << dpCell._score << " H = " << dpCell._horizontalScore << " V = " << dpCell._verticalScore << ">";
+    return stream;
+}
+
+// ----------------------------------------------------------------------------
 // Function operator<()
 // ----------------------------------------------------------------------------
 
@@ -150,6 +163,13 @@ _setVerticalScoreOfCell(DPCell_<TScoreValue, AffineGaps> & dpCell, TScoreValue c
 
 template <typename TScoreValue>
 inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TScoreValue> >,void)
+_setVerticalScoreOfCell(DPCell_<TScoreValue, AffineGaps> & dpCell, TScoreValue const & newVerticalScore)
+{
+    dpCell._verticalScore = newVerticalScore;
+}
+
+template <typename TScoreValue>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TScoreValue> >,void)
 _setVerticalScoreOfCell(DPCell_<TScoreValue, AffineGaps> & dpCell, TScoreValue const & newVerticalScore, TScoreValue const & mask)
 {
     dpCell._verticalScore = blend(dpCell._verticalScore, newVerticalScore, mask);
@@ -188,14 +208,21 @@ _setHorizontalScoreOfCell(DPCell_<TScoreValue, AffineGaps> & dpCell, TScoreValue
 
 template <typename TScoreValue>
 inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TScoreValue> >,void)
+_setHorizontalScoreOfCell(DPCell_<TScoreValue, AffineGaps> & dpCell, TScoreValue const & newHorizontalScore)
+{
+    dpCell._horizontalScore = newHorizontalScore;
+}
+
+template <typename TScoreValue>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TScoreValue> >,void)
 _setHorizontalScoreOfCell(DPCell_<TScoreValue, AffineGaps> & dpCell, TScoreValue const & newHorizontalScore, TScoreValue const & mask)
 {
     dpCell._horizontalScore = blend(dpCell._horizontalScore, newHorizontalScore, mask);
 }
 
 template <typename TScoreValue>
-inline void 
-swap(DPCell_<TScoreValue, AffineGaps> & lhs, 
+inline void
+swap(DPCell_<TScoreValue, AffineGaps> & lhs,
      DPCell_<TScoreValue, AffineGaps> & rhs)
 {
     std::swap(lhs._score, rhs._score);
diff --git a/include/seqan/align/dp_cell_dynamic.h b/include/seqan/align/dp_cell_dynamic.h
index 567d5f9..61c42b5 100644
--- a/include/seqan/align/dp_cell_dynamic.h
+++ b/include/seqan/align/dp_cell_dynamic.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -67,12 +67,6 @@ struct FlagMaskType
 // Tags, Classes, Enums
 // ============================================================================
 
-struct DynamicGapExtensionHorizontal_;
-typedef Tag<DynamicGapExtensionHorizontal_> DynamicGapExtensionHorizontal;
-
-struct DynamicGapExtensionVertical_;
-typedef Tag<DynamicGapExtensionVertical_> DynamicGapExtensionVertical;
-
 enum DynamicGapsMask
 {
     MASK_VERTICAL_GAP = 1,
@@ -168,7 +162,7 @@ inline void _setBit(DPCell_<TScoreValue, DynamicGaps> & cell,
                     TFlag const & /*flag*/,
                     DynamicGapExtensionVertical const & /*tag*/)
 {
-    if (IsSameType<TFlag, True>::VALUE)
+    SEQAN_IF_CONSTEXPR (IsSameType<TFlag, True>::VALUE)
         cell._flagMask |= MASK_VERTICAL_GAP;
     else
         cell._flagMask &= ~MASK_VERTICAL_GAP;
@@ -179,7 +173,7 @@ inline void _setBit(DPCell_<TScoreValue, DynamicGaps> & cell,
                     TFlag const & /*flag*/,
                     DynamicGapExtensionHorizontal const & /*tag*/)
 {
-    if (IsSameType<TFlag, True>::VALUE)
+    SEQAN_IF_CONSTEXPR (IsSameType<TFlag, True>::VALUE)
         cell._flagMask |= MASK_HORIZONTAL_GAP;
     else
         cell._flagMask &= ~MASK_HORIZONTAL_GAP;
@@ -190,7 +184,7 @@ inline SEQAN_FUNC_ENABLE_IF(Not<Is<SimdVectorConcept<TScoreValue> > >,bool)
 isGapExtension(DPCell_<TScoreValue, DynamicGaps> const & cell,
                TSpec const & /*spec*/)
 {
-    if (IsSameType<TSpec, DynamicGapExtensionHorizontal>::VALUE)
+    SEQAN_IF_CONSTEXPR (IsSameType<TSpec, DynamicGapExtensionHorizontal>::VALUE)
         return cell._flagMask & MASK_HORIZONTAL_GAP;
     else
         return cell._flagMask & MASK_VERTICAL_GAP;
diff --git a/include/seqan/align/dp_cell_linear.h b/include/seqan/align/dp_cell_linear.h
index 1a46fbe..3fc4b07 100644
--- a/include/seqan/align/dp_cell_linear.h
+++ b/include/seqan/align/dp_cell_linear.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/align/dp_context.h b/include/seqan/align/dp_context.h
index 3049369..69a9618 100644
--- a/include/seqan/align/dp_context.h
+++ b/include/seqan/align/dp_context.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -57,12 +57,11 @@ struct GetDPTraceMatrix
 // Tags, Classes, Enums
 // ============================================================================
 
-template <typename TScoreValue, typename TGapCosts>
+template <typename TScoreValue, typename TTraceValue,
+          typename TScoreMatrixHost = String<TScoreValue>,
+          typename TTraceMatrixHost = String<TTraceValue> >
 struct DPContext
 {
-    typedef typename GetDPScoreMatrix<DPContext>::Type TScoreMatrixHost;
-    typedef typename GetDPTraceMatrix<DPContext>::Type TTraceMatrixHost;
-
     TScoreMatrixHost _scoreMatrix;
     TTraceMatrixHost _traceMatrix;
 
@@ -74,50 +73,6 @@ struct DPContext
 // Metafunctions
 // ============================================================================
 
-// ----------------------------------------------------------------------------
-// Metafunction GetDPScoreMatrix
-// ----------------------------------------------------------------------------
-
-template <typename TScoreValue, typename TGapCosts>
-struct GetDPScoreMatrix<DPContext<TScoreValue, TGapCosts> >
-{
-    typedef DPCell_<TScoreValue, TGapCosts> TDPScoreValue_;
-    typedef DPMatrix_<TDPScoreValue_, FullDPMatrix> TDPScoreMatrix_;
-
-    typedef typename Host<TDPScoreMatrix_>::Type Type;
-};
-
-template <typename TScoreValue, typename TGapCosts>
-struct GetDPScoreMatrix<DPContext<TScoreValue, TGapCosts> const >
-{
-    typedef DPCell_<TScoreValue, TGapCosts> TDPScoreValue_;
-    typedef DPMatrix_<TDPScoreValue_, FullDPMatrix> TDPScoreMatrix_;
-
-    typedef typename Host<TDPScoreMatrix_>::Type const Type;
-};
-
-// ----------------------------------------------------------------------------
-// Metafunction GetDPTraceMatrix
-// ----------------------------------------------------------------------------
-
-template <typename TScoreValue, typename TGapCosts>
-struct GetDPTraceMatrix<DPContext<TScoreValue, TGapCosts> >
-{
-    typedef typename TraceBitMap_<TScoreValue>::Type TTraceValue_;
-    typedef DPMatrix_<TTraceValue_, FullDPMatrix> TDPScoreMatrix_;
-
-    typedef typename Host<TDPScoreMatrix_>::Type Type;
-};
-
-template <typename TScoreValue, typename TGapCosts>
-struct GetDPTraceMatrix<DPContext<TScoreValue, TGapCosts> const >
-{
-    typedef typename TraceBitMap_<TScoreValue>::Type TTraceValue_;
-    typedef DPMatrix_<TTraceValue_, FullDPMatrix> TDPScoreMatrix_;
-
-    typedef typename Host<TDPScoreMatrix_>::Type const Type;
-};
-
 // ============================================================================
 // Functions
 // ============================================================================
@@ -126,16 +81,16 @@ struct GetDPTraceMatrix<DPContext<TScoreValue, TGapCosts> const >
 // Function dpScoreMatrix()
 // ----------------------------------------------------------------------------
 
-template <typename TScoreValue, typename TGapCosts>
-inline typename GetDPScoreMatrix<DPContext<TScoreValue, TGapCosts> >::Type &
-getDpScoreMatrix(DPContext<TScoreValue, TGapCosts> & dpContext)
+template <typename TScoreValue, typename TGapCosts, typename TScoreMatHost, typename TTraceMatHost>
+inline TScoreMatHost &
+getDpScoreMatrix(DPContext<TScoreValue, TGapCosts, TScoreMatHost, TTraceMatHost> & dpContext)
 {
     return dpContext._scoreMatrix;
 }
 
-template <typename TScoreValue, typename TGapCosts>
-inline typename GetDPScoreMatrix<DPContext<TScoreValue, TGapCosts> const >::Type &
-getDpScoreMatrix(DPContext<TScoreValue, TGapCosts> const & dpContext)
+template <typename TScoreValue, typename TGapCosts, typename TScoreMatHost, typename TTraceMatHost>
+inline TScoreMatHost const &
+getDpScoreMatrix(DPContext<TScoreValue, TGapCosts, TScoreMatHost, TTraceMatHost> const & dpContext)
 {
     return dpContext._scoreMatrix;
 }
@@ -144,16 +99,16 @@ getDpScoreMatrix(DPContext<TScoreValue, TGapCosts> const & dpContext)
 // Function dpTraceMatrix()
 // ----------------------------------------------------------------------------
 
-template <typename TScoreValue, typename TGapCosts>
-inline typename GetDPTraceMatrix<DPContext<TScoreValue, TGapCosts> >::Type &
-getDpTraceMatrix(DPContext<TScoreValue, TGapCosts> & dpContext)
+template <typename TScoreValue, typename TGapCosts, typename TScoreMatHost, typename TTraceMatHost>
+inline TTraceMatHost &
+getDpTraceMatrix(DPContext<TScoreValue, TGapCosts, TScoreMatHost, TTraceMatHost> & dpContext)
 {
     return dpContext._traceMatrix;
 }
 
-template <typename TScoreValue, typename TGapCosts>
-inline typename GetDPTraceMatrix<DPContext<TScoreValue, TGapCosts> const >::Type &
-getDpTraceMatrix(DPContext<TScoreValue, TGapCosts> const & dpContext)
+template <typename TScoreValue, typename TGapCosts, typename TScoreMatHost, typename TTraceMatHost>
+inline TTraceMatHost const &
+getDpTraceMatrix(DPContext<TScoreValue, TGapCosts, TScoreMatHost, TTraceMatHost> const & dpContext)
 {
     return dpContext._traceMatrix;
 }
@@ -162,10 +117,10 @@ getDpTraceMatrix(DPContext<TScoreValue, TGapCosts> const & dpContext)
 // Function setDpScoreMatrix()
 // ----------------------------------------------------------------------------
 
-template <typename TScoreValue, typename TGapCosts>
+template <typename TScoreValue, typename TGapCosts, typename TScoreMatHost, typename TTraceMatHost>
 inline void
-setDpTraceMatrix(DPContext<TScoreValue, TGapCosts> & dpContext,
-                typename GetDPScoreMatrix<DPContext<TScoreValue, TGapCosts> >::Type const & scoreMatrix)
+setDpTraceMatrix(DPContext<TScoreValue, TGapCosts, TScoreMatHost, TTraceMatHost> & dpContext,
+                 TScoreMatHost const & scoreMatrix)
 {
     dpContext._scoreMatrix = scoreMatrix;
 }
@@ -174,10 +129,10 @@ setDpTraceMatrix(DPContext<TScoreValue, TGapCosts> & dpContext,
 // Function setDpTraceMatrix()
 // ----------------------------------------------------------------------------
 
-template <typename TScoreValue, typename TGapCosts>
+template <typename TScoreValue, typename TGapCosts, typename TScoreMatHost, typename TTraceMatHost>
 inline void
-setDpTraceMatrix(DPContext<TScoreValue, TGapCosts> & dpContext,
-                typename GetDPTraceMatrix<DPContext<TScoreValue, TGapCosts> >::Type const & traceMatrix)
+setDpTraceMatrix(DPContext<TScoreValue, TGapCosts, TScoreMatHost, TTraceMatHost> & dpContext,
+                 TTraceMatHost const & traceMatrix)
 {
     dpContext._tarceMatrix = traceMatrix;
 }
diff --git a/include/seqan/align/dp_formula.h b/include/seqan/align/dp_formula.h
index 9ecd0ab..2d0ddc9 100644
--- a/include/seqan/align/dp_formula.h
+++ b/include/seqan/align/dp_formula.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -34,8 +34,6 @@
 // Defines the recursion formula for the dp-alignment algorithms.
 // ==========================================================================
 
-// TODO(holtgrew): Documentation in this header necessary or internal only?
-
 #ifndef SEQAN_INCLUDE_SEQAN_ALIGN_DP_FORMULA_H_
 #define SEQAN_INCLUDE_SEQAN_ALIGN_DP_FORMULA_H_
 
@@ -102,116 +100,191 @@ typedef Tag<RecursionDirectionZero_> RecursionDirectionZero;
 // Metafunctions
 // ============================================================================
 
+// Helper typedef to get the correct score value type from the score-matrix navigator.
+template <typename TCellTuple>
+using ExtractedScoreValueType_ = std::decay_t<decltype(_scoreOfCell(std::get<0>(std::declval<TCellTuple>())))>;
+
 // ============================================================================
 // Functions
 // ============================================================================
 
-// ----------------------------------------------------------------------------
-// Function _computeScore
-// ----------------------------------------------------------------------------
+template <typename TTarget,
+          typename TSourceLeft,
+          typename TSourceRight,
+          typename TTraceLeft,
+          typename TTraceRight>
+inline SEQAN_FUNC_ENABLE_IF(Not<Is<SimdVectorConcept<TTarget>>>, typename TraceBitMap_<TTarget>::Type)
+_maxScore(TTarget & target,
+          TSourceLeft const & srcLeft,
+          TSourceRight const & srcRight,
+          TTraceRight const /**/,
+          TTraceLeft const  /**/,
+          TracebackOff const & /*tag*/)
+{
+    using std::max;
+    target = max(static_cast<TTarget>(srcLeft), static_cast<TTarget>(srcRight));
+    return TraceBitMap_<TTarget>::NONE;
+}
 
-template <typename TScoreValue, typename TGapCosts, typename TSequenceHValue, typename TSequenceVValue,
-          typename TScoringScheme, typename TRecursionDirection, typename TDPProfile>
-inline SEQAN_FUNC_ENABLE_IF(Not<Is<SimdVectorConcept<TScoreValue> > >, typename TraceBitMap_<TScoreValue>::Type)
-_computeScore(DPCell_<TScoreValue, TGapCosts> & activeCell,
-              DPCell_<TScoreValue, TGapCosts> const & previousDiagonal,
-              DPCell_<TScoreValue, TGapCosts> const & previousHorizontal,
-              DPCell_<TScoreValue, TGapCosts> const & previousVertical,
-              TSequenceHValue const & seqHVal,
-              TSequenceVValue const & seqVVal,
-              TScoringScheme const & scoringScheme,
-              TRecursionDirection const & recDir,
-              TDPProfile const & dpProfile)
+template <typename TTarget,
+          typename TSourceLeft,
+          typename TSourceRight,
+          typename TTraceLeft,
+          typename TTraceRight>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TTarget>>, typename TraceBitMap_<TTarget>::Type)
+_maxScore(TTarget & target,
+          TSourceLeft const & srcLeft,
+          TSourceRight const & srcRight,
+          TTraceRight const /**/,
+          TTraceLeft const  /**/,
+          TracebackOff const & /*tag*/)
 {
-    typedef typename TraceBitMap_<TScoreValue>::Type TTraceValue;
-
-    TTraceValue traceDir = _doComputeScore(activeCell, previousDiagonal, previousHorizontal, previousVertical, seqHVal,
-                                           seqVVal, scoringScheme, recDir, dpProfile);
-    if (IsLocalAlignment_<TDPProfile>::VALUE)
-        if (activeCell._score <= 0)
-        {
-            _setScoreOfCell(activeCell, static_cast<TScoreValue>(0));
-            _setHorizontalScoreOfCell(activeCell, static_cast<TScoreValue>(0));
-            _setVerticalScoreOfCell(activeCell, static_cast<TScoreValue>(0));
-            return TraceBitMap_<TScoreValue>::NONE;
-        }
-
-    return traceDir;
+    target = max(srcLeft, srcRight);
+    return TraceBitMap_<TTarget>::NONE;
 }
 
-template <typename TScoreValue, typename TGapCosts, typename TSequenceHValue, typename TSequenceVValue,
-          typename TScoringScheme, typename TRecursionDirection, typename TDPProfile>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TScoreValue> >, typename TraceBitMap_<TScoreValue>::Type)
-_computeScore(DPCell_<TScoreValue, TGapCosts> & activeCell,
-              DPCell_<TScoreValue, TGapCosts> const & previousDiagonal,
-              DPCell_<TScoreValue, TGapCosts> const & previousHorizontal,
-              DPCell_<TScoreValue, TGapCosts> const & previousVertical,
-              TSequenceHValue const & seqHVal,
-              TSequenceVValue const & seqVVal,
-              TScoringScheme const & scoringScheme,
-              TRecursionDirection const & recDir,
-              TDPProfile const & dpProfile)
+template <typename TTarget,
+          typename TSourceLeft,
+          typename TSourceRight,
+          typename TTraceLeft,
+          typename TTraceRight,
+          typename TGapsPlacement>
+inline SEQAN_FUNC_ENABLE_IF(Not<Is<SimdVectorConcept<TTarget>>>, typename TraceBitMap_<TTarget>::Type)
+_maxScore(TTarget & target,
+          TSourceLeft const & srcLeft,
+          TSourceRight const & srcRight,
+          TTraceLeft const  traceLeft,
+          TTraceRight const traceRight,
+          TracebackOn<TracebackConfig_<SingleTrace, TGapsPlacement> > const & /*tag*/)
 {
-    typedef typename TraceBitMap_<TScoreValue>::Type TTraceValue;
+    return (srcLeft < srcRight)
+        ? (target = srcRight, traceRight)
+        : (target = srcLeft, traceLeft);
+}
 
-    TTraceValue traceDir = _doComputeScore(activeCell, previousDiagonal, previousHorizontal, previousVertical, seqHVal,
-                                           seqVVal, scoringScheme, recDir, dpProfile);
-    if (IsLocalAlignment_<TDPProfile>::VALUE)
-    {
-        TScoreValue cmp = cmpGt(createVector<TScoreValue>(1), activeCell._score);
-        _setScoreOfCell(activeCell, TraceBitMap_<TScoreValue>::NONE, cmp);
-        _setHorizontalScoreOfCell(activeCell, TraceBitMap_<TScoreValue>::NONE, cmp);
-        _setVerticalScoreOfCell(activeCell, TraceBitMap_<TScoreValue>::NONE, cmp);
-        return blend(traceDir, TraceBitMap_<TScoreValue>::NONE, cmp);
-    }
+template <typename TTarget,
+          typename TSourceLeft,
+          typename TSourceRight,
+          typename TTraceLeft,
+          typename TTraceRight,
+          typename TGapsPlacement>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TTarget>>, typename TraceBitMap_<TTarget>::Type)
+_maxScore(TTarget & target,
+          TSourceLeft const & srcLeft,
+          TSourceRight const & srcRight,
+          TTraceLeft const  traceLeft,
+          TTraceRight const traceRight,
+          TracebackOn<TracebackConfig_<SingleTrace, TGapsPlacement> > const & /*tag*/)
+{
+    auto cmp = cmpGt(srcRight, srcLeft);
+    target = blend(srcLeft, srcRight, cmp);
+    return blend(traceLeft, traceRight, cmp);
+}
+
+template <typename TTarget,
+          typename TSourceLeft,
+          typename TSourceRight,
+          typename TTraceLeft,
+          typename TTraceRight,
+          typename TGapsPlacement>
+inline SEQAN_FUNC_ENABLE_IF(Not<Is<SimdVectorConcept<TTarget>>>, typename TraceBitMap_<TTarget>::Type)
+_maxScore(TTarget & target,
+          TSourceLeft const & srcLeft,
+          TSourceRight const & srcRight,
+          TTraceLeft const  traceLeft,
+          TTraceRight const traceRight,
+          TracebackOn<TracebackConfig_<CompleteTrace, TGapsPlacement> > const & /*tag*/)
+{
+    return (srcLeft == srcRight)
+        ? (target = srcLeft, traceLeft | traceRight)
+        : (srcLeft < srcRight)
+            ? (target = srcRight, traceRight)
+            : (target = srcLeft, traceLeft);
+}
 
-    return traceDir;
+template <typename TTarget,
+          typename TSourceLeft,
+          typename TSourceRight,
+          typename TTraceLeft,
+          typename TTraceRight,
+          typename TGapsPlacement>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TTarget>>, typename TraceBitMap_<TTarget>::Type)
+_maxScore(TTarget & target,
+          TSourceLeft const & srcLeft,
+          TSourceRight const & srcRight,
+          TTraceLeft const  traceLeft,
+          TTraceRight const traceRight,
+          TracebackOn<TracebackConfig_<CompleteTrace, TGapsPlacement> > const & /*tag*/)
+{
+    auto cmpG = cmpGt(srcRight, srcLeft);
+    auto cmpE = cmpEq(srcRight, srcLeft);
+    target = blend(srcLeft, srcRight, cmpG);
+    auto result = blend(traceLeft, traceRight, cmpG);
+    return blend(result, traceLeft | traceRight, cmpE);
 }
 
 // ----------------------------------------------------------------------------
-// Function _doComputeScore                        [RecursionDirectionDiagonal]
+// Function _computeScore                          [RecursionDirectionDiagonal]
 // ----------------------------------------------------------------------------
-
-template <typename TScoreValue, typename TGapCosts, typename TSequenceHValue, typename TSequenceVValue, typename TScoringScheme,
-          typename TDPProfile>
-inline typename TraceBitMap_<TScoreValue>::Type
-_doComputeScore(DPCell_<TScoreValue, TGapCosts> & activeCell,
-                DPCell_<TScoreValue, TGapCosts> const & previousDiagonal,
-                DPCell_<TScoreValue, TGapCosts> const & /*previousHorizontal*/,
-                DPCell_<TScoreValue, TGapCosts> const & /*previousVertical*/,
-                TSequenceHValue const & seqHVal,
-                TSequenceVValue const & seqVVal,
-                TScoringScheme const & scoringScheme,
-                RecursionDirectionDiagonal const &,
-                TDPProfile const &)
+// Independent of gap cost model.
+template <typename TScoreValue, typename TGapCosts,
+          typename TSequenceHValue,
+          typename TSequenceVValue,
+          typename TScoringScheme,
+          typename TAlgorithm, typename TTracebackConfig, typename TExecPolicy>
+inline auto
+_computeScore(DPCell_<TScoreValue, TGapCosts> & current,
+              DPCell_<TScoreValue, TGapCosts> & diagonal,
+              DPCell_<TScoreValue, TGapCosts> const & /*horizontal*/,
+              DPCell_<TScoreValue, TGapCosts> const & /*vertical*/,
+              TSequenceHValue const & seqHVal,
+              TSequenceVValue const & seqVVal,
+              TScoringScheme const & scoringScheme,
+              RecursionDirectionDiagonal const &,
+              DPProfile_<TAlgorithm, TGapCosts, TTracebackConfig, TExecPolicy> const &)
 {
-    activeCell._score = _scoreOfCell(previousDiagonal) + score(scoringScheme, seqHVal, seqVVal);
-    setGapExtension(activeCell, False(), False(), createVector<TScoreValue>(-1));
+    _scoreOfCell(current) = _scoreOfCell(diagonal) + score(scoringScheme, seqHVal, seqVVal);
+    setGapExtension(current, False(), False(), createVector<TScoreValue>(-1));
 
-    if (!IsTracebackEnabled_<TDPProfile>::VALUE)
-        return TraceBitMap_<TScoreValue>::NONE;
-
-    return TraceBitMap_<TScoreValue>::DIAGONAL;
+    if (IsLocalAlignment_<TAlgorithm>::VALUE)
+    {
+        return _maxScore(_scoreOfCell(current),
+                         TraceBitMap_<TScoreValue>::NONE,
+                         _scoreOfCell(current),
+                         TraceBitMap_<TScoreValue>::NONE,
+                         TraceBitMap_<TScoreValue>::DIAGONAL,
+                         TTracebackConfig{});
+    }
+    else
+    {
+        return TraceBitMap_<TScoreValue>::DIAGONAL;
+    }
 }
 
 // ----------------------------------------------------------------------------
-// Function _doComputeScore                            [RecursionDirectionZero]
+// Function _computeScore                              [RecursionDirectionZero]
 // ----------------------------------------------------------------------------
 
-template <typename TScoreValue, typename TGapCosts, typename TSequenceHValue, typename TSequenceVValue, typename TScoringScheme,
-          typename TAlgoTag, typename TTraceFlag>
-inline typename TraceBitMap_<TScoreValue>::Type
-_doComputeScore(DPCell_<TScoreValue, TGapCosts> & activeCell,
-                DPCell_<TScoreValue, TGapCosts> const & /*previousDiagonal*/,
-                DPCell_<TScoreValue, TGapCosts> const & /*previousHorizontal*/,
-                DPCell_<TScoreValue, TGapCosts> const & /*previousVertical*/,
-                TSequenceHValue const & /*seqHVal*/,
-                TSequenceVValue const & /*seqVVal*/,
-                TScoringScheme const & /*scoringScheme*/,
-                RecursionDirectionZero const &,
-                DPProfile_<TAlgoTag, TGapCosts, TTraceFlag> const &)
+// Independent of gap cost model.
+template <typename TScoreValue, typename TGapCosts,
+          typename TSequenceHValue,
+          typename TSequenceVValue,
+          typename TScoringScheme,
+          typename TAlgoTag, typename TTraceFlag, typename TExecPolicy>
+inline auto
+_computeScore(DPCell_<TScoreValue, TGapCosts> & current,
+              DPCell_<TScoreValue, TGapCosts> & diagonal,
+              DPCell_<TScoreValue, TGapCosts> const & /*horizontal*/,
+              DPCell_<TScoreValue, TGapCosts> & vertical,
+              TSequenceHValue const & /*seqHVal*/,
+              TSequenceVValue const & /*seqVVal*/,
+              TScoringScheme const & /*scoringScheme*/,
+              RecursionDirectionZero const &,
+              DPProfile_<TAlgoTag, TGapCosts, TTraceFlag, TExecPolicy> const &)
 {
-    _scoreOfCell(activeCell) = createVector<TScoreValue>(0);
+    _scoreOfCell(current) = TraceBitMap_<TScoreValue>::NONE;
+    _scoreOfCell(diagonal) = _scoreOfCell(current);
+    _scoreOfCell(vertical) = _scoreOfCell(current);
     return TraceBitMap_<TScoreValue>::NONE;
 }
 
diff --git a/include/seqan/align/dp_formula_affine.h b/include/seqan/align/dp_formula_affine.h
index 2e22c0c..1c78b38 100644
--- a/include/seqan/align/dp_formula_affine.h
+++ b/include/seqan/align/dp_formula_affine.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -56,579 +56,272 @@ namespace seqan {
 // ============================================================================
 
 // ----------------------------------------------------------------------------
-// Function _internalComputeScore      [RecursionDirectionDiagonal, AffineGaps]
+// Function _computeScore                 [RecursionAllDirection, AffineGaps]
 // ----------------------------------------------------------------------------
 
-template <typename TScoreValue, typename TAffineGaps, typename TTraceValueL, typename TTraceValueGap>
-inline SEQAN_FUNC_ENABLE_IF(Not<Is<SimdVectorConcept<TScoreValue> > >, typename TraceBitMap_<TScoreValue>::Type)
-_internalComputeScore(DPCell_<TScoreValue, TAffineGaps> & activeCell,
-                      TScoreValue const & rightCompare,
-                      TTraceValueL,
-                      TTraceValueGap,
-                      TracebackOff const &,
-                      RecursionDirectionDiagonal const &)
-{
-    if(activeCell._score < rightCompare)
-        activeCell._score = rightCompare;
-    return TraceBitMap_<TScoreValue>::NONE;
-}
-
-template <typename TScoreValue, typename TAffineGaps, typename TTraceValueL, typename TTraceValueGap>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TScoreValue> >, typename TraceBitMap_<TScoreValue>::Type)
-_internalComputeScore(DPCell_<TScoreValue, TAffineGaps> & activeCell,
-                      TScoreValue const & rightCompare,
-                      TTraceValueL,
-                      TTraceValueGap,
-                      TracebackOff const &,
-                      RecursionDirectionDiagonal const &)
-{
-    activeCell._score = blend(activeCell._score, rightCompare, cmpGt(rightCompare, activeCell._score));
-    return TraceBitMap_<TScoreValue>::NONE;
-}
-
-template <typename TScoreValue, typename TAffineGaps, typename TTraceValueL, typename TTraceValueGap, typename TGapsPlacement>
-inline SEQAN_FUNC_ENABLE_IF(Not<Is<SimdVectorConcept<TScoreValue> > >, typename TraceBitMap_<TScoreValue>::Type)
-_internalComputeScore(DPCell_<TScoreValue, TAffineGaps> & activeCell,
-                      TScoreValue const & rightCompare,
-                      TTraceValueL leftTrace,
-                      TTraceValueGap gapTrace,
-                      TracebackOn<TracebackConfig_<SingleTrace, TGapsPlacement> > const &,
-                      RecursionDirectionDiagonal const &)
-{
-    if(activeCell._score <= rightCompare)
-    {
-        activeCell._score = rightCompare;
-        return TraceBitMap_<TScoreValue>::DIAGONAL | leftTrace;
-    }
-    return leftTrace | gapTrace;
-}
-
-template <typename TScoreValue, typename TAffineGaps, typename TTraceValueL, typename TTraceValueGap, typename TGapsPlacement>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TScoreValue> >, typename TraceBitMap_<TScoreValue>::Type)
-_internalComputeScore(DPCell_<TScoreValue, TAffineGaps> & activeCell,
-                      TScoreValue const & rightCompare,
-                      TTraceValueL const & leftTrace,
-                      TTraceValueGap const & gapTrace,
-                      TracebackOn<TracebackConfig_<SingleTrace, TGapsPlacement> > const &,
-                      RecursionDirectionDiagonal const &)
-{
-    TScoreValue cmp = cmpGt(activeCell._score, rightCompare);
-    activeCell._score = blend(rightCompare, activeCell._score, cmp);
-    return blend(TraceBitMap_<TScoreValue>::DIAGONAL | leftTrace,
-                 leftTrace | gapTrace,
-                 cmp);
-}
-
-template <typename TScoreValue, typename TAffineGaps, typename TTraceValueL, typename TTraceValueGap, typename TGapsPlacement>
-inline SEQAN_FUNC_ENABLE_IF(Not<Is<SimdVectorConcept<TScoreValue> > >, typename TraceBitMap_<TScoreValue>::Type)
-_internalComputeScore(DPCell_<TScoreValue, TAffineGaps> & activeCell,
-                      TScoreValue const & rightCompare,
-                      TTraceValueL leftTrace,
-                      TTraceValueGap gapTrace,
-                      TracebackOn<TracebackConfig_<CompleteTrace, TGapsPlacement> >  const &,
-                      RecursionDirectionDiagonal const &)
+template <typename TScoreValue,
+          typename TSequenceHValue, typename TSequenceVValue, typename TScoringScheme,
+          typename TAlgorithm, typename TTracebackConfig, typename TExecPolicy>
+inline typename TraceBitMap_<TScoreValue>::Type
+_computeScore(DPCell_<TScoreValue, AffineGaps> & current,
+              DPCell_<TScoreValue, AffineGaps> & previousDiagonal,
+              DPCell_<TScoreValue, AffineGaps> const & previousHorizontal,
+              DPCell_<TScoreValue, AffineGaps> & previousVertical,
+              TSequenceHValue const & seqHVal,
+              TSequenceVValue const & seqVVal,
+              TScoringScheme const & scoringScheme,
+              RecursionDirectionAll const &,
+              DPProfile_<TAlgorithm, AffineGaps, TTracebackConfig, TExecPolicy> const &)
 {
-    if(activeCell._score < rightCompare)
+    // Compute intermediate diagonal result.
+    TScoreValue intermediate = static_cast<TScoreValue>(_scoreOfCell(previousDiagonal) +
+                                                        score(scoringScheme, seqHVal, seqVVal));
+    // Cache previous Diagonal
+    _scoreOfCell(previousDiagonal) = _scoreOfCell(previousHorizontal);
+    // Compute horizontal direction.
+    auto tmp  = _maxScore(_horizontalScoreOfCell(current),
+                          _horizontalScoreOfCell(previousHorizontal) +
+                              scoreGapExtendHorizontal(scoringScheme, seqHVal, seqVVal),
+                          _scoreOfCell(previousHorizontal) +
+                              scoreGapOpenHorizontal(scoringScheme, seqHVal, seqVVal),
+                          TraceBitMap_<TScoreValue>::HORIZONTAL,
+                          TraceBitMap_<TScoreValue>::HORIZONTAL_OPEN,
+                          TTracebackConfig{});
+
+    // Compute vertical direction.
+    tmp |= _maxScore(_verticalScoreOfCell(previousVertical),
+                     _verticalScoreOfCell(previousVertical) +
+                         scoreGapExtendVertical(scoringScheme, seqHVal, seqVVal),
+                     _scoreOfCell(previousVertical) +
+                         scoreGapOpenVertical(scoringScheme, seqHVal, seqVVal),
+                     TraceBitMap_<TScoreValue>::VERTICAL,
+                     TraceBitMap_<TScoreValue>::VERTICAL_OPEN,
+                     TTracebackConfig{});
+
+    auto tmp2 = _maxScore(_scoreOfCell(current),
+                    _verticalScoreOfCell(previousVertical),
+                    _horizontalScoreOfCell(current),
+                    TraceBitMap_<TScoreValue>::MAX_FROM_VERTICAL_MATRIX,
+                    TraceBitMap_<TScoreValue>::MAX_FROM_HORIZONTAL_MATRIX,
+                    TTracebackConfig{});
+    tmp = _maxScore(_scoreOfCell(current),
+                    intermediate,
+                    _scoreOfCell(current),
+                    TraceBitMap_<TScoreValue>::DIAGONAL | tmp,
+                    tmp2 | tmp,
+                    TTracebackConfig{});
+    if (IsLocalAlignment_<TAlgorithm>::VALUE)
     {
-        activeCell._score = rightCompare;  // Maximal score comes from diagonal.
-        return TraceBitMap_<TScoreValue>::DIAGONAL | leftTrace;  // Return trace for Diagonal.
+        tmp = _maxScore(_scoreOfCell(current),
+                        TraceBitMap_<TScoreValue>::NONE,
+                        _scoreOfCell(current),
+                        TraceBitMap_<TScoreValue>::NONE,
+                        tmp,
+                        TTracebackConfig{});
     }
-    if (activeCell._score == rightCompare)      // Maximal score comes from previous computed directions and diagonal.
-        return leftTrace | TraceBitMap_<TScoreValue>::DIAGONAL | gapTrace;   // Return all directions inclusively the flag indicating max from gap.
-    return leftTrace | gapTrace; // Maximum comes from gap. Return gap value inclusively the flag indicating max from gap.
-}
-
-template <typename TScoreValue, typename TAffineGaps, typename TTraceValueL, typename TTraceValueGap, typename TGapsPlacement>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TScoreValue> >, typename TraceBitMap_<TScoreValue>::Type)
-_internalComputeScore(DPCell_<TScoreValue, TAffineGaps> & activeCell,
-                      TScoreValue const & rightCompare,
-                      TTraceValueL const & leftTrace,
-                      TTraceValueGap const & gapTrace,
-                      TracebackOn<TracebackConfig_<CompleteTrace, TGapsPlacement> >  const &,
-                      RecursionDirectionDiagonal const &)
-{
-    TScoreValue cmpG = cmpGt(rightCompare, activeCell._score);
-    TScoreValue cmpE = cmpEq(rightCompare, activeCell._score);
-    TScoreValue result = leftTrace | gapTrace;
-    activeCell._score = blend(activeCell._score, rightCompare, cmpG);
-    result = blend(result, TraceBitMap_<TScoreValue>::DIAGONAL | leftTrace, cmpG);
-    return blend(result, leftTrace | TraceBitMap_<TScoreValue>::DIAGONAL | gapTrace, cmpE);
+    // Cache score for previous vertical.
+    _scoreOfCell(previousVertical) = _scoreOfCell(current);
+    return tmp;
 }
 
 // ----------------------------------------------------------------------------
-// Function _internalComputeScore    [RecursionDirectionHorizontal, AffineGaps]
+// Function _computeScore       [RecursionUpperDiagonalDirection, AffineGaps]
 // ----------------------------------------------------------------------------
 
-template <typename TScoreValue, typename TTraceValueL, typename TTraceValueR>
-inline SEQAN_FUNC_ENABLE_IF(Not<Is<SimdVectorConcept<TScoreValue> > >, typename TraceBitMap_<TScoreValue>::Type)
-_internalComputeScore(DPCell_<TScoreValue, AffineGaps> & activeCell,
-                      TScoreValue const & rightCompare,
-                      TTraceValueL,
-                      TTraceValueR,
-                      TracebackOff const &,
-                      RecursionDirectionHorizontal const &)
-{
-    if(activeCell._horizontalScore < rightCompare)
-        activeCell._score = activeCell._horizontalScore = rightCompare;
-    else
-        activeCell._score = activeCell._horizontalScore;
-    return TraceBitMap_<TScoreValue>::NONE;
-}
-
-template <typename TScoreValue, typename TTraceValueL, typename TTraceValueR>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TScoreValue> >, typename TraceBitMap_<TScoreValue>::Type)
-_internalComputeScore(DPCell_<TScoreValue, AffineGaps> & activeCell,
-                      TScoreValue const & rightCompare,
-                      TTraceValueL,
-                      TTraceValueR,
-                      TracebackOff const &,
-                      RecursionDirectionHorizontal const &)
-{
-    TScoreValue cmp = cmpGt(rightCompare, activeCell._horizontalScore);
-    activeCell._horizontalScore = blend(activeCell._horizontalScore, rightCompare, cmp);
-    activeCell._score = activeCell._horizontalScore;
-    return TraceBitMap_<TScoreValue>::NONE;
-}
-
-template <typename TScoreValue, typename TTraceValueL, typename TTraceValueR, typename TGapsPlacement>
-inline SEQAN_FUNC_ENABLE_IF(Not<Is<SimdVectorConcept<TScoreValue> > >, typename TraceBitMap_<TScoreValue>::Type)
-_internalComputeScore(DPCell_<TScoreValue, AffineGaps> & activeCell,
-                      TScoreValue const & rightCompare,
-                      TTraceValueL leftTrace,
-                      TTraceValueR  rightTrace,
-                      TracebackOn<TracebackConfig_<SingleTrace, TGapsPlacement> >  const &,
-                      RecursionDirectionHorizontal const &)
-{
-    if(activeCell._horizontalScore < rightCompare)
-    {
-        activeCell._score = activeCell._horizontalScore = rightCompare;
-        return rightTrace;
-    }
-    activeCell._score = activeCell._horizontalScore;
-    return leftTrace;
-}
-
-template <typename TScoreValue, typename TTraceValueL, typename TTraceValueR, typename TGapsPlacement>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TScoreValue> >, typename TraceBitMap_<TScoreValue>::Type)
-_internalComputeScore(DPCell_<TScoreValue, AffineGaps> & activeCell,
-                      TScoreValue const & rightCompare,
-                      TTraceValueL leftTrace,
-                      TTraceValueR  rightTrace,
-                      TracebackOn<TracebackConfig_<SingleTrace, TGapsPlacement> >  const &,
-                      RecursionDirectionHorizontal const &)
+template <typename TScoreValue,
+          typename TSequenceHValue, typename TSequenceVValue, typename TScoringScheme,
+          typename TAlgorithm, typename TTracebackConfig, typename TExecPolicy>
+inline typename TraceBitMap_<TScoreValue>::Type
+_computeScore(DPCell_<TScoreValue, AffineGaps> & current,
+              DPCell_<TScoreValue, AffineGaps> & previousDiagonal,
+              DPCell_<TScoreValue, AffineGaps> const & previousHorizontal,
+              DPCell_<TScoreValue, AffineGaps> & previousVertical,
+              TSequenceHValue const & seqHVal,
+              TSequenceVValue const & seqVVal,
+              TScoringScheme const & scoringScheme,
+              RecursionDirectionUpperDiagonal const &,
+              DPProfile_<TAlgorithm, AffineGaps, TTracebackConfig, TExecPolicy> const &)
 {
-    TScoreValue cmp = cmpGt(rightCompare, activeCell._horizontalScore);
-    activeCell._horizontalScore = blend(activeCell._horizontalScore, rightCompare, cmp);
-    activeCell._score = activeCell._horizontalScore;
-    return blend(leftTrace, rightTrace, cmp);
-}
+    typedef typename TraceBitMap_<TScoreValue>::Type TTraceValue;
 
-template <typename TScoreValue, typename TTraceValueL, typename TTraceValueR, typename TGapsPlacement>
-inline SEQAN_FUNC_ENABLE_IF(Not<Is<SimdVectorConcept<TScoreValue> > >, typename TraceBitMap_<TScoreValue>::Type)
-_internalComputeScore(DPCell_<TScoreValue, AffineGaps> & activeCell,
-                      TScoreValue const & rightCompare,
-                      TTraceValueL leftTrace,
-                      TTraceValueR rightTrace,
-                      TracebackOn<TracebackConfig_<CompleteTrace, TGapsPlacement> >  const &,
-                      RecursionDirectionHorizontal const &)
-{
-    if(activeCell._horizontalScore < rightCompare)
+    // Compute intermediate diagonal result.
+    TScoreValue intermediate = static_cast<TScoreValue>(_scoreOfCell(previousDiagonal) +
+                                                        score(scoringScheme, seqHVal, seqVVal));
+    // Cache previous Diagonal
+    _scoreOfCell(previousDiagonal) = _scoreOfCell(previousHorizontal);
+    // Compute horiztonal direction.
+    // _horizontalScoreOfCell(current) = _horizontalScoreOfCell(previousHorizontal) +
+    //                                      scoreGapExtendHorizontal(scoringScheme, seqHVal, seqVVal);
+    TTraceValue tv = _maxScore(_horizontalScoreOfCell(current),
+                               _horizontalScoreOfCell(previousHorizontal) +
+                                    scoreGapExtendHorizontal(scoringScheme, seqHVal, seqVVal),
+                               _scoreOfCell(previousHorizontal) +
+                                    scoreGapOpenHorizontal(scoringScheme, seqHVal, seqVVal),
+                               TraceBitMap_<TScoreValue>::HORIZONTAL,
+                               TraceBitMap_<TScoreValue>::HORIZONTAL_OPEN,
+                               TTracebackConfig());
+    // Ignore vertical direction in upper diagonal.
+    _verticalScoreOfCell(previousVertical) = DPCellDefaultInfinity<DPCell_<TScoreValue, AffineGaps> >::VALUE;
+    // Compute diagonal direction and compare with horizontal.
+    // _scoreOfCell(current) = _horizontalScoreOfCell(current);
+    tv = _maxScore(_scoreOfCell(current),
+                   intermediate,
+                   _horizontalScoreOfCell(current),
+                   tv | TraceBitMap_<TScoreValue>::DIAGONAL,
+                   tv | TraceBitMap_<TScoreValue>::MAX_FROM_HORIZONTAL_MATRIX,
+                   TTracebackConfig());
+    if (IsLocalAlignment_<TAlgorithm>::VALUE)
     {
-        activeCell._score = activeCell._horizontalScore = rightCompare;
-        return rightTrace;
+        tv = _maxScore(_scoreOfCell(current),
+                       TraceBitMap_<TScoreValue>::NONE,
+                       _scoreOfCell(current),
+                       TraceBitMap_<TScoreValue>::NONE,
+                       tv,
+                       TTracebackConfig{});
     }
-    activeCell._score = activeCell._horizontalScore;
-    if (activeCell._horizontalScore == rightCompare)
-        return leftTrace | rightTrace;
-    return leftTrace;
-}
-
-template <typename TScoreValue, typename TTraceValueL, typename TTraceValueR, typename TGapsPlacement>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TScoreValue> >, typename TraceBitMap_<TScoreValue>::Type)
-_internalComputeScore(DPCell_<TScoreValue, AffineGaps> & activeCell,
-                      TScoreValue const & rightCompare,
-                      TTraceValueL const & leftTrace,
-                      TTraceValueR const & rightTrace,
-                      TracebackOn<TracebackConfig_<CompleteTrace, TGapsPlacement> >  const &,
-                      RecursionDirectionHorizontal const &)
-{
-    TScoreValue cmpG = cmpGt(rightCompare, activeCell._horizontalScore);
-    TScoreValue cmpE = cmpEq(rightCompare, activeCell._horizontalScore);
-    activeCell._horizontalScore = blend(activeCell._horizontalScore, rightCompare, cmpG);
-    activeCell._score = activeCell._horizontalScore;
-
-    TScoreValue result = leftTrace;
-    result = blend(result, rightTrace, cmpG);
-    return blend(result, leftTrace | rightTrace, cmpE);
+    _scoreOfCell(previousVertical) = _scoreOfCell(current);
+    return tv;
 }
 
 // ----------------------------------------------------------------------------
-// Function _internalComputeScore      [RecursionDirectionVertical, AffineGaps]
+// Function _computeScore       [RecursionDirectionLowerDiagonal, AffineGaps]
 // ----------------------------------------------------------------------------
 
-template <typename TScoreValue, typename TTraceValueL, typename TTraceValueR>
-inline SEQAN_FUNC_ENABLE_IF(Not<Is<SimdVectorConcept<TScoreValue> > >, typename TraceBitMap_<TScoreValue>::Type)
-_internalComputeScore(DPCell_<TScoreValue, AffineGaps> & activeCell,
-                      TScoreValue const & rightCompare,
-                      TTraceValueL,
-                      TTraceValueR,
-                      TracebackOff const &,
-                      RecursionDirectionVertical const &)
-{
-    if(activeCell._verticalScore < rightCompare)
-        activeCell._score = activeCell._verticalScore = rightCompare;
-    else
-        activeCell._score = activeCell._verticalScore;
-    return TraceBitMap_<TScoreValue>::NONE;
-}
-
-template <typename TScoreValue, typename TTraceValueL, typename TTraceValueR>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TScoreValue> >, typename TraceBitMap_<TScoreValue>::Type)
-_internalComputeScore(DPCell_<TScoreValue, AffineGaps> & activeCell,
-                      TScoreValue const & rightCompare,
-                      TTraceValueL,
-                      TTraceValueR,
-                      TracebackOff const &,
-                      RecursionDirectionVertical const &)
-{
-    TScoreValue cmp = cmpGt(rightCompare, activeCell._verticalScore);
-    activeCell._verticalScore = blend(activeCell._verticalScore, rightCompare, cmp);
-    activeCell._score = activeCell._verticalScore;
-    return TraceBitMap_<TScoreValue>::NONE;
-}
-
-template <typename TScoreValue, typename TTraceValueL, typename TTraceValueR, typename TGapsPlacement>
-inline SEQAN_FUNC_ENABLE_IF(Not<Is<SimdVectorConcept<TScoreValue> > >, typename TraceBitMap_<TScoreValue>::Type)
-_internalComputeScore(DPCell_<TScoreValue, AffineGaps> & activeCell,
-                      TScoreValue const & rightCompare,
-                      TTraceValueL leftTrace,
-                      TTraceValueR rightTrace,
-                      TracebackOn<TracebackConfig_<SingleTrace, TGapsPlacement> >  const &,
-                      RecursionDirectionVertical const &)
-{
-    if(activeCell._verticalScore < rightCompare)
-    {
-        activeCell._score = activeCell._verticalScore = rightCompare;
-        return rightTrace;
-    }
-    activeCell._score = activeCell._verticalScore;
-    return leftTrace;
-}
-
-template <typename TScoreValue, typename TTraceValueL, typename TTraceValueR, typename TGapsPlacement>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TScoreValue> >, typename TraceBitMap_<TScoreValue>::Type)
-_internalComputeScore(DPCell_<TScoreValue, AffineGaps> & activeCell,
-                      TScoreValue const & rightCompare,
-                      TTraceValueL const & leftTrace,
-                      TTraceValueR const & rightTrace,
-                      TracebackOn<TracebackConfig_<SingleTrace, TGapsPlacement> >  const &,
-                      RecursionDirectionVertical const &)
+template <typename TScoreValue,
+          typename TSequenceHValue, typename TSequenceVValue, typename TScoringScheme,
+          typename TAlgorithm, typename TTracebackConfig, typename TExecPolicy>
+inline typename TraceBitMap_<TScoreValue>::Type
+_computeScore(DPCell_<TScoreValue, AffineGaps> & current,
+              DPCell_<TScoreValue, AffineGaps> const & previousDiagonal,
+              DPCell_<TScoreValue, AffineGaps> const & /*previousHorizontal*/,
+              DPCell_<TScoreValue, AffineGaps> & previousVertical,
+              TSequenceHValue const & seqHVal,
+              TSequenceVValue const & seqVVal,
+              TScoringScheme const & scoringScheme,
+              RecursionDirectionLowerDiagonal const &,
+              DPProfile_<TAlgorithm, AffineGaps, TTracebackConfig, TExecPolicy> const &)
 {
-    TScoreValue cmp = cmpGt(rightCompare, activeCell._verticalScore);
-    activeCell._verticalScore = blend(activeCell._verticalScore, rightCompare, cmp);
-    activeCell._score = activeCell._verticalScore;
-    return blend(leftTrace, rightTrace, cmp);
-}
+    typedef typename TraceBitMap_<TScoreValue>::Type TTraceValue;
 
-template <typename TScoreValue, typename TTraceValueL, typename TTraceValueR, typename TGapsPlacement>
-inline SEQAN_FUNC_ENABLE_IF(Not<Is<SimdVectorConcept<TScoreValue> > >, typename TraceBitMap_<TScoreValue>::Type)
-_internalComputeScore(DPCell_<TScoreValue, AffineGaps> & activeCell,
-                      TScoreValue const & rightCompare,
-                      TTraceValueL leftTrace,
-                      TTraceValueR rightTrace,
-                      TracebackOn<TracebackConfig_<CompleteTrace, TGapsPlacement> >  const &,
-                      RecursionDirectionVertical const &)
-{
-    if(activeCell._verticalScore < rightCompare)
+    // Compute vertical direction.
+    TTraceValue tv = _maxScore(_verticalScoreOfCell(previousVertical),
+                               _verticalScoreOfCell(previousVertical) +
+                                    scoreGapExtendVertical(scoringScheme, seqHVal, seqVVal),
+                               _scoreOfCell(previousVertical) +
+                                    scoreGapOpenVertical(scoringScheme, seqHVal, seqVVal),
+                              TraceBitMap_<TScoreValue>::VERTICAL,
+                              TraceBitMap_<TScoreValue>::VERTICAL_OPEN,
+                              TTracebackConfig());
+    // Ignore horizontal direction in lower diagonal.
+    _horizontalScoreOfCell(current) = DPCellDefaultInfinity<DPCell_<TScoreValue, AffineGaps> >::VALUE;
+
+    // Compute diagonal direction and compare with vertical.
+    tv = _maxScore(_scoreOfCell(current),
+                   _scoreOfCell(previousDiagonal) + score(scoringScheme, seqHVal, seqVVal),
+                   _verticalScoreOfCell(previousVertical),
+                   tv | TraceBitMap_<TScoreValue>::DIAGONAL,
+                   tv | TraceBitMap_<TScoreValue>::MAX_FROM_VERTICAL_MATRIX,
+                   TTracebackConfig());
+    if (IsLocalAlignment_<TAlgorithm>::VALUE)
     {
-        activeCell._score = activeCell._verticalScore = rightCompare;
-        return rightTrace;
+        tv = _maxScore(_scoreOfCell(current),
+                       TraceBitMap_<TScoreValue>::NONE,
+                       _scoreOfCell(current),
+                       TraceBitMap_<TScoreValue>::NONE,
+                       tv,
+                       TTracebackConfig{});
     }
-    activeCell._score = activeCell._verticalScore;
-    if (activeCell._verticalScore == rightCompare)
-        return leftTrace | rightTrace;
-    return leftTrace;
-}
-
-template <typename TScoreValue, typename TTraceValueL, typename TTraceValueR, typename TGapsPlacement>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TScoreValue> >, typename TraceBitMap_<TScoreValue>::Type)
-_internalComputeScore(DPCell_<TScoreValue, AffineGaps> & activeCell,
-                      TScoreValue const & rightCompare,
-                      TTraceValueL leftTrace,
-                      TTraceValueR rightTrace,
-                      TracebackOn<TracebackConfig_<CompleteTrace, TGapsPlacement> >  const &,
-                      RecursionDirectionVertical const &)
-{
-    TScoreValue cmpG = cmpGt(rightCompare, activeCell._verticalScore);
-    TScoreValue cmpE = cmpEq(rightCompare, activeCell._verticalScore);
-    activeCell._verticalScore = blend(activeCell._verticalScore, rightCompare, cmpG);
-    activeCell._score = activeCell._verticalScore;
-
-    TScoreValue result = leftTrace;
-    result = blend(result, rightTrace, cmpG);
-    return blend(result, leftTrace | rightTrace, cmpE);
+    return tv;
 }
 
 // ----------------------------------------------------------------------------
-// Function _internalComputeScore          [Vertical vs Horizontal, AffineGaps]
+// Function _computeScore                      [RecursionHorizontalDirection]
 // ----------------------------------------------------------------------------
 
-template <typename TScoreValue>
-inline SEQAN_FUNC_ENABLE_IF(Not<Is<SimdVectorConcept<TScoreValue> > >, typename TraceBitMap_<TScoreValue>::Type)
-_internalComputeScore(DPCell_<TScoreValue, AffineGaps> & activeCell,
-                      TracebackOff const &)
-{
-    if(activeCell._score < activeCell._horizontalScore)
-        activeCell._score = activeCell._horizontalScore;
-    return TraceBitMap_<TScoreValue>::NONE;
-}
-
-template <typename TScoreValue>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TScoreValue> >, typename TraceBitMap_<TScoreValue>::Type)
-_internalComputeScore(DPCell_<TScoreValue, AffineGaps> & activeCell,
-                      TracebackOff const &)
-{
-    activeCell._score = blend(activeCell._score, activeCell._horizontalScore,
-                              cmpGt(activeCell._horizontalScore, activeCell._score));
-    return TraceBitMap_<TScoreValue>::NONE;
-}
-
-template <typename TScoreValue, typename TGapsPlacement>
-inline SEQAN_FUNC_ENABLE_IF(Not<Is<SimdVectorConcept<TScoreValue> > >, typename TraceBitMap_<TScoreValue>::Type)
-_internalComputeScore(DPCell_<TScoreValue, AffineGaps> & activeCell,
-                      TracebackOn<TracebackConfig_<SingleTrace, TGapsPlacement> >  const &)
-{
-    if(activeCell._score < activeCell._horizontalScore)
-    {
-        activeCell._score = activeCell._horizontalScore;
-        return TraceBitMap_<TScoreValue>::MAX_FROM_HORIZONTAL_MATRIX;
-    }
-    return TraceBitMap_<TScoreValue>::MAX_FROM_VERTICAL_MATRIX;
-}
-
-template <typename TScoreValue, typename TGapsPlacement>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TScoreValue> >, typename TraceBitMap_<TScoreValue>::Type)
-_internalComputeScore(DPCell_<TScoreValue, AffineGaps> & activeCell,
-                      TracebackOn<TracebackConfig_<SingleTrace, TGapsPlacement> >  const &)
-{
-    TScoreValue cmp = cmpGt(activeCell._horizontalScore, activeCell._score);
-    activeCell._score = blend(activeCell._score, activeCell._horizontalScore, cmp);
-    return blend(TraceBitMap_<TScoreValue>::MAX_FROM_VERTICAL_MATRIX,
-                 TraceBitMap_<TScoreValue>::MAX_FROM_HORIZONTAL_MATRIX,
-                 cmp);
-}
-
-template <typename TScoreValue, typename TGapsPlacement>
-inline SEQAN_FUNC_ENABLE_IF(Not<Is<SimdVectorConcept<TScoreValue> > >, typename TraceBitMap_<TScoreValue>::Type)
-_internalComputeScore(DPCell_<TScoreValue, AffineGaps> & activeCell,
-                      TracebackOn<TracebackConfig_<CompleteTrace, TGapsPlacement> >  const &)
+template <typename TScoreValue,
+          typename TSequenceHValue, typename TSequenceVValue, typename TScoringScheme,
+          typename TAlgorithm, typename TTracebackConfig, typename TExecPolicy>
+inline typename TraceBitMap_<TScoreValue>::Type
+_computeScore(DPCell_<TScoreValue, AffineGaps> & current,
+              DPCell_<TScoreValue, AffineGaps> & previousDiagonal,
+              DPCell_<TScoreValue, AffineGaps> const & previousHorizontal,
+              DPCell_<TScoreValue, AffineGaps> & previousVertical,
+              TSequenceHValue const & seqHVal,
+              TSequenceVValue const & seqVVal,
+              TScoringScheme const & scoringScheme,
+              RecursionDirectionHorizontal const &,
+              DPProfile_<TAlgorithm, AffineGaps, TTracebackConfig, TExecPolicy> const &)
 {
-    if(activeCell._score < activeCell._horizontalScore)
+    // Cache previous diagonal value.
+    _scoreOfCell(previousDiagonal) = _scoreOfCell(previousHorizontal);
+    // Compute horizontal direction.
+    auto traceDir = _maxScore(_horizontalScoreOfCell(current),
+                              _horizontalScoreOfCell(previousHorizontal) +
+                                scoreGapExtendHorizontal(scoringScheme, seqHVal, seqVVal),
+                              _scoreOfCell(previousHorizontal) +
+                                scoreGapOpenHorizontal(scoringScheme, seqHVal, seqVVal),
+                              TraceBitMap_<TScoreValue>::HORIZONTAL,
+                              TraceBitMap_<TScoreValue>::HORIZONTAL_OPEN,
+                              TTracebackConfig()) | TraceBitMap_<TScoreValue>::MAX_FROM_HORIZONTAL_MATRIX;
+    // Ignore vertical direction.
+    _verticalScoreOfCell(previousVertical) = DPCellDefaultInfinity<DPCell_<TScoreValue, AffineGaps> >::VALUE;
+    _scoreOfCell(current) = _horizontalScoreOfCell(current);
+
+    if (IsLocalAlignment_<TAlgorithm>::VALUE)
     {
-        activeCell._score = activeCell._horizontalScore;
-        return TraceBitMap_<TScoreValue>::MAX_FROM_HORIZONTAL_MATRIX;
+        traceDir = _maxScore(_scoreOfCell(current),
+                             TraceBitMap_<TScoreValue>::NONE,
+                             _scoreOfCell(current),
+                             TraceBitMap_<TScoreValue>::NONE,
+                             traceDir,
+                             TTracebackConfig{});
     }
-    if (activeCell._score == activeCell._horizontalScore)
-        return TraceBitMap_<TScoreValue>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<TScoreValue>::MAX_FROM_HORIZONTAL_MATRIX;
-    return TraceBitMap_<TScoreValue>::MAX_FROM_VERTICAL_MATRIX;
-}
-
-template <typename TScoreValue, typename TGapsPlacement>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TScoreValue> >, typename TraceBitMap_<TScoreValue>::Type)
-_internalComputeScore(DPCell_<TScoreValue, AffineGaps> & activeCell,
-                      TracebackOn<TracebackConfig_<CompleteTrace, TGapsPlacement> >  const &)
-{
-    TScoreValue cmpG = cmpGt(activeCell._horizontalScore, activeCell._score);
-    TScoreValue cmpE = cmpEq(activeCell._horizontalScore, activeCell._score);
-    activeCell._score = blend(activeCell._score, activeCell._horizontalScore, cmpG);
-
-    return blend(blend(TraceBitMap_<TScoreValue>::MAX_FROM_VERTICAL_MATRIX,
-                       TraceBitMap_<TScoreValue>::MAX_FROM_HORIZONTAL_MATRIX,
-                       cmpG),
-                 TraceBitMap_<TScoreValue>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<TScoreValue>::MAX_FROM_HORIZONTAL_MATRIX,
-                 cmpE);
-}
-
-// ----------------------------------------------------------------------------
-// Function _doComputeScore                 [RecursionAllDirection, AffineGaps]
-// ----------------------------------------------------------------------------
-
-template <typename TScoreValue, typename TSequenceHValue, typename TSequenceVValue, typename TScoringScheme,
-          typename TAlgorithm, typename TTracebackConfig>
-inline typename TraceBitMap_<TScoreValue>::Type
-_doComputeScore(DPCell_<TScoreValue, AffineGaps> & activeCell,
-                DPCell_<TScoreValue, AffineGaps> const & previousDiagonal,
-                DPCell_<TScoreValue, AffineGaps> const & previousHorizontal,
-                DPCell_<TScoreValue, AffineGaps> const & previousVertical,
-                TSequenceHValue const & seqHVal,
-                TSequenceVValue const & seqVVal,
-                TScoringScheme const & scoringScheme,
-                RecursionDirectionAll const &,
-                DPProfile_<TAlgorithm, AffineGaps, TTracebackConfig> const &)
-{
-    typedef typename TraceBitMap_<TScoreValue>::Type TTraceValue;
-
-    // Now we have to find a smart version to solve this problem. Which is not as easy I would think.
-    activeCell._horizontalScore = _horizontalScoreOfCell(previousHorizontal) + scoreGapExtendHorizontal(scoringScheme, seqHVal, seqVVal);
-    TScoreValue tmpScore = _scoreOfCell(previousHorizontal) + scoreGapOpenHorizontal(scoringScheme, seqHVal, seqVVal);
-    TTraceValue tvGap = _internalComputeScore(activeCell,
-                                              tmpScore,
-                                              TraceBitMap_<TScoreValue>::HORIZONTAL,
-                                              TraceBitMap_<TScoreValue>::HORIZONTAL_OPEN,
-                                              TTracebackConfig(),
-                                              RecursionDirectionHorizontal());
-
-    // Now we can decide for the optimal score in horizontal score or not?
-    activeCell._verticalScore = _verticalScoreOfCell(previousVertical) + scoreGapExtendVertical(scoringScheme, seqHVal, seqVVal);
-    tmpScore = _scoreOfCell(previousVertical) + scoreGapOpenVertical(scoringScheme, seqHVal, seqVVal);
-    tvGap |= _internalComputeScore(activeCell,
-                                   tmpScore,
-                                   TraceBitMap_<TScoreValue>::VERTICAL,
-                                   TraceBitMap_<TScoreValue>::VERTICAL_OPEN,
-                                   TTracebackConfig(),
-                                   RecursionDirectionVertical());
-
-    // Finds the maximum between the vertical and the horizontal matrix. Stores the flag for coming from a potential direction.
-    TTraceValue tvMax = _internalComputeScore(activeCell, TTracebackConfig());  // Stores from where the maximal score comes.
-    tmpScore = _scoreOfCell(previousDiagonal) + score(scoringScheme, seqHVal, seqVVal);
-    return _internalComputeScore(activeCell, tmpScore, tvGap, tvMax, TTracebackConfig(), RecursionDirectionDiagonal());
-}
-
-// ----------------------------------------------------------------------------
-// Function _doComputeScore       [RecursionUpperDiagonalDirection, AffineGaps]
-// ----------------------------------------------------------------------------
-
-template <typename TScoreValue, typename TSequenceHValue, typename TSequenceVValue, typename TScoringScheme,
-          typename TAlgorithm, typename TTracebackConfig>
-inline typename TraceBitMap_<TScoreValue>::Type
-_doComputeScore(DPCell_<TScoreValue, AffineGaps> & activeCell,
-                DPCell_<TScoreValue, AffineGaps> const & previousDiagonal,
-                DPCell_<TScoreValue, AffineGaps> const & previousHorizontal,
-                DPCell_<TScoreValue, AffineGaps> const & /*previousVertical*/,
-                TSequenceHValue const & seqHVal,
-                TSequenceVValue const & seqVVal,
-                TScoringScheme const & scoringScheme,
-                RecursionDirectionUpperDiagonal const &,
-                DPProfile_<TAlgorithm, AffineGaps, TTracebackConfig> const &)
-{
-    typedef typename TraceBitMap_<TScoreValue>::Type TTraceValue;
-
-    activeCell._horizontalScore = _horizontalScoreOfCell(previousHorizontal) + scoreGapExtendHorizontal(scoringScheme, seqHVal, seqVVal);
-    activeCell._verticalScore = DPCellDefaultInfinity<DPCell_<TScoreValue, AffineGaps> >::VALUE;
-    TScoreValue tmpScore = _scoreOfCell(previousHorizontal) + scoreGapOpenHorizontal(scoringScheme, seqHVal, seqVVal);
-    TTraceValue tv = _internalComputeScore(activeCell,
-                                           tmpScore,
-                                           TraceBitMap_<TScoreValue>::HORIZONTAL,
-                                           TraceBitMap_<TScoreValue>::HORIZONTAL_OPEN,
-                                           TTracebackConfig(),
-                                           RecursionDirectionHorizontal());
-    tmpScore = _scoreOfCell(previousDiagonal) + score(scoringScheme, seqHVal, seqVVal);
-    return _internalComputeScore(activeCell,
-                                 tmpScore,
-                                 tv,
-                                 TraceBitMap_<TScoreValue>::MAX_FROM_HORIZONTAL_MATRIX,
-                                 TTracebackConfig(),
-                                 RecursionDirectionDiagonal());
+    _scoreOfCell(previousVertical) = _scoreOfCell(current);
+    return traceDir;
 }
 
 // ----------------------------------------------------------------------------
-// Function _doComputeScore       [RecursionDirectionLowerDiagonal, AffineGaps]
+// Function _computeScore                        [RecursionVerticalDirection]
 // ----------------------------------------------------------------------------
 
-template <typename TScoreValue, typename TSequenceHValue, typename TSequenceVValue, typename TScoringScheme,
-          typename TAlgorithm, typename TTracebackConfig>
+template <typename TScoreValue,
+          typename TSequenceHValue, typename TSequenceVValue, typename TScoringScheme,
+          typename TAlgorithm, typename TTracebackConfig, typename TExecPolicy>
 inline typename TraceBitMap_<TScoreValue>::Type
-_doComputeScore(DPCell_<TScoreValue, AffineGaps> & activeCell,
-                DPCell_<TScoreValue, AffineGaps> const & previousDiagonal,
-                DPCell_<TScoreValue, AffineGaps> const & /*previousHorizontal*/,
-                DPCell_<TScoreValue, AffineGaps> const & previousVertical,
-                TSequenceHValue const & seqHVal,
-                TSequenceVValue const & seqVVal,
-                TScoringScheme const & scoringScheme,
-                RecursionDirectionLowerDiagonal const &,
-                DPProfile_<TAlgorithm, AffineGaps, TTracebackConfig> const &)
+_computeScore(DPCell_<TScoreValue, AffineGaps> & current,
+              DPCell_<TScoreValue, AffineGaps> const & /*previousDiagonal*/,
+              DPCell_<TScoreValue, AffineGaps> const & /*previousHorizontal*/,
+              DPCell_<TScoreValue, AffineGaps> & previousVertical,
+              TSequenceHValue const & seqHVal,
+              TSequenceVValue const & seqVVal,
+              TScoringScheme const & scoringScheme,
+              RecursionDirectionVertical const &,
+              DPProfile_<TAlgorithm, AffineGaps, TTracebackConfig, TExecPolicy> const &)
 {
-    typedef typename TraceBitMap_<TScoreValue>::Type TTraceValue;
-
-    activeCell._verticalScore = _verticalScoreOfCell(previousVertical) + scoreGapExtendVertical(scoringScheme, seqHVal, seqVVal);
-    TScoreValue tmpScore = _scoreOfCell(previousVertical) + scoreGapOpenVertical(scoringScheme, seqHVal, seqVVal);
-
-    activeCell._horizontalScore = DPCellDefaultInfinity<DPCell_<TScoreValue, AffineGaps> >::VALUE;
-    // This computes the difference between the vertical extend and vertical open.
-    TTraceValue tv = _internalComputeScore(activeCell,
-                                           tmpScore,
-                                           TraceBitMap_<TScoreValue>::VERTICAL,
-                                           TraceBitMap_<TScoreValue>::VERTICAL_OPEN,
-                                           TTracebackConfig(),
-                                           RecursionDirectionVertical());
-
-    // Up to here, activeCell stores the highest value of vertical or vertical open.
-    tmpScore = _scoreOfCell(previousDiagonal) + score(scoringScheme, seqHVal, seqVVal);
-    return _internalComputeScore(activeCell,
-                                 tmpScore,
-                                 tv,
-                                 TraceBitMap_<TScoreValue>::MAX_FROM_VERTICAL_MATRIX,
-                                 TTracebackConfig(),
-                                 RecursionDirectionDiagonal());  // Now we have this problem. How do we determine if the max comes from the vertical distance.
-}
-
-// ----------------------------------------------------------------------------
-// Function _doComputeScore                      [RecursionHorizontalDirection]
-// ----------------------------------------------------------------------------
-
-template <typename TScoreValue, typename TSequenceHValue, typename TSequenceVValue, typename TScoringScheme,
-          typename TAlgorithm, typename TTracebackConfig>
-inline typename TraceBitMap_<TScoreValue>::Type
-_doComputeScore(DPCell_<TScoreValue, AffineGaps> & activeCell,
-                DPCell_<TScoreValue, AffineGaps> const & /*previousDiagonal*/,
-                DPCell_<TScoreValue, AffineGaps> const & previousHorizontal,
-                DPCell_<TScoreValue, AffineGaps> const & /*previousVertical*/,
-                TSequenceHValue const & seqHVal,
-                TSequenceVValue const & seqVVal,
-                TScoringScheme const & scoringScheme,
-                RecursionDirectionHorizontal const &,
-                DPProfile_<TAlgorithm, AffineGaps, TTracebackConfig> const &)
-{
-    TScoreValue tmpGapOpenHorizontal = _scoreOfCell(previousHorizontal) + scoreGapOpenHorizontal(scoringScheme, seqHVal, seqVVal);
-    activeCell._horizontalScore = _horizontalScoreOfCell(previousHorizontal) + scoreGapExtendHorizontal(scoringScheme, seqHVal, seqVVal);
-
-    activeCell._verticalScore = DPCellDefaultInfinity<DPCell_<TScoreValue, AffineGaps> >::VALUE;
-    return _internalComputeScore(activeCell,
-                                tmpGapOpenHorizontal,
-                                TraceBitMap_<TScoreValue>::HORIZONTAL,
-                                TraceBitMap_<TScoreValue>::HORIZONTAL_OPEN,
-                                TTracebackConfig(),
-                                RecursionDirectionHorizontal()) | TraceBitMap_<TScoreValue>::MAX_FROM_HORIZONTAL_MATRIX;
-}
-
-// ----------------------------------------------------------------------------
-// Function _doComputeScore                        [RecursionVerticalDirection]
-// ----------------------------------------------------------------------------
-
-template <typename TScoreValue, typename TSequenceHValue, typename TSequenceVValue, typename TScoringScheme,
-          typename TAlgorithm, typename TTracebackConfig>
-inline typename TraceBitMap_<TScoreValue>::Type
-_doComputeScore(DPCell_<TScoreValue, AffineGaps> & activeCell,
-                DPCell_<TScoreValue, AffineGaps> const & /*previousDiagonal*/,
-                DPCell_<TScoreValue, AffineGaps> const & /*previousHorizontal*/,
-                DPCell_<TScoreValue, AffineGaps> const & previousVertical,
-                TSequenceHValue const & seqHVal,
-                TSequenceVValue const & seqVVal,
-                TScoringScheme const & scoringScheme,
-                RecursionDirectionVertical const &,
-                DPProfile_<TAlgorithm, AffineGaps, TTracebackConfig> const &)
-{
-    TScoreValue tmpGapOpenVertical = _scoreOfCell(previousVertical) + scoreGapOpenVertical(scoringScheme, seqHVal, seqVVal);
-    activeCell._verticalScore = _verticalScoreOfCell(previousVertical) + scoreGapExtendVertical(scoringScheme, seqHVal, seqVVal);
-
-    // Here we distinguish between vertical and vertical open.
-    activeCell._horizontalScore = DPCellDefaultInfinity<DPCell_<TScoreValue, AffineGaps> >::VALUE;
-    return _internalComputeScore(activeCell,
-                                 tmpGapOpenVertical,
-                                 TraceBitMap_<TScoreValue>::VERTICAL,
-                                 TraceBitMap_<TScoreValue>::VERTICAL_OPEN,
-                                 TTracebackConfig(),
-                                 RecursionDirectionVertical()) | TraceBitMap_<TScoreValue>::MAX_FROM_VERTICAL_MATRIX;
+    // Compute vertical direction.
+    auto traceDir = _maxScore(_verticalScoreOfCell(previousVertical),
+                              _verticalScoreOfCell(previousVertical) +
+                                scoreGapExtendVertical(scoringScheme, seqHVal, seqVVal),
+                              _scoreOfCell(previousVertical) +
+                                scoreGapOpenVertical(scoringScheme, seqHVal, seqVVal),
+                              TraceBitMap_<TScoreValue>::VERTICAL,
+                              TraceBitMap_<TScoreValue>::VERTICAL_OPEN,
+                              TTracebackConfig()) | TraceBitMap_<TScoreValue>::MAX_FROM_VERTICAL_MATRIX;
+    // Ignore horizontal direction.
+    _horizontalScoreOfCell(current) = DPCellDefaultInfinity<DPCell_<TScoreValue, AffineGaps> >::VALUE;
+    _scoreOfCell(current) = _verticalScoreOfCell(previousVertical);
+
+    if (IsLocalAlignment_<TAlgorithm>::VALUE)
+    {
+        traceDir = _maxScore(_scoreOfCell(current),
+                             TraceBitMap_<TScoreValue>::NONE,
+                             _scoreOfCell(current),
+                             TraceBitMap_<TScoreValue>::NONE,
+                             traceDir,
+                             TTracebackConfig{});
+    }
+    _scoreOfCell(previousVertical) = _scoreOfCell(current);
+    return traceDir;
 }
 
 }  // namespace seqan
diff --git a/include/seqan/align/dp_formula_dynamic.h b/include/seqan/align/dp_formula_dynamic.h
index 1c8fe8b..d87b229 100644
--- a/include/seqan/align/dp_formula_dynamic.h
+++ b/include/seqan/align/dp_formula_dynamic.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -88,7 +88,7 @@ _internalComputeScore(DPCell_<TScoreValue, DynamicGaps> & activeCell,
                       TracebackOff const &,
                       RecursionDirectionDiagonal const &)
 {
-    TScoreValue cmp = cmpGt(diagCompare, _scoreOfCell(activeCell));
+    auto cmp = cmpGt(diagCompare, _scoreOfCell(activeCell));
     activeCell._score = blend(activeCell._score, diagCompare, cmp);
     setGapExtension(activeCell, False(), False(), cmp);
     return TraceBitMap_<TScoreValue>::NONE;
@@ -121,7 +121,7 @@ _internalComputeScore(DPCell_<TScoreValue, DynamicGaps> & activeCell,
                       TracebackOn<TracebackConfig_<SingleTrace, TGapsPlacement> > const &,
                       RecursionDirectionDiagonal const &)
 {
-    TScoreValue cmp = cmpGt(_scoreOfCell(activeCell), diagCompare);
+    auto cmp = cmpGt(_scoreOfCell(activeCell), diagCompare);
     activeCell._score = blend(diagCompare, activeCell._score, cmp);
     setGapExtension(activeCell, False(), False(), cmp);
     return blend(TraceBitMap_<TScoreValue>::DIAGONAL | leftTrace,
@@ -159,7 +159,7 @@ _internalComputeScore(DPCell_<TScoreValue, DynamicGaps> & activeCell,
                       TracebackOn<TracebackConfig_<CompleteTrace, TGapsPlacement> >  const &,
                       RecursionDirectionDiagonal const &)
 {
-    TScoreValue cmp = cmpGt(diagCompare, _scoreOfCell(activeCell));
+    auto cmp = cmpGt(diagCompare, _scoreOfCell(activeCell));
     activeCell._score = blend(activeCell._score, diagCompare, cmp);
     setGapExtension(activeCell, False(), False(), cmp);
     return blend(blend(leftTrace | gapTrace,
@@ -298,7 +298,7 @@ _internalComputeScore(DPCell_<TScoreValue, DynamicGaps> & activeCell,
                       TracebackOn<TTraceConfig> const &,
                       RecursionDirectionVertical const &)
 {
-    TScoreValue cmp = isGapExtension(prevCell, DynamicGapExtensionVertical());
+    auto cmp = isGapExtension(prevCell, DynamicGapExtensionVertical());
     activeCell._score = blend(_scoreOfCell(prevCell) + scoreGapOpenVertical(score, valH, valV), activeCell._score, cmp);
     return blend(TraceBitMap_<TScoreValue>::VERTICAL_OPEN,
                  TraceBitMap_<TScoreValue>::VERTICAL,
@@ -331,7 +331,7 @@ _internalComputeScore(DPCell_<TScoreValue, DynamicGaps> & activeCell,
                       TScoreValue const & horizontalComp,
                       TracebackOff const &)
 {
-    TScoreValue cmp = cmpGt(horizontalComp, _scoreOfCell(activeCell));
+    auto cmp = cmpGt(horizontalComp, _scoreOfCell(activeCell));
     activeCell._score = blend(activeCell._score, horizontalComp, cmp);
     setGapExtension(activeCell, False(), True(), cmp);
     setGapExtension(activeCell, True(), False(), cmpEq(cmp, TraceBitMap_<TScoreValue>::NONE));
@@ -360,7 +360,7 @@ _internalComputeScore(DPCell_<TScoreValue, DynamicGaps> & activeCell,
                       TScoreValue const & horizontalComp,
                       TracebackOn<TracebackConfig_<SingleTrace, TGapsPlacement> >  const &)
 {
-    TScoreValue cmp = cmpGt(horizontalComp, _scoreOfCell(activeCell));
+    auto cmp = cmpGt(horizontalComp, _scoreOfCell(activeCell));
     activeCell._score = blend(activeCell._score, horizontalComp, cmp);
     setGapExtension(activeCell, False(), True(), cmp);
     setGapExtension(activeCell, True(), False(), cmpEq(cmp, TraceBitMap_<TScoreValue>::NONE));
@@ -396,8 +396,8 @@ _internalComputeScore(DPCell_<TScoreValue, DynamicGaps> & activeCell,
                       TScoreValue const & horizontalComp,
                       TracebackOn<TracebackConfig_<CompleteTrace, TGapsPlacement> >  const &)
 {
-    TScoreValue cmpG = cmpGt(horizontalComp, _scoreOfCell(activeCell));
-    TScoreValue cmpE = cmpEq(horizontalComp, _scoreOfCell(activeCell));
+    auto cmpG = cmpGt(horizontalComp, _scoreOfCell(activeCell));
+    auto cmpE = cmpEq(horizontalComp, _scoreOfCell(activeCell));
     setGapExtension(activeCell, True(), False(), createVector<TScoreValue>(-1));
     setGapExtension(activeCell, False(), True(), cmpG);
     setGapExtension(activeCell, True(), True(), cmpE);
@@ -413,25 +413,30 @@ _internalComputeScore(DPCell_<TScoreValue, DynamicGaps> & activeCell,
 }
 
 // ----------------------------------------------------------------------------
-// Function _doComputeScore                 [RecursionAllDirection, DynamicGaps]
+// Function _computeScore                 [RecursionAllDirection, DynamicGaps]
 // ----------------------------------------------------------------------------
 
 template <typename TScoreValue, typename TSequenceHValue, typename TSequenceVValue, typename TScoringScheme,
-          typename TAlgorithm, typename TTracebackConfig>
-inline SEQAN_FUNC_ENABLE_IF(Not<Is<SimdVectorConcept<TScoreValue> > >, typename TraceBitMap_<TScoreValue>::Type)
-_doComputeScore(DPCell_<TScoreValue, DynamicGaps> & activeCell,
-                DPCell_<TScoreValue, DynamicGaps> const & previousDiagonal,
-                DPCell_<TScoreValue, DynamicGaps> const & previousHorizontal,
-                DPCell_<TScoreValue, DynamicGaps> const & previousVertical,
-                TSequenceHValue const & seqHVal,
-                TSequenceVValue const & seqVVal,
-                TScoringScheme const & scoringScheme,
-                RecursionDirectionAll const &,
-                DPProfile_<TAlgorithm, DynamicGaps, TTracebackConfig> const &)
+          typename TAlgorithm, typename TTracebackConfig, typename TExecPolicy>
+inline typename TraceBitMap_<TScoreValue>::Type
+_computeScore(DPCell_<TScoreValue, DynamicGaps> & activeCell,
+              DPCell_<TScoreValue, DynamicGaps> & previousDiagonal,
+              DPCell_<TScoreValue, DynamicGaps> const & previousHorizontal,
+              DPCell_<TScoreValue, DynamicGaps> & previousVertical,
+              TSequenceHValue const & seqHVal,
+              TSequenceVValue const & seqVVal,
+              TScoringScheme const & scoringScheme,
+              RecursionDirectionAll const &,
+              DPProfile_<TAlgorithm, DynamicGaps, TTracebackConfig, TExecPolicy> const &)
 {
     typedef typename TraceBitMap_<TScoreValue>::Type TTraceValue;
-    typedef typename std::decay<decltype(activeCell)>::type TCell;
+    typedef DPCell_<TScoreValue, DynamicGaps> TCell;
 
+    // Compute intermediate diagonal result.
+    TScoreValue intermediate = static_cast<TScoreValue>(_scoreOfCell(previousDiagonal) +
+                                                        score(scoringScheme, seqHVal, seqVVal));
+    // Cache previous Diagonal
+    _scoreOfCell(previousDiagonal) = _scoreOfCell(previousHorizontal);
     // Compute best alignment from either horizontal open or extension.
     TCell tmpScore(_scoreOfCell(previousHorizontal) + scoreGapExtendHorizontal(scoringScheme, seqHVal, seqVVal));
     TTraceValue tvGap = _internalComputeScore(tmpScore, previousHorizontal, seqHVal, seqVVal, scoringScheme,
@@ -444,61 +449,45 @@ _doComputeScore(DPCell_<TScoreValue, DynamicGaps> & activeCell,
 
     // Finds the maximum between the vertical and the horizontal matrix. Stores the flag for coming from a potential direction.
     TTraceValue tvMax = _internalComputeScore(activeCell, tmpScore._score, TTracebackConfig());  // Stores from where the maximal score comes.
-    tmpScore._score = _scoreOfCell(previousDiagonal) + score(scoringScheme, seqHVal, seqVVal);
-    return _internalComputeScore(activeCell, tmpScore._score, tvGap, tvMax, TTracebackConfig(), RecursionDirectionDiagonal());
-}
+    tmpScore._score = intermediate;
+    tvMax = _internalComputeScore(activeCell, tmpScore._score, tvGap, tvMax, TTracebackConfig(), RecursionDirectionDiagonal());
 
-template <typename TScoreValue, typename TSequenceHValue, typename TSequenceVValue, typename TScoringScheme,
-          typename TAlgorithm, typename TTracebackConfig>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TScoreValue> >, typename TraceBitMap_<TScoreValue>::Type)
-_doComputeScore(DPCell_<TScoreValue, DynamicGaps> & activeCell,
-                DPCell_<TScoreValue, DynamicGaps> const & previousDiagonal,
-                DPCell_<TScoreValue, DynamicGaps> const & previousHorizontal,
-                DPCell_<TScoreValue, DynamicGaps> const & previousVertical,
-                TSequenceHValue const & seqHVal,
-                TSequenceVValue const & seqVVal,
-                TScoringScheme const & scoringScheme,
-                RecursionDirectionAll const &,
-                DPProfile_<TAlgorithm, DynamicGaps, TTracebackConfig> const &)
-{
-    typedef typename TraceBitMap_<TScoreValue>::Type TTraceValue;
-    typedef typename std::decay<decltype(activeCell)>::type TCell;
-
-    // Compute best alignment from either horizontal open or extension.
-    TCell tmpScore = {_scoreOfCell(previousHorizontal) + scoreGapExtendHorizontal(scoringScheme, seqHVal, seqVVal),
-                      typename TCell::TFlagMaskType()};
-    TTraceValue tvGap = _internalComputeScore(tmpScore, previousHorizontal, seqHVal, seqVVal, scoringScheme,
-                                              TTracebackConfig(), RecursionDirectionHorizontal());
-
-    // Compute best alignment between vertical and vertical open gap.
-    activeCell._score = _scoreOfCell(previousVertical) + scoreGapExtendVertical(scoringScheme, seqHVal, seqVVal);
-    tvGap |= _internalComputeScore(activeCell, previousVertical, seqHVal, seqVVal, scoringScheme,
-                                   TTracebackConfig(), RecursionDirectionVertical());
-
-    // Finds the maximum between the vertical and the horizontal matrix. Stores the flag for coming from a potential direction.
-    TTraceValue tvMax = _internalComputeScore(activeCell, tmpScore._score, TTracebackConfig());  // Stores from where the maximal score comes.
-    tmpScore._score = _scoreOfCell(previousDiagonal) + score(scoringScheme, seqHVal, seqVVal);
-    return _internalComputeScore(activeCell, tmpScore._score, tvGap, tvMax, TTracebackConfig(), RecursionDirectionDiagonal());
+    if (IsLocalAlignment_<TAlgorithm>::VALUE)
+    {
+        tvMax = _maxScore(_scoreOfCell(activeCell),
+                          TraceBitMap_<TScoreValue>::NONE,
+                          _scoreOfCell(activeCell),
+                          TraceBitMap_<TScoreValue>::NONE,
+                          tvMax,
+                          TTracebackConfig{});
+    }
+    previousVertical = activeCell;
+    return tvMax;
 }
 
 // ----------------------------------------------------------------------------
-// Function _doComputeScore       [RecursionUpperDiagonalDirection, DynamicGaps]
+// Function _computeScore       [RecursionUpperDiagonalDirection, DynamicGaps]
 // ----------------------------------------------------------------------------
 
 template <typename TScoreValue, typename TSequenceHValue, typename TSequenceVValue, typename TScoringScheme,
-          typename TAlgorithm, typename TTracebackConfig>
-inline SEQAN_FUNC_ENABLE_IF(Not<Is<SimdVectorConcept<TScoreValue> > >, typename TraceBitMap_<TScoreValue>::Type)
-_doComputeScore(DPCell_<TScoreValue, DynamicGaps> & activeCell,
-                DPCell_<TScoreValue, DynamicGaps> const & previousDiagonal,
-                DPCell_<TScoreValue, DynamicGaps> const & previousHorizontal,
-                DPCell_<TScoreValue, DynamicGaps> const & /*previousVertical*/,
-                TSequenceHValue const & seqHVal,
-                TSequenceVValue const & seqVVal,
-                TScoringScheme const & scoringScheme,
-                RecursionDirectionUpperDiagonal const &,
-                DPProfile_<TAlgorithm, DynamicGaps, TTracebackConfig> const &)
+          typename TAlgorithm, typename TTracebackConfig, typename TExecPolicy>
+typename TraceBitMap_<TScoreValue>::Type
+_computeScore(DPCell_<TScoreValue, DynamicGaps> & activeCell,
+              DPCell_<TScoreValue, DynamicGaps> & previousDiagonal,
+              DPCell_<TScoreValue, DynamicGaps> const & previousHorizontal,
+              DPCell_<TScoreValue, DynamicGaps> & previousVertical,
+              TSequenceHValue const & seqHVal,
+              TSequenceVValue const & seqVVal,
+              TScoringScheme const & scoringScheme,
+              RecursionDirectionUpperDiagonal const &,
+              DPProfile_<TAlgorithm, DynamicGaps, TTracebackConfig, TExecPolicy> const &)
 {
     typedef typename TraceBitMap_<TScoreValue>::Type TTraceValue;
+    // Compute intermediate diagonal result.
+    TScoreValue intermediate = static_cast<TScoreValue>(_scoreOfCell(previousDiagonal) +
+                                                        score(scoringScheme, seqHVal, seqVVal));
+    // Cache previous Diagonal
+    _scoreOfCell(previousDiagonal) = _scoreOfCell(previousHorizontal);
 
     // This computes the difference between the horizontal extend and horizontal open.
     activeCell._score = _scoreOfCell(previousHorizontal) + scoreGapExtendHorizontal(scoringScheme, seqHVal, seqVVal);
@@ -506,58 +495,38 @@ _doComputeScore(DPCell_<TScoreValue, DynamicGaps> & activeCell,
                                            TTracebackConfig(), RecursionDirectionHorizontal());
 
     setGapExtension(activeCell, False(), True());
-    TScoreValue tmpScore = _scoreOfCell(previousDiagonal) + score(scoringScheme, seqHVal, seqVVal);
-    return _internalComputeScore(activeCell, tmpScore, tv, TraceBitMap_<TScoreValue>::MAX_FROM_HORIZONTAL_MATRIX,
-                                 TTracebackConfig(),RecursionDirectionDiagonal());
-}
-
-
-template <typename TScoreValue, typename TSequenceHValue, typename TSequenceVValue, typename TScoringScheme,
-          typename TAlgorithm, typename TTracebackConfig>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TScoreValue> >, typename TraceBitMap_<TScoreValue>::Type)
-_doComputeScore(DPCell_<TScoreValue, DynamicGaps> & activeCell,
-                DPCell_<TScoreValue, DynamicGaps> const & previousDiagonal,
-                DPCell_<TScoreValue, DynamicGaps> const & previousHorizontal,
-                DPCell_<TScoreValue, DynamicGaps> const & /*previousVertical*/,
-                TSequenceHValue const & seqHVal,
-                TSequenceVValue const & seqVVal,
-                TScoringScheme const & scoringScheme,
-                RecursionDirectionUpperDiagonal const &,
-                DPProfile_<TAlgorithm, DynamicGaps, TTracebackConfig> const &)
-{
-    typedef typename TraceBitMap_<TScoreValue>::Type TTraceValue;
-
-    // This computes the difference between the horizontal extend and horizontal open.
-    activeCell._score = _scoreOfCell(previousHorizontal) + scoreGapExtendHorizontal(scoringScheme, seqHVal, seqVVal);
-    TTraceValue tv = _internalComputeScore(activeCell, previousHorizontal, seqHVal, seqVVal, scoringScheme,
-                                           TTracebackConfig(), RecursionDirectionHorizontal());
+    tv = _internalComputeScore(activeCell, intermediate, tv, TraceBitMap_<TScoreValue>::MAX_FROM_HORIZONTAL_MATRIX,
+                               TTracebackConfig(),RecursionDirectionDiagonal());
 
-    setGapExtension(activeCell, False(), True(), createVector<TScoreValue>(-1));
-    TScoreValue tmpScore = _scoreOfCell(previousDiagonal) + score(scoringScheme, seqHVal, seqVVal);
-    return _internalComputeScore(activeCell,
-                                 tmpScore,
-                                 tv,
-                                 TraceBitMap_<TScoreValue>::MAX_FROM_HORIZONTAL_MATRIX,
-                                 TTracebackConfig(),
-                                 RecursionDirectionDiagonal());
+    if (IsLocalAlignment_<TAlgorithm>::VALUE)
+    {
+        tv = _maxScore(_scoreOfCell(activeCell),
+                       TraceBitMap_<TScoreValue>::NONE,
+                       _scoreOfCell(activeCell),
+                       TraceBitMap_<TScoreValue>::NONE,
+                       tv,
+                       TTracebackConfig{});
+    }
+    previousVertical = activeCell;
+    return tv;
 }
 
 // ----------------------------------------------------------------------------
-// Function _doComputeScore      [RecursionDirectionLowerDiagonal, DynamicGaps]
+// Function _computeScore      [RecursionDirectionLowerDiagonal, DynamicGaps]
 // ----------------------------------------------------------------------------
 
 template <typename TScoreValue, typename TSequenceHValue, typename TSequenceVValue, typename TScoringScheme,
-          typename TAlgorithm, typename TTracebackConfig>
-inline SEQAN_FUNC_ENABLE_IF(Not<Is<SimdVectorConcept<TScoreValue> > >, typename TraceBitMap_<TScoreValue>::Type)
-_doComputeScore(DPCell_<TScoreValue, DynamicGaps> & activeCell,
-                DPCell_<TScoreValue, DynamicGaps> const & previousDiagonal,
-                DPCell_<TScoreValue, DynamicGaps> const & /*previousHorizontal*/,
-                DPCell_<TScoreValue, DynamicGaps> const & previousVertical,
-                TSequenceHValue const & seqHVal,
-                TSequenceVValue const & seqVVal,
-                TScoringScheme const & scoringScheme,
-                RecursionDirectionLowerDiagonal const &,
-                DPProfile_<TAlgorithm, DynamicGaps, TTracebackConfig> const &)
+          typename TAlgorithm, typename TTracebackConfig, typename TExecPolicy>
+inline typename TraceBitMap_<TScoreValue>::Type
+_computeScore(DPCell_<TScoreValue, DynamicGaps> & activeCell,
+              DPCell_<TScoreValue, DynamicGaps> const & previousDiagonal,
+              DPCell_<TScoreValue, DynamicGaps> const & /*previousHorizontal*/,
+              DPCell_<TScoreValue, DynamicGaps> const & previousVertical,
+              TSequenceHValue const & seqHVal,
+              TSequenceVValue const & seqVVal,
+              TScoringScheme const & scoringScheme,
+              RecursionDirectionLowerDiagonal const &,
+              DPProfile_<TAlgorithm, DynamicGaps, TTracebackConfig, TExecPolicy> const &)
 {
     typedef typename TraceBitMap_<TScoreValue>::Type TTraceValue;
 
@@ -567,121 +536,137 @@ _doComputeScore(DPCell_<TScoreValue, DynamicGaps> & activeCell,
                                            TTracebackConfig(), RecursionDirectionVertical());
     setGapExtension(activeCell, True(), False());
     TScoreValue tmpScore = _scoreOfCell(previousDiagonal) + score(scoringScheme, seqHVal, seqVVal);
-    return _internalComputeScore(activeCell, tmpScore, tv, TraceBitMap_<TScoreValue>::MAX_FROM_VERTICAL_MATRIX,
+    tv = _internalComputeScore(activeCell, tmpScore, tv, TraceBitMap_<TScoreValue>::MAX_FROM_VERTICAL_MATRIX,
                                  TTracebackConfig(), RecursionDirectionDiagonal());
-}
-
-template <typename TScoreValue, typename TSequenceHValue, typename TSequenceVValue, typename TScoringScheme,
-          typename TAlgorithm, typename TTracebackConfig>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TScoreValue> >, typename TraceBitMap_<TScoreValue>::Type)
-_doComputeScore(DPCell_<TScoreValue, DynamicGaps> & activeCell,
-                DPCell_<TScoreValue, DynamicGaps> const & previousDiagonal,
-                DPCell_<TScoreValue, DynamicGaps> const & /*previousHorizontal*/,
-                DPCell_<TScoreValue, DynamicGaps> const & previousVertical,
-                TSequenceHValue const & seqHVal,
-                TSequenceVValue const & seqVVal,
-                TScoringScheme const & scoringScheme,
-                RecursionDirectionLowerDiagonal const &,
-                DPProfile_<TAlgorithm, DynamicGaps, TTracebackConfig> const &)
-{
-    typedef typename TraceBitMap_<TScoreValue>::Type TTraceValue;
-
-    // This computes the difference between the vertical extend and vertical open.
-    activeCell._score = _scoreOfCell(previousVertical) + scoreGapExtendVertical(scoringScheme, seqHVal, seqVVal);
-    TTraceValue tv = _internalComputeScore(activeCell, previousVertical, seqHVal, seqVVal, scoringScheme,
-                                           TTracebackConfig(), RecursionDirectionVertical());
-    setGapExtension(activeCell, True(), False(), createVector<TScoreValue>(-1));
-    TScoreValue tmpScore = _scoreOfCell(previousDiagonal) + score(scoringScheme, seqHVal, seqVVal);
-    return _internalComputeScore(activeCell,
-                                 tmpScore,
-                                 tv,
-                                 TraceBitMap_<TScoreValue>::MAX_FROM_VERTICAL_MATRIX,
-                                 TTracebackConfig(),
-                                 RecursionDirectionDiagonal());
+    if (IsLocalAlignment_<TAlgorithm>::VALUE)
+    {
+        tv = _maxScore(_scoreOfCell(activeCell),
+                       TraceBitMap_<TScoreValue>::NONE,
+                       _scoreOfCell(activeCell),
+                       TraceBitMap_<TScoreValue>::NONE,
+                       tv,
+                       TTracebackConfig{});
+    }
+    return tv;
 }
 
 // ----------------------------------------------------------------------------
-// Function _doComputeScore                      [RecursionHorizontalDirection]
+// Function _computeScore                      [RecursionHorizontalDirection]
 // ----------------------------------------------------------------------------
 
 template <typename TScoreValue, typename TSequenceHValue, typename TSequenceVValue, typename TScoringScheme,
-          typename TAlgorithm, typename TTracebackConfig>
-inline SEQAN_FUNC_ENABLE_IF(Not<Is<SimdVectorConcept<TScoreValue> > >, typename TraceBitMap_<TScoreValue>::Type)
-_doComputeScore(DPCell_<TScoreValue, DynamicGaps> & activeCell,
-                DPCell_<TScoreValue, DynamicGaps> const & /*previousDiagonal*/,
-                DPCell_<TScoreValue, DynamicGaps> const & previousHorizontal,
-                DPCell_<TScoreValue, DynamicGaps> const & /*previousVertical*/,
-                TSequenceHValue const & seqHVal,
-                TSequenceVValue const & seqVVal,
-                TScoringScheme const & scoringScheme,
-                RecursionDirectionHorizontal const & tag,
-                DPProfile_<TAlgorithm, DynamicGaps, TTracebackConfig> const &)
+          typename TAlgorithm, typename TTracebackConfig, typename TExecPolicy>
+inline typename TraceBitMap_<TScoreValue>::Type
+_computeScore(DPCell_<TScoreValue, DynamicGaps> & activeCell,
+              DPCell_<TScoreValue, DynamicGaps> & previousDiagonal,
+              DPCell_<TScoreValue, DynamicGaps> const previousHorizontal,  // NOTE(rrahn): We want the copy here. Don't change!!!
+              DPCell_<TScoreValue, DynamicGaps> & previousVertical,
+              TSequenceHValue const & seqHVal,
+              TSequenceVValue const & seqVVal,
+              TScoringScheme const & scoringScheme,
+              RecursionDirectionHorizontal const & tag,
+              DPProfile_<TAlgorithm, DynamicGaps, TTracebackConfig, TExecPolicy> const &)
 {
+    // Cache previous diagonal value.
+    _scoreOfCell(previousDiagonal) = _scoreOfCell(previousHorizontal);
     activeCell._score = _scoreOfCell(previousHorizontal) + scoreGapExtendHorizontal(scoringScheme, seqHVal, seqVVal);
     setGapExtension(activeCell, False(), True());
-    return _internalComputeScore(activeCell, previousHorizontal, seqHVal, seqVVal, scoringScheme,
-                                 TTracebackConfig(), tag) | TraceBitMap_<TScoreValue>::MAX_FROM_HORIZONTAL_MATRIX;
+    auto tv = _internalComputeScore(activeCell, previousHorizontal, seqHVal, seqVVal, scoringScheme,
+                                    TTracebackConfig(), tag) | TraceBitMap_<TScoreValue>::MAX_FROM_HORIZONTAL_MATRIX;
+    previousVertical = activeCell;
+    return tv;
 }
 
+// NOTE(rrahn): Here we copy the previousCellHorizontal as it might refer to the same value as acticeCell.
+// Since we cannot assure here to read the value before we write it, we have to take a copy from it.
 template <typename TScoreValue, typename TSequenceHValue, typename TSequenceVValue, typename TScoringScheme,
-          typename TAlgorithm, typename TTracebackConfig>
+          typename TAlgorithm, typename TTracebackConfig, typename TExecPolicy>
 inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TScoreValue> >, typename TraceBitMap_<TScoreValue>::Type)
-_doComputeScore(DPCell_<TScoreValue, DynamicGaps> & activeCell,
-                DPCell_<TScoreValue, DynamicGaps> const & /*previousDiagonal*/,
-                DPCell_<TScoreValue, DynamicGaps> const & previousHorizontal,
-                DPCell_<TScoreValue, DynamicGaps> const & /*previousVertical*/,
-                TSequenceHValue const & seqHVal,
-                TSequenceVValue const & seqVVal,
-                TScoringScheme const & scoringScheme,
-                RecursionDirectionHorizontal const & tag,
-                DPProfile_<TAlgorithm, DynamicGaps, TTracebackConfig> const &)
+_computeScore(DPCell_<TScoreValue, DynamicGaps> & activeCell,
+              DPCell_<TScoreValue, DynamicGaps> & previousDiagonal,
+              DPCell_<TScoreValue, DynamicGaps> const previousHorizontal, // NOTE(rrahn): Don't change!!!
+              DPCell_<TScoreValue, DynamicGaps> & previousVertical,
+              TSequenceHValue const & seqHVal,
+              TSequenceVValue const & seqVVal,
+              TScoringScheme const & scoringScheme,
+              RecursionDirectionHorizontal const & tag,
+              DPProfile_<TAlgorithm, DynamicGaps, TTracebackConfig, TExecPolicy> const &)
 {
+    // Cache previous diagonal value.
+    _scoreOfCell(previousDiagonal) = _scoreOfCell(previousHorizontal);
     activeCell._score = _scoreOfCell(previousHorizontal) + scoreGapExtendHorizontal(scoringScheme, seqHVal, seqVVal);
     setGapExtension(activeCell, False(), True(), createVector<TScoreValue>(-1));
-    return _internalComputeScore(activeCell, previousHorizontal, seqHVal, seqVVal, scoringScheme,
+    auto tv = _internalComputeScore(activeCell, previousHorizontal, seqHVal, seqVVal, scoringScheme,
                                  TTracebackConfig(), tag) | TraceBitMap_<TScoreValue>::MAX_FROM_HORIZONTAL_MATRIX;
+    previousVertical = activeCell;
+    if (IsLocalAlignment_<TAlgorithm>::VALUE)
+    {
+        tv = _maxScore(_scoreOfCell(activeCell),
+                       TraceBitMap_<TScoreValue>::NONE,
+                       _scoreOfCell(activeCell),
+                       TraceBitMap_<TScoreValue>::NONE,
+                       tv,
+                       TTracebackConfig{});
+    }
+    return tv;
 }
 
 // ----------------------------------------------------------------------------
-// Function _doComputeScore                        [RecursionVerticalDirection]
+// Function _computeScore                        [RecursionVerticalDirection]
 // ----------------------------------------------------------------------------
 
 template <typename TScoreValue, typename TSequenceHValue, typename TSequenceVValue, typename TScoringScheme,
-          typename TAlgorithm, typename TTracebackConfig>
-inline SEQAN_FUNC_ENABLE_IF(Not<Is<SimdVectorConcept<TScoreValue> > >, typename TraceBitMap_<TScoreValue>::Type)
-_doComputeScore(DPCell_<TScoreValue, DynamicGaps> & activeCell,
-                DPCell_<TScoreValue, DynamicGaps> const & /*previousDiagonal*/,
-                DPCell_<TScoreValue, DynamicGaps> const & /*previousHorizontal*/,
-                DPCell_<TScoreValue, DynamicGaps> const & previousVertical,
-                TSequenceHValue const & seqHVal,
-                TSequenceVValue const & seqVVal,
-                TScoringScheme const & scoringScheme,
-                RecursionDirectionVertical const & tag,
-                DPProfile_<TAlgorithm, DynamicGaps, TTracebackConfig> const &)
+          typename TAlgorithm, typename TTracebackConfig, typename TExecPolicy>
+inline typename TraceBitMap_<TScoreValue>::Type
+_computeScore(DPCell_<TScoreValue, DynamicGaps> & activeCell,
+              DPCell_<TScoreValue, DynamicGaps> & /*previousDiagonal*/,
+              DPCell_<TScoreValue, DynamicGaps> const & /*previousHorizontal*/,
+              DPCell_<TScoreValue, DynamicGaps> & previousVertical,
+              TSequenceHValue const & seqHVal,
+              TSequenceVValue const & seqVVal,
+              TScoringScheme const & scoringScheme,
+              RecursionDirectionVertical const & tag,
+              DPProfile_<TAlgorithm, DynamicGaps, TTracebackConfig, TExecPolicy> const &)
 {
     activeCell._score = _scoreOfCell(previousVertical) + scoreGapExtendVertical(scoringScheme, seqHVal, seqVVal);
     setGapExtension(activeCell, True(), False());
-    return _internalComputeScore(activeCell, previousVertical, seqHVal, seqVVal, scoringScheme,
+    auto tv = _internalComputeScore(activeCell, previousVertical, seqHVal, seqVVal, scoringScheme,
                                  TTracebackConfig(), tag) | TraceBitMap_<TScoreValue>::MAX_FROM_VERTICAL_MATRIX;
+    previousVertical = activeCell;
+    if (IsLocalAlignment_<TAlgorithm>::VALUE)
+    {
+        tv = _maxScore(_scoreOfCell(activeCell),
+                       TraceBitMap_<TScoreValue>::NONE,
+                       _scoreOfCell(activeCell),
+                       TraceBitMap_<TScoreValue>::NONE,
+                       tv,
+                       TTracebackConfig{});
+    }
+    return tv;
 }
 
-template <typename TScoreValue, typename TSequenceHValue, typename TSequenceVValue, typename TScoringScheme,
-          typename TAlgorithm, typename TTracebackConfig>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TScoreValue> >, typename TraceBitMap_<TScoreValue>::Type)
-_doComputeScore(DPCell_<TScoreValue, DynamicGaps> & activeCell,
-                DPCell_<TScoreValue, DynamicGaps> const & /*previousDiagonal*/,
-                DPCell_<TScoreValue, DynamicGaps> const & /*previousHorizontal*/,
-                DPCell_<TScoreValue, DynamicGaps> const & previousVertical,
-                TSequenceHValue const & seqHVal,
-                TSequenceVValue const & seqVVal,
-                TScoringScheme const & scoringScheme,
-                RecursionDirectionVertical const & tag,
-                DPProfile_<TAlgorithm, DynamicGaps, TTracebackConfig> const &)
+// Independent of gap cost model.
+template <typename TScoreValue,
+          typename TSequenceHValue,
+          typename TSequenceVValue,
+          typename TScoringScheme,
+          typename TAlgoTag, typename TTraceFlag, typename TExecPolicy>
+inline auto
+_computeScore(DPCell_<TScoreValue, DynamicGaps> & current,
+              DPCell_<TScoreValue, DynamicGaps> & cacheDiagonal,
+              DPCell_<TScoreValue, DynamicGaps> const & /*cacheHorizontal*/,
+              DPCell_<TScoreValue, DynamicGaps> & cacheVertical,
+              TSequenceHValue const & /*seqHVal*/,
+              TSequenceVValue const & /*seqVVal*/,
+              TScoringScheme const & /*scoringScheme*/,
+              RecursionDirectionZero const &,
+              DPProfile_<TAlgoTag, DynamicGaps, TTraceFlag, TExecPolicy> const &)
 {
-    activeCell._score = _scoreOfCell(previousVertical) + scoreGapExtendVertical(scoringScheme, seqHVal, seqVVal);
-    setGapExtension(activeCell, True(), False(), createVector<TScoreValue>(-1));
-    return _internalComputeScore(activeCell, previousVertical, seqHVal, seqVVal, scoringScheme,
-                                 TTracebackConfig(), tag) | TraceBitMap_<TScoreValue>::MAX_FROM_VERTICAL_MATRIX;
+    _scoreOfCell(current) = TraceBitMap_<TScoreValue>::NONE;
+    setGapExtension(current, False(), False());
+    _scoreOfCell(cacheDiagonal) = _scoreOfCell(current);
+    cacheVertical = current;
+    return TraceBitMap_<TScoreValue>::NONE;
 }
 
 }  // namespace seqan
diff --git a/include/seqan/align/dp_formula_linear.h b/include/seqan/align/dp_formula_linear.h
index 45ed936..595009a 100644
--- a/include/seqan/align/dp_formula_linear.h
+++ b/include/seqan/align/dp_formula_linear.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -56,234 +56,200 @@ namespace seqan {
 // ============================================================================
 
 // ----------------------------------------------------------------------------
-// Function _internalComputeScore()
-// ----------------------------------------------------------------------------
-
-template <typename TScoreValue, typename TTraceValueL, typename TTraceValueR>
-inline SEQAN_FUNC_ENABLE_IF(Not<Is<SimdVectorConcept<TScoreValue> > >, typename TraceBitMap_<TScoreValue>::Type)
-_internalComputeScore(DPCell_<TScoreValue, LinearGaps> & activeCell,
-                      TScoreValue const & rightCompare,
-                      TTraceValueL,
-                      TTraceValueR,
-                      TracebackOff const &)
-{
-    if (activeCell._score < rightCompare)
-        activeCell._score = rightCompare;
-    return TraceBitMap_<TScoreValue>::NONE;
-}
-
-template <typename TScoreValue, typename TTraceValueL, typename TTraceValueR>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TScoreValue> >, typename TraceBitMap_<TScoreValue>::Type)
-_internalComputeScore(DPCell_<TScoreValue, LinearGaps> & activeCell,
-                      TScoreValue const & rightCompare,
-                      TTraceValueL,
-                      TTraceValueR,
-                      TracebackOff const &)
-{
-    TScoreValue cmp = cmpGt(rightCompare, activeCell._score);
-    activeCell._score = blend(activeCell._score, rightCompare, cmp);
-    return TraceBitMap_<TScoreValue>::NONE;
-}
-
-template <typename TScoreValue, typename TTraceValueL, typename TTraceValueR, typename TGapsPlacement>
-inline SEQAN_FUNC_ENABLE_IF(Not<Is<SimdVectorConcept<TScoreValue> > >, typename TraceBitMap_<TScoreValue>::Type)
-_internalComputeScore(DPCell_<TScoreValue, LinearGaps> & activeCell,
-                      TScoreValue const & rightCompare,
-                      TTraceValueL leftTrace,
-                      TTraceValueR rightTrace,
-                      TracebackOn<TracebackConfig_<SingleTrace, TGapsPlacement> > const &)
-{
-    if (activeCell._score < rightCompare)
-    {
-        activeCell._score = rightCompare;
-        return rightTrace;
-    }
-    return leftTrace;
-}
-
-template <typename TScoreValue, typename TTraceValueL, typename TTraceValueR, typename TGapsPlacement>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TScoreValue> >, typename TraceBitMap_<TScoreValue>::Type)
-_internalComputeScore(DPCell_<TScoreValue, LinearGaps> & activeCell,
-                      TScoreValue const & rightCompare,
-                      TTraceValueL const & leftTrace,
-                      TTraceValueR const & rightTrace,
-                      TracebackOn<TracebackConfig_<SingleTrace, TGapsPlacement> > const &)
-{
-    TScoreValue cmp = cmpGt(rightCompare, activeCell._score);
-    activeCell._score = blend(activeCell._score, rightCompare, cmp);
-    return blend(leftTrace, rightTrace, cmp);
-}
-
-template <typename TScoreValue, typename TTraceValueL, typename TTraceValueR, typename TGapsPlacement>
-    inline SEQAN_FUNC_ENABLE_IF(Not<Is<SimdVectorConcept<TScoreValue> > >, typename TraceBitMap_<TScoreValue>::Type)
-_internalComputeScore(DPCell_<TScoreValue, LinearGaps> & activeCell,
-                      TScoreValue const & rightCompare,
-                      TTraceValueL leftTrace,
-                      TTraceValueR rightTrace,
-                      TracebackOn<TracebackConfig_<CompleteTrace, TGapsPlacement> > const &)
-{
-    if (activeCell._score < rightCompare)
-    {
-        activeCell._score = rightCompare;
-        return rightTrace;
-    }
-    return (activeCell._score == rightCompare) ? (rightTrace | leftTrace) : (leftTrace);
-}
-
-template <typename TScoreValue, typename TTraceValueL, typename TTraceValueR, typename TGapsPlacement>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TScoreValue> >, typename TraceBitMap_<TScoreValue>::Type)
-_internalComputeScore(DPCell_<TScoreValue, LinearGaps> & activeCell,
-                      TScoreValue const & rightCompare,
-                      TTraceValueL const & leftTrace,
-                      TTraceValueR const & rightTrace,
-                      TracebackOn<TracebackConfig_<CompleteTrace, TGapsPlacement> > const &)
-{
-    // Check for greater values.
-    TScoreValue cmp = cmpGt(activeCell._score, rightCompare);  // cmp greater
-    activeCell._score = blend(rightCompare, activeCell._score, cmp);  // activeCell._score
-
-    // Check for equality.
-    return blend(blend(rightTrace, leftTrace, cmp), leftTrace | rightTrace, cmpEq(rightCompare, activeCell._score));
-}
-
-// ----------------------------------------------------------------------------
-// Function _doComputeScore                 [RecursionDirectionAll, LinearGaps]
+// Function _computeScore                 [RecursionDirectionAll, LinearGaps]
 // ----------------------------------------------------------------------------
 
 template <typename TScoreValue, typename TSequenceHValue, typename TSequenceVValue, typename TScoringScheme,
-          typename TAlgorithm, typename TTracebackConfig>
+          typename TAlgorithm, typename TTracebackConfig, typename TExecPolicy>
 inline typename TraceBitMap_<TScoreValue>::Type
-_doComputeScore(DPCell_<TScoreValue, LinearGaps> & activeCell,
-                DPCell_<TScoreValue, LinearGaps> const & previousDiagonal,
-                DPCell_<TScoreValue, LinearGaps> const & previousHorizontal,
-                DPCell_<TScoreValue, LinearGaps> const & previousVertical,
-                TSequenceHValue const & seqHVal,
-                TSequenceVValue const & seqVVal,
-                TScoringScheme const & scoringScheme,
-                RecursionDirectionAll const &,
-                DPProfile_<TAlgorithm, LinearGaps, TTracebackConfig> const &)
+_computeScore(DPCell_<TScoreValue, LinearGaps> & current,
+              DPCell_<TScoreValue, LinearGaps> & previousDiagonal,
+              DPCell_<TScoreValue, LinearGaps> const & previousHorizontal,
+              DPCell_<TScoreValue, LinearGaps> & previousVertical,
+              TSequenceHValue const & seqHVal,
+              TSequenceVValue const & seqVVal,
+              TScoringScheme const & scoringScheme,
+              RecursionDirectionAll const &,
+              DPProfile_<TAlgorithm, LinearGaps, TTracebackConfig, TExecPolicy> const &)
 {
-    typedef typename TraceBitMap_<TScoreValue>::Type TTraceValue;
-    activeCell._score = _scoreOfCell(previousDiagonal) + score(scoringScheme, seqHVal, seqVVal);
-
-    TScoreValue tmpScore = _scoreOfCell(previousVertical) + scoreGapExtendVertical(scoringScheme, seqHVal, seqVVal);
-
-    TTraceValue tv = _internalComputeScore(activeCell,
-                                           tmpScore,
-                                           TraceBitMap_<TScoreValue>::DIAGONAL,
-                                           TraceBitMap_<TScoreValue>::VERTICAL | TraceBitMap_<TScoreValue>::MAX_FROM_VERTICAL_MATRIX,
-                                           TTracebackConfig());
-    tmpScore = _scoreOfCell(previousHorizontal) + scoreGapExtendHorizontal(scoringScheme, seqHVal, seqVVal);
-    return _internalComputeScore(activeCell,
-                                 tmpScore,
-                                 tv,
-                                 TraceBitMap_<TScoreValue>::HORIZONTAL | TraceBitMap_<TScoreValue>::MAX_FROM_HORIZONTAL_MATRIX,
-                                 TTracebackConfig());
+    // Cache next diagonal.
+    auto intermediate = static_cast<TScoreValue>(_scoreOfCell(previousDiagonal) + score(scoringScheme, seqHVal, seqVVal));
+    previousDiagonal = _scoreOfCell(previousHorizontal);
+
+    auto tv = _maxScore(_scoreOfCell(current),
+                        _scoreOfCell(previousVertical)+
+                            scoreGapExtendVertical(scoringScheme, seqHVal, seqVVal),
+                        _scoreOfCell(previousHorizontal) +
+                            scoreGapExtendHorizontal(scoringScheme, seqHVal, seqVVal),
+                        TraceBitMap_<TScoreValue>::VERTICAL | TraceBitMap_<TScoreValue>::MAX_FROM_VERTICAL_MATRIX,
+                        TraceBitMap_<TScoreValue>::HORIZONTAL | TraceBitMap_<TScoreValue>::MAX_FROM_HORIZONTAL_MATRIX,
+                        TTracebackConfig{});
+    // Compute the intermediate value.
+    tv = _maxScore(_scoreOfCell(current),
+                   intermediate,
+                   _scoreOfCell(current),
+                   TraceBitMap_<TScoreValue>::DIAGONAL,
+                   tv,
+                   TTracebackConfig());
+    if (IsLocalAlignment_<TAlgorithm>::VALUE)
+    {
+        tv = _maxScore(_scoreOfCell(current),
+                       TraceBitMap_<TScoreValue>::NONE,
+                       _scoreOfCell(current),
+                       TraceBitMap_<TScoreValue>::NONE,
+                       tv,
+                       TTracebackConfig{});
+    }
+    previousVertical = current;
+    return tv;
 }
 
 // ----------------------------------------------------------------------------
-// Function _doComputeScore       [RecursionDirectionUpperDiagonal, LinearGaps]
+// Function _computeScore       [RecursionDirectionUpperDiagonal, LinearGaps]
 // ----------------------------------------------------------------------------
 
 template <typename TScoreValue, typename TSequenceHValue, typename TSequenceVValue, typename TScoringScheme,
-          typename TAlgorithm, typename TTracebackConfig>
+          typename TAlgorithm, typename TTracebackConfig, typename TExecPolicy>
 inline typename TraceBitMap_<TScoreValue>::Type
-_doComputeScore(DPCell_<TScoreValue, LinearGaps> & activeCell,
-                DPCell_<TScoreValue, LinearGaps> const & previousDiagonal,
-                DPCell_<TScoreValue, LinearGaps> const & previousHorizontal,
-                DPCell_<TScoreValue, LinearGaps> const & /*previousVertical*/,
-                TSequenceHValue const & seqHVal,
-                TSequenceVValue const & seqVVal,
-                TScoringScheme const & scoringScheme,
-                RecursionDirectionUpperDiagonal const &,
-                DPProfile_<TAlgorithm, LinearGaps, TTracebackConfig> const &)
+_computeScore(DPCell_<TScoreValue, LinearGaps> & current,
+              DPCell_<TScoreValue, LinearGaps> & previousDiagonal,
+              DPCell_<TScoreValue, LinearGaps> const & previousHorizontal,
+              DPCell_<TScoreValue, LinearGaps> & previousVertical,
+              TSequenceHValue const & seqHVal,
+              TSequenceVValue const & seqVVal,
+              TScoringScheme const & scoringScheme,
+              RecursionDirectionUpperDiagonal const &,
+              DPProfile_<TAlgorithm, LinearGaps, TTracebackConfig, TExecPolicy> const &)
 {
-    activeCell._score = _scoreOfCell(previousDiagonal) + score(scoringScheme, seqHVal, seqVVal);
-    TScoreValue tmpScore = _scoreOfCell(previousHorizontal) + scoreGapExtendHorizontal(scoringScheme, seqHVal, seqVVal);
-    return _internalComputeScore(activeCell,
-                                 tmpScore,
-                                 TraceBitMap_<TScoreValue>::DIAGONAL,
-                                 TraceBitMap_<TScoreValue>::HORIZONTAL | TraceBitMap_<TScoreValue>::MAX_FROM_HORIZONTAL_MATRIX,
-                                 TTracebackConfig());
+    // Precalculate diagonal direction.
+    auto intermediate = static_cast<TScoreValue>(_scoreOfCell(previousDiagonal) + score(scoringScheme, seqHVal, seqVVal));
+    // Cache next diagonal value.
+    previousDiagonal = _scoreOfCell(previousHorizontal);
+
+    auto tv = _maxScore(_scoreOfCell(current),
+                        intermediate,
+                        _scoreOfCell(previousHorizontal) + scoreGapExtendHorizontal(scoringScheme, seqHVal, seqVVal),
+                        TraceBitMap_<TScoreValue>::DIAGONAL,
+                        TraceBitMap_<TScoreValue>::HORIZONTAL | TraceBitMap_<TScoreValue>::MAX_FROM_HORIZONTAL_MATRIX,
+                        TTracebackConfig());
+    if (IsLocalAlignment_<TAlgorithm>::VALUE)
+    {
+        tv = _maxScore(_scoreOfCell(current),
+                       TraceBitMap_<TScoreValue>::NONE,
+                       _scoreOfCell(current),
+                       TraceBitMap_<TScoreValue>::NONE,
+                       tv,
+                       TTracebackConfig{});
+    }
+    previousVertical = current;
+    return tv;
 }
 
 // ----------------------------------------------------------------------------
-// Function _doComputeScore       [RecursionDirectionLowerDiagonal, LinearGaps]
+// Function _computeScore       [RecursionDirectionLowerDiagonal, LinearGaps]
 // ----------------------------------------------------------------------------
 
 template <typename TScoreValue, typename TSequenceHValue, typename TSequenceVValue, typename TScoringScheme,
-          typename TAlgorithm, typename TTracebackConfig>
+          typename TAlgorithm, typename TTracebackConfig, typename TExecPolicy>
 inline typename TraceBitMap_<TScoreValue>::Type
-_doComputeScore(DPCell_<TScoreValue, LinearGaps> & activeCell,
-                DPCell_<TScoreValue, LinearGaps> const & previousDiagonal,
-                DPCell_<TScoreValue, LinearGaps> const & /*previousHorizontal*/,
-                DPCell_<TScoreValue, LinearGaps> const & previousVertical,
-                TSequenceHValue const & seqHVal,
-                TSequenceVValue const & seqVVal,
-                TScoringScheme const & scoringScheme,
-                RecursionDirectionLowerDiagonal const &,
-                DPProfile_<TAlgorithm, LinearGaps, TTracebackConfig> const &)
+_computeScore(DPCell_<TScoreValue, LinearGaps> & current,
+              DPCell_<TScoreValue, LinearGaps> const & previousDiagonal,
+              DPCell_<TScoreValue, LinearGaps> const & /*previousHorizontal*/,
+              DPCell_<TScoreValue, LinearGaps> const & previousVertical,
+              TSequenceHValue const & seqHVal,
+              TSequenceVValue const & seqVVal,
+              TScoringScheme const & scoringScheme,
+              RecursionDirectionLowerDiagonal const &,
+              DPProfile_<TAlgorithm, LinearGaps, TTracebackConfig, TExecPolicy> const &)
 {
-    activeCell._score = _scoreOfCell(previousDiagonal) + score(scoringScheme, seqHVal, seqVVal);
-    TScoreValue tmpScore = _scoreOfCell(previousVertical) + scoreGapExtendVertical(scoringScheme, seqHVal, seqVVal);
-
-    return _internalComputeScore(activeCell,
-                                 tmpScore,
-                                 TraceBitMap_<TScoreValue>::DIAGONAL,
-                                 TraceBitMap_<TScoreValue>::VERTICAL | TraceBitMap_<TScoreValue>::MAX_FROM_VERTICAL_MATRIX,
-                                 TTracebackConfig());
+    auto tv  = _maxScore(_scoreOfCell(current),
+                         static_cast<TScoreValue>(_scoreOfCell(previousDiagonal) +
+                                              score(scoringScheme, seqHVal, seqVVal)),
+                         static_cast<TScoreValue>(_scoreOfCell(previousVertical) +
+                                              scoreGapExtendVertical(scoringScheme, seqHVal, seqVVal)),
+                         TraceBitMap_<TScoreValue>::DIAGONAL,
+                         TraceBitMap_<TScoreValue>::VERTICAL | TraceBitMap_<TScoreValue>::MAX_FROM_VERTICAL_MATRIX,
+                         TTracebackConfig());
+    if (IsLocalAlignment_<TAlgorithm>::VALUE)
+    {
+        tv = _maxScore(_scoreOfCell(current),
+                       TraceBitMap_<TScoreValue>::NONE,
+                       _scoreOfCell(current),
+                       TraceBitMap_<TScoreValue>::NONE,
+                       tv,
+                       TTracebackConfig{});
+    }
+    return tv;
 }
 
 // ----------------------------------------------------------------------------
-// Function _doComputeScore                      [RecursionDirectionHorizontal]
+// Function _computeScore                      [RecursionDirectionHorizontal]
 // ----------------------------------------------------------------------------
 
 template <typename TScoreValue, typename TSequenceHValue, typename TSequenceVValue, typename TScoringScheme,
-          typename TAlgorithm, typename TTracebackConfig>
+          typename TAlgorithm, typename TTracebackConfig, typename TExecPolicy>
 inline typename TraceBitMap_<TScoreValue>::Type
-_doComputeScore(DPCell_<TScoreValue, LinearGaps> & activeCell,
-                DPCell_<TScoreValue, LinearGaps> const & /*previousDiagonal*/,
-                DPCell_<TScoreValue, LinearGaps> const & previousHorizontal,
-                DPCell_<TScoreValue, LinearGaps> const & /*previousVertical*/,
-                TSequenceHValue const & seqHVal,
-                TSequenceVValue const & seqVVal,
-                TScoringScheme const & scoringScheme,
-                RecursionDirectionHorizontal const &,
-                DPProfile_<TAlgorithm, LinearGaps, TTracebackConfig> const &)
+_computeScore(DPCell_<TScoreValue, LinearGaps> & activeCell,
+              DPCell_<TScoreValue, LinearGaps> & previousDiagonal,
+              DPCell_<TScoreValue, LinearGaps> const & previousHorizontal,
+              DPCell_<TScoreValue, LinearGaps> & previousVertical,
+              TSequenceHValue const & seqHVal,
+              TSequenceVValue const & seqVVal,
+              TScoringScheme const & scoringScheme,
+              RecursionDirectionHorizontal const &,
+              DPProfile_<TAlgorithm, LinearGaps, TTracebackConfig, TExecPolicy> const &)
 {
-    activeCell._score = _scoreOfCell(previousHorizontal) + scoreGapExtendHorizontal(scoringScheme, seqHVal, seqVVal);
-
-    if (!IsTracebackEnabled_<TTracebackConfig>::VALUE)
-        return TraceBitMap_<TScoreValue>::NONE;
-
-    return TraceBitMap_<TScoreValue>::HORIZONTAL
-                | TraceBitMap_<TScoreValue>::MAX_FROM_HORIZONTAL_MATRIX;
+    // Cache previous diagonal.
+    previousDiagonal = previousHorizontal;
+    // Compute current value.
+    _scoreOfCell(activeCell) = _scoreOfCell(previousHorizontal) +
+                               scoreGapExtendHorizontal(scoringScheme, seqHVal, seqVVal);
+    auto tv = TraceBitMap_<TScoreValue>::HORIZONTAL | TraceBitMap_<TScoreValue>::MAX_FROM_HORIZONTAL_MATRIX;
+    if (IsLocalAlignment_<TAlgorithm>::VALUE)
+    {
+        tv = _maxScore(_scoreOfCell(activeCell),
+                       TraceBitMap_<TScoreValue>::NONE,
+                       _scoreOfCell(activeCell),
+                       TraceBitMap_<TScoreValue>::NONE,
+                       tv,
+                       TTracebackConfig{});
+    }
+    // Cache next vertical.
+    previousVertical = activeCell;
+    return tv;
 }
 
 // ----------------------------------------------------------------------------
-// Function _doComputeScore                        [RecursionDirectionVertical]
+// Function _computeScore                        [RecursionDirectionVertical]
 // ----------------------------------------------------------------------------
 
 template <typename TScoreValue, typename TSequenceHValue, typename TSequenceVValue, typename TScoringScheme,
-          typename TAlgorithm, typename TTracebackConfig>
+          typename TAlgorithm, typename TTracebackConfig, typename TExecPolicy>
 inline typename TraceBitMap_<TScoreValue>::Type
-_doComputeScore(DPCell_<TScoreValue, LinearGaps> & activeCell,
-                DPCell_<TScoreValue, LinearGaps> const & /*previousDiagonal*/,
-                DPCell_<TScoreValue, LinearGaps> const & /*previousHorizontal*/,
-                DPCell_<TScoreValue, LinearGaps> const & previousVertical,
-                TSequenceHValue const & seqHVal,
-                TSequenceVValue const & seqVVal,
-                TScoringScheme const & scoringScheme,
-                RecursionDirectionVertical const &,
-                DPProfile_<TAlgorithm, LinearGaps, TTracebackConfig> const &)
+_computeScore(DPCell_<TScoreValue, LinearGaps> & current,
+              DPCell_<TScoreValue, LinearGaps> const & /*previousDiagonal*/,
+              DPCell_<TScoreValue, LinearGaps> const & /*previousHorizontal*/,
+              DPCell_<TScoreValue, LinearGaps> & previousVertical,
+              TSequenceHValue const & seqHVal,
+              TSequenceVValue const & seqVVal,
+              TScoringScheme const & scoringScheme,
+              RecursionDirectionVertical const &,
+              DPProfile_<TAlgorithm, LinearGaps, TTracebackConfig, TExecPolicy> const &)
 {
-    activeCell._score = _scoreOfCell(previousVertical) + scoreGapExtendVertical(scoringScheme, seqHVal, seqVVal);
-
-    if (!IsTracebackEnabled_<TTracebackConfig>::VALUE)
-        return TraceBitMap_<TScoreValue>::NONE;
-
-    return TraceBitMap_<TScoreValue>::VERTICAL
-                | TraceBitMap_<TScoreValue>::MAX_FROM_VERTICAL_MATRIX;
+    _scoreOfCell(current) = _scoreOfCell(previousVertical) + scoreGapExtendVertical(scoringScheme, seqHVal, seqVVal);
+    auto tv = TraceBitMap_<TScoreValue>::VERTICAL | TraceBitMap_<TScoreValue>::MAX_FROM_VERTICAL_MATRIX;
+    if (IsLocalAlignment_<TAlgorithm>::VALUE)
+    {
+        tv = _maxScore(_scoreOfCell(current),
+                       TraceBitMap_<TScoreValue>::NONE,
+                       _scoreOfCell(current),
+                       TraceBitMap_<TScoreValue>::NONE,
+                       tv,
+                       TTracebackConfig{});
+    }
+    // Cache previous vertical.
+    previousVertical = current;
+    return tv;
 }
 
 }  // namespace seqan
diff --git a/include/seqan/align/dp_matrix.h b/include/seqan/align/dp_matrix.h
index 1e853c5..fc66acb 100644
--- a/include/seqan/align/dp_matrix.h
+++ b/include/seqan/align/dp_matrix.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -100,21 +100,21 @@ struct DPMatrixDimension_
 // ----------------------------------------------------------------------------
 
 // The dp matrix used as a score matrix and as a trace-back matrix.
-template <typename TValue, typename TMatrixSpec>
+template <typename TValue, typename TMatrixSpec, typename THost = String<TValue> >
 class DPMatrix_
 {};
 
 
 // Default dp matrix implementation stores all cells of the dp matrix in the
 // underlying two-dimensional matrix.
-template <typename TValue>
-class DPMatrix_<TValue, FullDPMatrix>
+template <typename TValue, typename THost>
+class DPMatrix_<TValue, FullDPMatrix, THost>
 {
 public:
 
-    typedef typename Member<DPMatrix_, DPMatrixMember>::Type THost;
+    typedef typename Member<DPMatrix_, DPMatrixMember>::Type TMatrix;
 
-    Holder<THost>   data_host;  // The host containing the actual matrix.
+    Holder<TMatrix>   data_host;  // The host containing the actual matrix.
 
     DPMatrix_() :
         data_host()
@@ -151,16 +151,16 @@ struct DefaultScoreMatrixSpec_<LocalAlignment_<WatermanEggert> >
 // ----------------------------------------------------------------------------
 
 // Returns the type of the underlying matrix.
-template <typename TValue, typename TMatrixSpec>
-struct Member<DPMatrix_<TValue, TMatrixSpec>, DPMatrixMember>
+template <typename TValue, typename TMatrixSpec, typename THost>
+struct Member<DPMatrix_<TValue, TMatrixSpec, THost>, DPMatrixMember>
 {
-    typedef Matrix<TValue, 2> Type;
+    typedef Matrix<TValue, 2, THost> Type;
 };
 
-template <typename TValue, typename TMatrixSpec>
-struct Member<DPMatrix_<TValue, TMatrixSpec> const, DPMatrixMember>
+template <typename TValue, typename TMatrixSpec, typename THost>
+struct Member<DPMatrix_<TValue, TMatrixSpec, THost> const, DPMatrixMember>
 {
-    typedef Matrix<TValue, 2> const Type;
+    typedef Matrix<TValue, 2, THost> const Type;
 };
 
 // ----------------------------------------------------------------------------
@@ -172,18 +172,18 @@ struct Member<DPMatrix_<TValue, TMatrixSpec> const, DPMatrixMember>
 template <typename TDPMatrix>
 struct SizeArr_ {};
 
-template <typename TValue, typename TMatrixSpec>
-struct SizeArr_<DPMatrix_<TValue, TMatrixSpec> >
+template <typename TValue, typename TMatrixSpec, typename THost>
+struct SizeArr_<DPMatrix_<TValue, TMatrixSpec, THost> >
 {
-    typedef DPMatrix_<TValue, TMatrixSpec> TDPMatrix_;
+    typedef DPMatrix_<TValue, TMatrixSpec, THost> TDPMatrix_;
     typedef typename Member<TDPMatrix_, DPMatrixMember>::Type TDataHost_;
     typedef typename SizeArr_<TDataHost_>::Type Type;
 };
 
-template <typename TValue, typename TMatrixSpec>
-struct SizeArr_<DPMatrix_<TValue, TMatrixSpec> const>
+template <typename TValue, typename TMatrixSpec, typename THost>
+struct SizeArr_<DPMatrix_<TValue, TMatrixSpec, THost> const>
 {
-    typedef DPMatrix_<TValue, TMatrixSpec> TDPMatrix_;
+    typedef DPMatrix_<TValue, TMatrixSpec, THost> TDPMatrix_;
     typedef typename Member<TDPMatrix_, DPMatrixMember>::Type TDataHost_;
     typedef typename SizeArr_<TDataHost_>::Type const Type;
 };
@@ -192,109 +192,59 @@ struct SizeArr_<DPMatrix_<TValue, TMatrixSpec> const>
 // Metafunction Spec
 // ----------------------------------------------------------------------------
 
-template <typename TValue, typename TMatrixSpec>
-struct Spec<DPMatrix_<TValue, TMatrixSpec> >
+template <typename TValue, typename TMatrixSpec, typename THost>
+struct Spec<DPMatrix_<TValue, TMatrixSpec, THost> >
 {
     typedef TMatrixSpec Type;
 };
 
-template <typename TValue, typename TMatrixSpec>
-struct Spec<DPMatrix_<TValue, TMatrixSpec> const>:
-    Spec<DPMatrix_<TValue, TMatrixSpec> >{};
+template <typename TValue, typename TMatrixSpec, typename THost>
+struct Spec<DPMatrix_<TValue, TMatrixSpec, THost> const>:
+    Spec<DPMatrix_<TValue, TMatrixSpec, THost> >{};
 
 
 // ----------------------------------------------------------------------------
 // Metafunction Value
 // ----------------------------------------------------------------------------
 
-template <typename TValue, typename TMatrixSpec>
-struct Value<DPMatrix_<TValue, TMatrixSpec> >
+template <typename TValue, typename TMatrixSpec, typename THost>
+struct Value<DPMatrix_<TValue, TMatrixSpec, THost> >
 {
     typedef TValue Type;
 };
 
-template <typename TValue, typename TMatrixSpec>
-struct Value<DPMatrix_<TValue, TMatrixSpec> const>
+template <typename TValue, typename TMatrixSpec, typename THost>
+struct Value<DPMatrix_<TValue, TMatrixSpec, THost> const>
 {
     typedef TValue const Type;
 };
 
 // ----------------------------------------------------------------------------
-// Metafunction Reference
-// ----------------------------------------------------------------------------
-
-template <typename TValue, typename TMatrixSpec>
-struct Reference<DPMatrix_<TValue, TMatrixSpec> >
-{
-    typedef TValue & Type;
-};
-
-template <typename TValue, typename TMatrixSpec>
-struct Reference<DPMatrix_<TValue, TMatrixSpec> const>
-{
-    typedef TValue const & Type;
-};
-
-// ----------------------------------------------------------------------------
-// Metafunction GetValue
-// ----------------------------------------------------------------------------
-
-template <typename TValue, typename TMatrixSpec>
-struct GetValue<DPMatrix_<TValue, TMatrixSpec> >:
-    Reference<DPMatrix_<TValue, TMatrixSpec> >{};
-
-template <typename TValue, typename TMatrixSpec>
-struct GetValue<DPMatrix_<TValue, TMatrixSpec> const>:
-    Reference<DPMatrix_<TValue, TMatrixSpec> const>{};
-
-// ----------------------------------------------------------------------------
-// Metafunction Position
-// ----------------------------------------------------------------------------
-
-template <typename TValue, typename TMatrixSpec>
-struct Position<DPMatrix_<TValue, TMatrixSpec> >
-{
-    typedef typename DPMatrix_<TValue, TMatrixSpec>::THost TDataMatrix_;
-    typedef typename Position<TDataMatrix_>::Type Type;
-};
-
-template <typename TValue, typename TMatrixSpec>
-struct Position<DPMatrix_<TValue, TMatrixSpec> const>:
-    Position<DPMatrix_<TValue, TMatrixSpec> >{};
-
-// ----------------------------------------------------------------------------
 // Metafunction Size
 // ----------------------------------------------------------------------------
 
-template <typename TValue, typename TMatrixSpec>
-struct Size<DPMatrix_<TValue, TMatrixSpec> >
+template <typename TValue, typename TMatrixSpec, typename THost>
+struct Size<DPMatrix_<TValue, TMatrixSpec, THost> >
 {
-    typedef typename DPMatrix_<TValue, TMatrixSpec>::THost TDataMatrix_;
+    typedef typename DPMatrix_<TValue, TMatrixSpec, THost>::TMatrix TDataMatrix_;
     typedef typename Size<TDataMatrix_>::Type Type;
 };
 
-template <typename TValue, typename TMatrixSpec>
-struct Size<DPMatrix_<TValue, TMatrixSpec> const>:
-    Size<DPMatrix_<TValue, TMatrixSpec> >{};
 
 // ----------------------------------------------------------------------------
 // Metafunction Host
 // ----------------------------------------------------------------------------
 
-template <typename TValue, typename TMatrixSpec>
-struct Host<DPMatrix_<TValue, TMatrixSpec> >
+template <typename TValue, typename TMatrixSpec, typename THost>
+struct Host<DPMatrix_<TValue, TMatrixSpec, THost> >
 {
-    typedef DPMatrix_<TValue, TMatrixSpec> TDPMatrix_;
-    typedef typename Member<TDPMatrix_, DPMatrixMember>::Type TDataMatrix_;
-    typedef typename Host<TDataMatrix_>::Type Type;
+    typedef THost Type;
 };
 
-template <typename TValue, typename TMatrixSpec>
-struct Host<DPMatrix_<TValue, TMatrixSpec> const>
+template <typename TValue, typename TMatrixSpec, typename THost>
+struct Host<DPMatrix_<TValue, TMatrixSpec, THost> const>
 {
-    typedef DPMatrix_<TValue, TMatrixSpec> TDPMatrix_;
-    typedef typename Member<TDPMatrix_, DPMatrixMember>::Type TDataMatrix_;
-    typedef typename Host<TDataMatrix_>::Type const Type;
+    typedef THost const Type;
 };
 
 // ----------------------------------------------------------------------------
@@ -305,34 +255,34 @@ struct Host<DPMatrix_<TValue, TMatrixSpec> const>
 // non-rooted iterator to the underlying vector of the hosted two-dimensional
 // matrix. The rooted iterator returns the iterator defined by the
 // hosted matrix object which is a position iterator.
-template <typename TValue, typename TMatrixSpec>
-struct Iterator<DPMatrix_<TValue, TMatrixSpec>, Standard const>
+template <typename TValue, typename TMatrixSpec, typename THost>
+struct Iterator<DPMatrix_<TValue, TMatrixSpec, THost>, Standard>
 {
-    typedef DPMatrix_<TValue, TMatrixSpec> TDPMatrix_;
+    typedef DPMatrix_<TValue, TMatrixSpec, THost> TDPMatrix_;
     typedef typename  Host<TDPMatrix_>::Type THost_;
     typedef typename Iterator<THost_, Standard>::Type Type;
 };
 
-template <typename TValue, typename TMatrixSpec>
-struct Iterator<DPMatrix_<TValue, TMatrixSpec> const, Standard const>
+template <typename TValue, typename TMatrixSpec, typename THost>
+struct Iterator<DPMatrix_<TValue, TMatrixSpec, THost> const, Standard>
 {
-    typedef DPMatrix_<TValue, TMatrixSpec> const TDPMatrix_;
+    typedef DPMatrix_<TValue, TMatrixSpec, THost> const TDPMatrix_;
     typedef typename  Host<TDPMatrix_>::Type THost_;
     typedef typename Iterator<THost_ const, Standard>::Type Type;
 };
 
-template <typename TValue, typename TMatrixSpec>
-struct Iterator<DPMatrix_<TValue, TMatrixSpec>, Rooted const>
+template <typename TValue, typename TMatrixSpec, typename THost>
+struct Iterator<DPMatrix_<TValue, TMatrixSpec, THost>, Rooted>
 {
-    typedef DPMatrix_<TValue, TMatrixSpec> TDPMatrix_;
+    typedef DPMatrix_<TValue, TMatrixSpec, THost> TDPMatrix_;
     typedef typename Member<TDPMatrix_, DPMatrixMember>::Type TDataMatrix_;
     typedef typename Iterator<TDataMatrix_, Rooted>::Type Type;
 };
 
-template <typename TValue, typename TMatrixSpec>
-struct Iterator<DPMatrix_<TValue, TMatrixSpec> const, Rooted const>
+template <typename TValue, typename TMatrixSpec, typename THost>
+struct Iterator<DPMatrix_<TValue, TMatrixSpec, THost> const, Rooted>
 {
-    typedef DPMatrix_<TValue, TMatrixSpec> TDPMatrix_;
+    typedef DPMatrix_<TValue, TMatrixSpec, THost> TDPMatrix_;
     typedef typename Member<TDPMatrix_, DPMatrixMember>::Type TDataMatrix_;
     typedef typename Iterator<TDataMatrix_ const, Rooted>::Type Type;
 };
@@ -356,16 +306,16 @@ inline bool _checkCorrectDimension(DPMatrixDimension_::TValue dim)
 // ----------------------------------------------------------------------------
 
 // Returns a reference to the hosted matrix.
-template <typename TValue, typename TMatrixSpec>
-inline Holder<typename Host<DPMatrix_<TValue, TMatrixSpec> >::Type> &
-_dataHost(DPMatrix_<TValue, TMatrixSpec>& dpMatrix)
+template <typename TValue, typename TMatrixSpec, typename THost>
+inline Holder<typename Host<DPMatrix_<TValue, TMatrixSpec, THost> >::Type> &
+_dataHost(DPMatrix_<TValue, TMatrixSpec, THost> & dpMatrix)
 {
     return _dataHost(value(dpMatrix.data_host));
 }
 
-template <typename TValue, typename TMatrixSpec>
-inline Holder<typename Host<DPMatrix_<TValue, TMatrixSpec> >::Type> const &
-_dataHost(DPMatrix_<TValue, TMatrixSpec> const & dpMatrix)
+template <typename TValue, typename TMatrixSpec, typename THost>
+inline Holder<typename Host<DPMatrix_<TValue, TMatrixSpec, THost> >::Type> const &
+_dataHost(DPMatrix_<TValue, TMatrixSpec, THost> const & dpMatrix)
 {
     return _dataHost(value(dpMatrix.data_host));
 }
@@ -375,16 +325,16 @@ _dataHost(DPMatrix_<TValue, TMatrixSpec> const & dpMatrix)
 // ----------------------------------------------------------------------------
 
 // Returns a reference to the _dataLengths container of the hosted matrix.
-template <typename TValue, typename TMatrixSpec>
-inline typename SizeArr_<DPMatrix_<TValue, TMatrixSpec> >::Type &
-_dataLengths(DPMatrix_<TValue, TMatrixSpec>&dpMatrix)
+template <typename TValue, typename TMatrixSpec, typename THost>
+inline typename SizeArr_<DPMatrix_<TValue, TMatrixSpec, THost> >::Type &
+_dataLengths(DPMatrix_<TValue, TMatrixSpec, THost>&dpMatrix)
 {
     return _dataLengths(value(dpMatrix.data_host));
 }
 
-template <typename TValue, typename TMatrixSpec>
-inline typename SizeArr_<DPMatrix_<TValue, TMatrixSpec> const>::Type &
-_dataLengths(DPMatrix_<TValue, TMatrixSpec> const & dpMatrix)
+template <typename TValue, typename TMatrixSpec, typename THost>
+inline typename SizeArr_<DPMatrix_<TValue, TMatrixSpec, THost> const>::Type &
+_dataLengths(DPMatrix_<TValue, TMatrixSpec, THost> const & dpMatrix)
 {
     return _dataLengths(value(dpMatrix.data_host));
 }
@@ -394,16 +344,16 @@ _dataLengths(DPMatrix_<TValue, TMatrixSpec> const & dpMatrix)
 // ----------------------------------------------------------------------------
 
 // Returns a reference to the _dataFactors container of the hosted matrix.
-template <typename TValue, typename TMatrixSpec>
-inline typename SizeArr_<DPMatrix_<TValue, TMatrixSpec> >::Type &
-_dataFactors(DPMatrix_<TValue, TMatrixSpec>&dpMatrix)
+template <typename TValue, typename TMatrixSpec, typename THost>
+inline typename SizeArr_<DPMatrix_<TValue, TMatrixSpec, THost> >::Type &
+_dataFactors(DPMatrix_<TValue, TMatrixSpec, THost>&dpMatrix)
 {
     return _dataFactors(value(dpMatrix.data_host));
 }
 
-template <typename TValue, typename TMatrixSpec>
-inline typename SizeArr_<DPMatrix_<TValue, TMatrixSpec> const>::Type &
-_dataFactors(DPMatrix_<TValue, TMatrixSpec> const & dpMatrix)
+template <typename TValue, typename TMatrixSpec, typename THost>
+inline typename SizeArr_<DPMatrix_<TValue, TMatrixSpec, THost> const>::Type &
+_dataFactors(DPMatrix_<TValue, TMatrixSpec, THost> const & dpMatrix)
 {
     return _dataFactors(value(dpMatrix.data_host));
 }
@@ -413,35 +363,35 @@ _dataFactors(DPMatrix_<TValue, TMatrixSpec> const & dpMatrix)
 // ----------------------------------------------------------------------------
 
 // Returns the value of the matrix at the given host position.
-template <typename TValue, typename TMatrixSpec, typename TPosition>
-inline typename Reference<DPMatrix_<TValue, TMatrixSpec> >::Type
-value(DPMatrix_<TValue, TMatrixSpec> & dpMatrix,
+template <typename TValue, typename TMatrixSpec, typename THost, typename TPosition>
+inline typename Reference<DPMatrix_<TValue, TMatrixSpec, THost> >::Type
+value(DPMatrix_<TValue, TMatrixSpec, THost> & dpMatrix,
       TPosition const & pos)
 {
     return value(value(dpMatrix.data_host), pos);
 }
 
-template <typename TValue, typename TMatrixSpec, typename TPosition>
-inline typename Reference<DPMatrix_<TValue, TMatrixSpec> const>::Type
-value(DPMatrix_<TValue, TMatrixSpec> const & dpMatrix,
+template <typename TValue, typename TMatrixSpec, typename THost, typename TPosition>
+inline typename Reference<DPMatrix_<TValue, TMatrixSpec, THost> const>::Type
+value(DPMatrix_<TValue, TMatrixSpec, THost> const & dpMatrix,
       TPosition const & pos)
 {
     return value(value(dpMatrix.data_host), pos);
 }
 
 // Returns the value of the matrix at the two given coordinates.
-template <typename TValue, typename TMatrixSpec, typename TPositionV, typename TPositionH>
-inline typename Reference<DPMatrix_<TValue, TMatrixSpec> >::Type
-value(DPMatrix_<TValue, TMatrixSpec> & dpMatrix,
+template <typename TValue, typename TMatrixSpec, typename THost, typename TPositionV, typename TPositionH>
+inline typename Reference<DPMatrix_<TValue, TMatrixSpec, THost> >::Type
+value(DPMatrix_<TValue, TMatrixSpec, THost> & dpMatrix,
       TPositionV const & posDimV,
       TPositionH const & posDimH)
 {
     return value(value(dpMatrix.data_host), posDimV, posDimH);
 }
 
-template <typename TValue, typename TMatrixSpec, typename TPositionV, typename TPositionH>
-inline typename Reference<DPMatrix_<TValue, TMatrixSpec> const>::Type
-value(DPMatrix_<TValue, TMatrixSpec> const & dpMatrix,
+template <typename TValue, typename TMatrixSpec, typename THost, typename TPositionV, typename TPositionH>
+inline typename Reference<DPMatrix_<TValue, TMatrixSpec, THost> const>::Type
+value(DPMatrix_<TValue, TMatrixSpec, THost> const & dpMatrix,
       TPositionV const & posDimV,
       TPositionH const & posDimH)
 {
@@ -453,9 +403,9 @@ value(DPMatrix_<TValue, TMatrixSpec> const & dpMatrix,
 // ----------------------------------------------------------------------------
 
 // Returns the length of a given dimension.
-template <typename TValue, typename TMatrixSpec>
-inline typename Size<DPMatrix_<TValue, TMatrixSpec> const>::Type
-length(DPMatrix_<TValue, TMatrixSpec> const & dpMatrix,
+template <typename TValue, typename TMatrixSpec, typename THost>
+inline typename Size<DPMatrix_<TValue, TMatrixSpec, THost> const>::Type
+length(DPMatrix_<TValue, TMatrixSpec, THost> const & dpMatrix,
        unsigned int dimension)
 {
     SEQAN_ASSERT(_checkCorrectDimension(dimension));
@@ -464,9 +414,9 @@ length(DPMatrix_<TValue, TMatrixSpec> const & dpMatrix,
 }
 
 // Returns the overall length of the underlying vector of the hosted matrix.
-template <typename TValue, typename TMatrixSpec>
-inline typename Size<DPMatrix_<TValue, TMatrixSpec> const>::Type
-length(DPMatrix_<TValue, TMatrixSpec> const & dpMatrix)
+template <typename TValue, typename TMatrixSpec, typename THost>
+inline typename Size<DPMatrix_<TValue, TMatrixSpec, THost> const>::Type
+length(DPMatrix_<TValue, TMatrixSpec, THost> const & dpMatrix)
 {
     return length(value(dpMatrix.data_host));  // Note that even if the dimensional lengths are set but the matrix was not resized
     // this function returns 0 or the previous length of the host before the resize.
@@ -476,9 +426,9 @@ length(DPMatrix_<TValue, TMatrixSpec> const & dpMatrix)
 // Function clear()
 // ----------------------------------------------------------------------------
 
-template <typename TValue, typename TMatrixSpec>
+template <typename TValue, typename TMatrixSpec, typename THost>
 inline void
-clear(DPMatrix_<TValue, TMatrixSpec> & dpMatrix)
+clear(DPMatrix_<TValue, TMatrixSpec, THost> & dpMatrix)
 {
     clear(_dataLengths(dpMatrix));
     resize(_dataLengths(dpMatrix), 2, 0);
@@ -492,9 +442,9 @@ clear(DPMatrix_<TValue, TMatrixSpec> & dpMatrix)
 // Function empty()
 // ----------------------------------------------------------------------------
 
-template <typename TValue, typename TMatrixSpec>
+template <typename TValue, typename TMatrixSpec, typename THost>
 inline bool
-empty(DPMatrix_<TValue, TMatrixSpec> const & dpMatrix)
+empty(DPMatrix_<TValue, TMatrixSpec, THost> const & dpMatrix)
 {
     return empty(host(dpMatrix));
 }
@@ -504,9 +454,9 @@ empty(DPMatrix_<TValue, TMatrixSpec> const & dpMatrix)
 // ----------------------------------------------------------------------------
 
 // Sets the new length of a given dimension.
-template <typename TValue, typename TMatrixSpec, typename TSize>
+template <typename TValue, typename TMatrixSpec, typename THost, typename TSize>
 inline void
-setLength(DPMatrix_<TValue, TMatrixSpec> & dpMatrix,
+setLength(DPMatrix_<TValue, TMatrixSpec, THost> & dpMatrix,
           unsigned int dimension,
           TSize const & newLength)
 {
@@ -518,11 +468,11 @@ setLength(DPMatrix_<TValue, TMatrixSpec> & dpMatrix,
 // Function updateFactors()
 // ----------------------------------------------------------------------------
 
-template <typename TValue, typename TMatrixSpec>
-inline typename Size<DPMatrix_<TValue, TMatrixSpec> >::Type
-updateFactors(DPMatrix_<TValue, TMatrixSpec> & dpMatrix)
+template <typename TValue, typename TMatrixSpec, typename THost>
+inline typename Size<DPMatrix_<TValue, TMatrixSpec, THost> >::Type
+updateFactors(DPMatrix_<TValue, TMatrixSpec, THost> & dpMatrix)
 {
-    typedef typename Size<DPMatrix_<TValue, TMatrixSpec> >::Type TSize;
+    typedef typename Size<DPMatrix_<TValue, TMatrixSpec, THost> >::Type TSize;
 
     TSize factor_ = _dataFactors(dpMatrix)[0] * length(dpMatrix, 0);
     for (unsigned int i = 1; (factor_ > 0) && (i < dimension(value(dpMatrix.data_host))); ++i)
@@ -538,26 +488,26 @@ updateFactors(DPMatrix_<TValue, TMatrixSpec> & dpMatrix)
 // ----------------------------------------------------------------------------
 
 // Resizes the matrix. Note, the lengths of the dimensions have to be set before.
-template <typename TValue, typename TMatrixSpec>
+template <typename TValue, typename TMatrixSpec, typename THost>
 inline void
-resize(DPMatrix_<TValue, TMatrixSpec> & dpMatrix)
+resize(DPMatrix_<TValue, TMatrixSpec, THost> & dpMatrix)
 {
-    typedef typename Size<DPMatrix_<TValue, TMatrixSpec> >::Type TSize;
+    typedef typename Size<DPMatrix_<TValue, TMatrixSpec, THost> >::Type TSize;
 
     TSize reqSize = updateFactors(dpMatrix);
-    if (reqSize >= length(dpMatrix))
+    if (reqSize > length(dpMatrix))
         resize(host(dpMatrix), reqSize, Exact());
 }
 
-template <typename TValue, typename TMatrixSpec>
+template <typename TValue, typename TMatrixSpec, typename THost>
 inline void
-resize(DPMatrix_<TValue, TMatrixSpec> & dpMatrix,
+resize(DPMatrix_<TValue, TMatrixSpec, THost> & dpMatrix,
        TValue const & fillValue)
 {
-    typedef typename Size<DPMatrix_<TValue, TMatrixSpec> >::Type TSize;
+    typedef typename Size<DPMatrix_<TValue, TMatrixSpec, THost> >::Type TSize;
 
     TSize reqSize = updateFactors(dpMatrix);
-    if (reqSize >= length(dpMatrix))
+    if (reqSize > length(dpMatrix))
         resize(host(dpMatrix), reqSize, fillValue, Exact());
 }
 
@@ -565,30 +515,30 @@ resize(DPMatrix_<TValue, TMatrixSpec> & dpMatrix,
 // Function begin()
 // ----------------------------------------------------------------------------
 
-template <typename TValue, typename TMatrixSpec>
-inline typename Iterator<DPMatrix_<TValue, TMatrixSpec>, Standard const>::Type
-begin(DPMatrix_<TValue, TMatrixSpec> & dpMatrix, Standard const)
+template <typename TValue, typename TMatrixSpec, typename THost>
+inline typename Iterator<DPMatrix_<TValue, TMatrixSpec, THost>, Standard>::Type
+begin(DPMatrix_<TValue, TMatrixSpec, THost> & dpMatrix, Standard)
 {
     return begin(host(dpMatrix));
 }
 
-template <typename TValue, typename TMatrixSpec>
-inline typename Iterator<DPMatrix_<TValue, TMatrixSpec> const, Standard const>::Type
-begin(DPMatrix_<TValue, TMatrixSpec> const & dpMatrix, Standard const)
+template <typename TValue, typename TMatrixSpec, typename THost>
+inline typename Iterator<DPMatrix_<TValue, TMatrixSpec, THost> const, Standard>::Type
+begin(DPMatrix_<TValue, TMatrixSpec, THost> const & dpMatrix, Standard)
 {
     return begin(host(dpMatrix));
 }
 
-template <typename TValue, typename TMatrixSpec>
-inline typename Iterator<DPMatrix_<TValue, TMatrixSpec>, Rooted const>::Type
-begin(DPMatrix_<TValue, TMatrixSpec> & dpMatrix, Rooted const)
+template <typename TValue, typename TMatrixSpec, typename THost>
+inline typename Iterator<DPMatrix_<TValue, TMatrixSpec, THost>, Rooted>::Type
+begin(DPMatrix_<TValue, TMatrixSpec, THost> & dpMatrix, Rooted)
 {
     return begin(value(dpMatrix.data_host));
 }
 
-template <typename TValue, typename TMatrixSpec>
-inline typename Iterator<DPMatrix_<TValue, TMatrixSpec> const, Rooted const>::Type
-begin(DPMatrix_<TValue, TMatrixSpec> const & dpMatrix, Rooted const)
+template <typename TValue, typename TMatrixSpec, typename THost>
+inline typename Iterator<DPMatrix_<TValue, TMatrixSpec, THost> const, Rooted>::Type
+begin(DPMatrix_<TValue, TMatrixSpec, THost> const & dpMatrix, Rooted)
 {
     return begin(value(dpMatrix.data_host));
 }
@@ -597,30 +547,30 @@ begin(DPMatrix_<TValue, TMatrixSpec> const & dpMatrix, Rooted const)
 // Function end()
 // ----------------------------------------------------------------------------
 
-template <typename TValue, typename TMatrixSpec>
-inline typename Iterator<DPMatrix_<TValue, TMatrixSpec>, Standard const>::Type
-end(DPMatrix_<TValue, TMatrixSpec> & dpMatrix, Standard const)
+template <typename TValue, typename TMatrixSpec, typename THost>
+inline typename Iterator<DPMatrix_<TValue, TMatrixSpec, THost>, Standard>::Type
+end(DPMatrix_<TValue, TMatrixSpec, THost> & dpMatrix, Standard)
 {
     return end(host(dpMatrix));
 }
 
-template <typename TValue, typename TMatrixSpec>
-inline typename Iterator<DPMatrix_<TValue, TMatrixSpec> const, Standard const>::Type
-end(DPMatrix_<TValue, TMatrixSpec> const & dpMatrix, Standard const)
+template <typename TValue, typename TMatrixSpec, typename THost>
+inline typename Iterator<DPMatrix_<TValue, TMatrixSpec, THost> const, Standard>::Type
+end(DPMatrix_<TValue, TMatrixSpec, THost> const & dpMatrix, Standard)
 {
     return end(host(dpMatrix));
 }
 
-template <typename TValue, typename TMatrixSpec>
-inline typename Iterator<DPMatrix_<TValue, TMatrixSpec>, Rooted const>::Type
-end(DPMatrix_<TValue, TMatrixSpec> & dpMatrix, Rooted const)
+template <typename TValue, typename TMatrixSpec, typename THost>
+inline typename Iterator<DPMatrix_<TValue, TMatrixSpec, THost>, Rooted>::Type
+end(DPMatrix_<TValue, TMatrixSpec, THost> & dpMatrix, Rooted)
 {
     return end(value(dpMatrix.data_host));
 }
 
-template <typename TValue, typename TMatrixSpec>
-inline typename Iterator<DPMatrix_<TValue, TMatrixSpec> const, Rooted const>::Type
-end(DPMatrix_<TValue, TMatrixSpec> const & dpMatrix, Rooted const)
+template <typename TValue, typename TMatrixSpec, typename THost>
+inline typename Iterator<DPMatrix_<TValue, TMatrixSpec, THost>, Rooted>::Type
+end(DPMatrix_<TValue, TMatrixSpec, THost> const & dpMatrix, Rooted)
 {
     return end(value(dpMatrix.data_host));
 }
@@ -630,15 +580,31 @@ end(DPMatrix_<TValue, TMatrixSpec> const & dpMatrix, Rooted const)
 // ----------------------------------------------------------------------------
 
 // Returns the coordinate of a host positio in a given dimension.
-template <typename TValue, typename TPosition>
-inline typename Position<DPMatrix_<TValue, FullDPMatrix> >::Type
-coordinate(DPMatrix_<TValue, FullDPMatrix> const & dpMatrix,
+template <typename TValue, typename THost, typename TPosition>
+inline typename Position<DPMatrix_<TValue, FullDPMatrix, THost> >::Type
+coordinate(DPMatrix_<TValue, FullDPMatrix, THost> const & dpMatrix,
            TPosition hostPos,
            typename DPMatrixDimension_::TValue dimension)
 {
     return coordinate(value(dpMatrix.data_host), hostPos, dimension);
 }
 
+// ----------------------------------------------------------------------------
+// Function toGlobalPosition()
+// ----------------------------------------------------------------------------
+
+// Returns the current position of the navigator within the matrix.
+template <typename TValue, typename THost,
+          typename TPosH,
+          typename TPosV>
+inline typename Position<DPMatrix_<TValue, FullDPMatrix, THost> >::Type
+toGlobalPosition(DPMatrix_<TValue, FullDPMatrix, THost> const & dpMatrix,
+                 TPosH const horizontalCoordinate,
+                 TPosV const verticalCoordinate)
+{
+    return horizontalCoordinate * length(dpMatrix, DPMatrixDimension_::VERTICAL) + verticalCoordinate;
+}
+
 } // namespace seqan
 
 #endif  // #ifndef SEQAN_INCLUDE_SEQAN_ALIGN_DP_MATRIX_H_
diff --git a/include/seqan/align/dp_matrix_navigator.h b/include/seqan/align/dp_matrix_navigator.h
index a39100b..4b5fa44 100644
--- a/include/seqan/align/dp_matrix_navigator.h
+++ b/include/seqan/align/dp_matrix_navigator.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -83,6 +83,14 @@ struct NavigateColumnWise_;
 typedef Tag<NavigateColumnWise_> NavigateColumnWise;
 
 // ----------------------------------------------------------------------------
+// Tag NavigateColumnWiseBanded
+// ----------------------------------------------------------------------------
+
+// Facilitates banded column wise navigation through the dp-matrix.
+struct NavigateColumnWiseBanded_;
+typedef Tag<NavigateColumnWiseBanded_> NavigateColumnWiseBanded;
+
+// ----------------------------------------------------------------------------
 // Class DPMatrixNavigator_
 // ----------------------------------------------------------------------------
 
@@ -94,6 +102,24 @@ class DPMatrixNavigator_;
 // ============================================================================
 
 // ----------------------------------------------------------------------------
+// Metafunction MatrixType
+// ----------------------------------------------------------------------------
+
+template <typename TNavigator>
+struct MatrixType;
+
+template <typename TDPMatrix, typename TDPMatrixType, typename TNavigationSpec>
+struct MatrixType<DPMatrixNavigator_<TDPMatrix, TDPMatrixType, TNavigationSpec> >
+{
+    using Type = TDPMatrixType;
+};
+
+template <typename TDPMatrix, typename TDPMatrixType, typename TNavigationSpec>
+struct MatrixType<DPMatrixNavigator_<TDPMatrix, TDPMatrixType, TNavigationSpec> const> :
+    MatrixType<DPMatrixNavigator_<TDPMatrix, TDPMatrixType, TNavigationSpec> >
+{};
+
+// ----------------------------------------------------------------------------
 // Metafunction Value
 // ----------------------------------------------------------------------------
 
@@ -141,6 +167,16 @@ struct Container<DPMatrixNavigator_<TDPMatrix, TDPMatrixType, TNavigationSpec> c
     typedef TDPMatrix const Type;
 };
 
+// ----------------------------------------------------------------------------
+// Metafunction Position
+// ----------------------------------------------------------------------------
+
+template <typename TDPMatrix, typename TDPMatrixType, typename TNavigationSpec>
+struct Position<DPMatrixNavigator_<TDPMatrix, TDPMatrixType, TNavigationSpec> >
+{
+    typedef typename Position<TDPMatrix>::Type Type;
+};
+
 // ============================================================================
 // Functions
 // ============================================================================
@@ -154,7 +190,7 @@ inline void
 assignValue(DPMatrixNavigator_<TDPMatrix, TDPMatrixType, TNavigationSpec> & dpNavigator,
             TValue const & element)
 {
-    assignValue(dpNavigator._activeColIterator, element);
+    *dpNavigator._activeColIterator = element;
 }
 
 // ----------------------------------------------------------------------------
diff --git a/include/seqan/align/dp_matrix_navigator_score_matrix.h b/include/seqan/align/dp_matrix_navigator_score_matrix.h
index 9110b49..ef1b3cc 100644
--- a/include/seqan/align/dp_matrix_navigator_score_matrix.h
+++ b/include/seqan/align/dp_matrix_navigator_score_matrix.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -56,21 +56,66 @@ namespace seqan {
 // The navigator for the score matrix.
 //
 // This navigator runs on a FullDPMatrix while it navigates column wise.
-template <typename TValue>
-class DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix>, DPScoreMatrix, NavigateColumnWise>
+
+template <typename TValue, typename THost, typename TNavigationSpec>
+class DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix, THost>, DPScoreMatrix, TNavigationSpec>
 {
 public:
-    typedef  DPMatrix_<TValue, FullDPMatrix> TDPMatrix_;
+    typedef  DPMatrix_<TValue, FullDPMatrix, THost> TDPMatrix_;
     typedef typename Pointer_<TDPMatrix_>::Type TDPMatrixPointer_;
     typedef typename Iterator<TDPMatrix_, Standard>::Type TDPMatrixIterator;
 
-    TDPMatrixPointer_ _ptrDataContainer     = nullptr;  // Pointer to the matrix this navigator is working on.
-    int _laneLeap                           = 0;  // Stores the jump to the next column
-    TDPMatrixIterator _activeColIterator    = TDPMatrixIterator();  // The active column iterator.
-    TDPMatrixIterator _prevColIterator      = TDPMatrixIterator();  // The previous column iterator.
-    TValue _prevCellDiagonal                = TValue();  // The previous diagonal cell
-    TValue _prevCellHorizontal              = TValue();  // The previous Horizontal cell
-    TValue _prevCellVertical                = TValue();  // The previous Vertical cell
+    template <typename TBandSpec,
+              std::enable_if_t<std::is_same<TBandSpec, BandOff>::value, int> = 0>
+    DPMatrixNavigator_(TDPMatrix_ & matrix,
+                       DPBandConfig<TBandSpec> const & /*band*/)
+    {
+        _ptrDataContainer = &matrix;
+        _prevColIteratorOffset = _dataFactors(matrix)[DPMatrixDimension_::HORIZONTAL];
+        _activeColIterator = begin(matrix, Standard());
+        _prevColIterator = _activeColIterator - _prevColIteratorOffset;
+        _laneLeap = 1;
+        *_activeColIterator = TValue();
+    }
+
+    template <typename TBandSpec,
+              std::enable_if_t<!std::is_same<TBandSpec, BandOff>::value, int> = 0>
+    DPMatrixNavigator_(TDPMatrix_ & matrix,
+                       DPBandConfig<TBandSpec> const & band)
+    {
+        using TMatrixSize = typename Size<TDPMatrix_>::Type;
+        using TSignedSize = std::make_signed_t<TMatrixSize>;
+
+        _ptrDataContainer = &matrix;
+        _prevColIteratorOffset = _dataFactors(matrix)[DPMatrixDimension_::HORIZONTAL];
+        // Band begins within the first row.
+        if (lowerDiagonal(band) >= 0)
+        {
+            _laneLeap = _min(length(matrix, DPMatrixDimension_::VERTICAL), bandSize(band));
+            _activeColIterator = begin(matrix, Standard()) + _dataLengths(matrix)[DPMatrixDimension_::VERTICAL] - 1;
+        }
+        else if (upperDiagonal(band) <= 0)  // Band begins within the first column.
+        {
+            _laneLeap = 1;
+            _activeColIterator = begin(matrix, Standard());
+        }
+        else  // Band intersects with the point of origin.
+        {
+            TMatrixSize lengthVertical = length(matrix, DPMatrixDimension_::VERTICAL);
+            int lastPos = _max(-static_cast<TSignedSize>(lengthVertical - 1), lowerDiagonal(band));
+            _laneLeap = lengthVertical + lastPos;
+            _activeColIterator = begin(matrix, Standard()) + _laneLeap - 1;
+        }
+        // Set previous iterator to same position, one column left.
+        _prevColIterator = _activeColIterator - _prevColIteratorOffset;
+        *_activeColIterator = TValue();
+    }
+
+    TDPMatrixPointer_ _ptrDataContainer{nullptr};   // Pointer to the matrix this navigator is working on.
+    int               _laneLeap{0};                 // Stores the jump to the next column
+    size_t            _prevColIteratorOffset{0};    // Offset to reset the previous column iterator when going to the next cell.
+    TDPMatrixIterator _activeColIterator{};         // The active column iterator.
+    TDPMatrixIterator _prevColIterator{};           // The previous column iterator.
 };
 
 // ============================================================================
@@ -82,324 +127,286 @@ public:
 // ============================================================================
 
 // ----------------------------------------------------------------------------
-// Function _init()
+// Function _goNextCell                                     [banded, FirstCell]
 // ----------------------------------------------------------------------------
 
-// Initializes the navigator for an unbanded alignment.
-template <typename TValue>
+// Needed to avoid ambigious overload.
+template <typename TValue, typename TDPMatrixSpec, typename THost>
 inline void
-_init(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix>, DPScoreMatrix, NavigateColumnWise> & navigator,
-      DPMatrix_<TValue, FullDPMatrix> & dpMatrix,
-      DPBandConfig<BandOff> const &)
-{
-    navigator._ptrDataContainer = &dpMatrix;
-    navigator._activeColIterator = begin(dpMatrix, Standard());
-    navigator._prevColIterator = navigator._activeColIterator - _dataFactors(dpMatrix)[DPMatrixDimension_::HORIZONTAL];
-    navigator._laneLeap = 1;
-    assignValue(navigator._activeColIterator, TValue());
-}
-
-// Initializes the navigator for a banded alignment.
-template <typename TValue>
-inline void
-_init(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix>, DPScoreMatrix, NavigateColumnWise> & navigator,
-      DPMatrix_<TValue, FullDPMatrix> & dpMatrix,
-      DPBandConfig<BandOn> const & band)
-{
-    typedef typename Size<DPMatrix_<TValue, FullDPMatrix> >::Type TMatrixSize;
-    typedef typename MakeSigned<TMatrixSize>::Type TSignedSize;
-    navigator._ptrDataContainer = &dpMatrix;
-
-
-    // Band begins within the first row.
-    if (lowerDiagonal(band) >= 0)
-    {
-        navigator._laneLeap = _min(length(dpMatrix, DPMatrixDimension_::VERTICAL), bandSize(band));
-        navigator._activeColIterator = begin(dpMatrix, Standard()) + _dataLengths(dpMatrix)[DPMatrixDimension_::VERTICAL] - 1;
-    }
-    else if (upperDiagonal(band) <= 0)  // Band begins within the first column.
-    {
-        navigator._laneLeap = 1;
-        navigator._activeColIterator = begin(dpMatrix, Standard());
-    }
-    else  // Band intersects with the point of origin.
-    {
-        TMatrixSize lengthVertical = length(dpMatrix, DPMatrixDimension_::VERTICAL);
-        int lastPos = _max(-static_cast<TSignedSize>(lengthVertical - 1), lowerDiagonal(band));
-        navigator._laneLeap = lengthVertical + lastPos;
-        navigator._activeColIterator = begin(dpMatrix, Standard()) + navigator._laneLeap - 1;
-    }
-    // Set previous iterator to same position, one column left.
-    navigator._prevColIterator = navigator._activeColIterator - _dataFactors(dpMatrix)[DPMatrixDimension_::HORIZONTAL];
-    assignValue(navigator._activeColIterator, TValue());
-}
-
-// ----------------------------------------------------------------------------
-// Function _goNextCell()                          [DPInitialColumn, FirstCell]
-// ----------------------------------------------------------------------------
-
-// In the initial column we don't need to do anything because, the navigagtor is already initialized.
-template <typename TValue>
-inline void
-_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix>, DPScoreMatrix, NavigateColumnWise> & /*dpNavigator*/,
+_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, TDPMatrixSpec, THost>, DPScoreMatrix, NavigateColumnWiseBanded> & /*dpNavigator*/,
             MetaColumnDescriptor<DPInitialColumn, PartialColumnTop> const &,
             FirstCell const &)
 {
     // no-op
 }
 
-template <typename TValue>
+// Needed to avoid ambigious overload.
+template <typename TValue, typename TDPMatrixSpec, typename THost>
 inline void
-_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix>, DPScoreMatrix, NavigateColumnWise> & /*dpNavigator*/,
+_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, TDPMatrixSpec, THost>, DPScoreMatrix, NavigateColumnWiseBanded> & /*dpNavigator*/,
             MetaColumnDescriptor<DPInitialColumn, FullColumn> const &,
             FirstCell const &)
 {
     // no-op
 }
 
-template <typename TValue, typename TColumnLocation>
+// specialized for initialization column and all other column locations.
+template <typename TValue, typename TDPMatrixSpec, typename THost,
+          typename TColumnLocation>
 inline void
-_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix>, DPScoreMatrix, NavigateColumnWise> & /*dpNavigator*/,
+_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, TDPMatrixSpec, THost>, DPScoreMatrix, NavigateColumnWiseBanded> & /*dpNavigator*/,
             MetaColumnDescriptor<DPInitialColumn, TColumnLocation> const &,
             FirstCell const &)
 {
     // no-op
 }
 
-// ----------------------------------------------------------------------------
-// Function _goNextCell()                         [PartialColumnTop, FirstCell]
-// ----------------------------------------------------------------------------
-
-// We are in the banded case, where the band crosses the first row.
-// The left cell of the active cell is not valid, beacause we only can come from horizontal direction.
-// The lower left cell of the active cell is the horizontal direction.
-template <typename TValue, typename TColumnType>
+//  specialized for all other column types located at the top.
+template <typename TValue, typename TDPMatrixSpec, typename THost,
+          typename TColumnType>
 inline void
-_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix>, DPScoreMatrix, NavigateColumnWise> & dpNavigator,
+_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, TDPMatrixSpec, THost>, DPScoreMatrix, NavigateColumnWiseBanded> & dpNavigator,
             MetaColumnDescriptor<TColumnType, PartialColumnTop> const &,
             FirstCell const &)
 {
     --dpNavigator._laneLeap;
     dpNavigator._activeColIterator += dpNavigator._laneLeap;
-    dpNavigator._prevColIterator += dpNavigator._laneLeap;
-    dpNavigator._prevCellHorizontal = value(++dpNavigator._prevColIterator);
+    dpNavigator._prevColIterator = dpNavigator._activeColIterator - dpNavigator._prevColIteratorOffset + 1;
 }
 
-// ----------------------------------------------------------------------------
-// Function _goNextCell()                               [FullColumn, FirstCell]
-// ----------------------------------------------------------------------------
-
-// We are in the unbanded case or in the middle phase of the wide band.
-// The left cell of the active cell represents horizontal direction.
-template <typename TValue, typename TColumnType>
+template <typename TValue, typename TDPMatrixSpec, typename THost,
+          typename TColumnType>
 inline void
-_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix>, DPScoreMatrix, NavigateColumnWise> & dpNavigator,
+_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, TDPMatrixSpec, THost>, DPScoreMatrix, NavigateColumnWiseBanded> & dpNavigator,
             MetaColumnDescriptor<TColumnType, FullColumn> const &,
             FirstCell const &)
 {
     dpNavigator._activeColIterator += dpNavigator._laneLeap;
-    dpNavigator._prevColIterator += dpNavigator._laneLeap;
-    dpNavigator._prevCellHorizontal = value(dpNavigator._prevColIterator);
+    dpNavigator._prevColIterator = dpNavigator._activeColIterator - dpNavigator._prevColIteratorOffset;
+}
+
+// version for all other column types and locations.
+template <typename TValue, typename TDPMatrixSpec, typename THost,
+          typename TColumnType, typename TColumnLocation>
+inline void
+_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, TDPMatrixSpec, THost>, DPScoreMatrix, NavigateColumnWiseBanded> & dpNavigator,
+            MetaColumnDescriptor<TColumnType, TColumnLocation> const &,
+            FirstCell const &)
+{
+    dpNavigator._activeColIterator += dpNavigator._laneLeap;
+    dpNavigator._prevColIterator = dpNavigator._activeColIterator - dpNavigator._prevColIteratorOffset + 1;
 }
 
 // ----------------------------------------------------------------------------
-// Function _goNextCell() [PartialColumnMiddle, PartialColumnBottom, FirstCell]
+// Function _goNextCell                                   [unbanded, FirstCell]
 // ----------------------------------------------------------------------------
 
-// We are in the banded case.
-// The left cell of the active cell represents diagonal direction. The lower left diagonal represents the horizontal direction.
+// specialized for initalization column.
+template <typename TValue, typename THost>
+inline void
+_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix, THost>, DPScoreMatrix, NavigateColumnWise> & /*dpNavigator*/,
+            MetaColumnDescriptor<DPInitialColumn, FullColumn> const &,
+            FirstCell const &)
+{
+    // no-op
+}
 
-template <typename TValue, typename TColumnType, typename TColumnLocation>
+// all other column types.
+template <typename TValue, typename THost,
+          typename TColumnType>
 inline void
-_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix>, DPScoreMatrix, NavigateColumnWise> & dpNavigator,
-            MetaColumnDescriptor<TColumnType, TColumnLocation> const &,
+_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix, THost>, DPScoreMatrix, NavigateColumnWise> & dpNavigator,
+            MetaColumnDescriptor<TColumnType, FullColumn> const &,
             FirstCell const &)
 {
+    // Set to begin of column.
     dpNavigator._activeColIterator += dpNavigator._laneLeap;
-    dpNavigator._prevColIterator += dpNavigator._laneLeap;
-    dpNavigator._prevCellDiagonal = value(dpNavigator._prevColIterator);
-    dpNavigator._prevCellHorizontal = value(++dpNavigator._prevColIterator);
+    dpNavigator._prevColIterator = dpNavigator._activeColIterator - dpNavigator._prevColIteratorOffset;
+
 }
 
 // ----------------------------------------------------------------------------
-// Function _goNextCell                            [DPInitialColumn, InnerCell]
+// Function _goNextCell                                     [banded, InnerCell]
 // ----------------------------------------------------------------------------
 
-// If we are in the initial column, we only need to represent the vertical direction.
-// But we still have to update the previous column iterator.
-template <typename TValue, typename TColumnLocation>
+// specilized for the initialization column and all column locations.
+template <typename TValue, typename TDPMatrixSpec, typename THost,
+          typename TColumnLocation>
 inline void
-_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix>, DPScoreMatrix, NavigateColumnWise> & dpNavigator,
+_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, TDPMatrixSpec, THost>, DPScoreMatrix, NavigateColumnWiseBanded> & dpNavigator,
             MetaColumnDescriptor<DPInitialColumn, TColumnLocation> const &,
             InnerCell const &)
 {
-    dpNavigator._prevCellVertical = value(dpNavigator._activeColIterator);
     ++dpNavigator._activeColIterator;
-    ++dpNavigator._prevColIterator;  // Do we have to increase the prevColIterator....
 }
 
-// ----------------------------------------------------------------------------
-// Function _goNextCell                                  [AnyColumn, InnerCell]
-// ----------------------------------------------------------------------------
-
-// For any other column type and location we can use the same navigation procedure.
-template <typename TValue, typename TColumnType, typename TColumnLocation>
+// specialized for the standard band processing.
+template <typename TValue, typename TDPMatrixSpec, typename THost,
+          typename TColumnType, typename TColumnLocation>
 inline void
-_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix>, DPScoreMatrix, NavigateColumnWise> & dpNavigator,
+_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, TDPMatrixSpec, THost>, DPScoreMatrix, NavigateColumnWiseBanded> & dpNavigator,
             MetaColumnDescriptor<TColumnType, TColumnLocation> const &,
             InnerCell const &)
 {
-    dpNavigator._prevCellDiagonal = dpNavigator._prevCellHorizontal;
-    dpNavigator._prevCellVertical = value(dpNavigator._activeColIterator);
-    dpNavigator._prevCellHorizontal = value(++dpNavigator._prevColIterator);
     ++dpNavigator._activeColIterator;
+    ++dpNavigator._prevColIterator;
 }
 
 // ----------------------------------------------------------------------------
-// Function _goNextCell                             [DPInitialColumn, LastCell]
+// Function _goNextCell                                   [unbanded, InnerCell]
 // ----------------------------------------------------------------------------
 
-// If we are in the initial column we only need to represent the vertical direction.
-// But we still have to update the previous column iterator.
-template <typename TValue, typename TColumnLocation>
+// specialized for the initialization column.
+template <typename TValue, typename THost>
 inline void
-_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix>, DPScoreMatrix, NavigateColumnWise> & dpNavigator,
-            MetaColumnDescriptor<DPInitialColumn, TColumnLocation> const &,
-            LastCell const &)
+_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix, THost>, DPScoreMatrix, NavigateColumnWise> & dpNavigator,
+            MetaColumnDescriptor<DPInitialColumn, FullColumn> const &,
+            InnerCell const &)
 {
-    dpNavigator._prevCellVertical = value(dpNavigator._activeColIterator);
     ++dpNavigator._activeColIterator;
-    ++dpNavigator._prevColIterator;
 }
 
-// We need this function to avoid ambiguous function calls.
-template <typename TValue>
+// version for the all other column types.
+template <typename TValue, typename THost,
+          typename TColumnType>
 inline void
-_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix>, DPScoreMatrix, NavigateColumnWise> & dpNavigator,
-            MetaColumnDescriptor<DPInitialColumn, PartialColumnBottom> const &,
-            LastCell const &)
+_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix, THost>, DPScoreMatrix, NavigateColumnWise> & dpNavigator,
+            MetaColumnDescriptor<TColumnType, FullColumn> const &,
+            InnerCell const &)
 {
-    dpNavigator._prevCellVertical = value(dpNavigator._activeColIterator);
     ++dpNavigator._activeColIterator;
     ++dpNavigator._prevColIterator;
 }
 
-// We need this function to avoid ambiguous function calls.
-template <typename TValue>
+// ----------------------------------------------------------------------------
+// Function _goNextCell                                      [banded, LastCell]
+// ----------------------------------------------------------------------------
+
+// specilaized for initialization column and bottom column.
+template <typename TValue, typename TDPMatrixSpec, typename THost>
 inline void
-_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix>, DPScoreMatrix, NavigateColumnWise> & dpNavigator,
-            MetaColumnDescriptor<DPInitialColumn, FullColumn> const &,
+_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, TDPMatrixSpec, THost>, DPScoreMatrix, NavigateColumnWiseBanded> & dpNavigator,
+            MetaColumnDescriptor<DPInitialColumn, PartialColumnBottom> const &,
             LastCell const &)
 {
-    dpNavigator._prevCellVertical = value(dpNavigator._activeColIterator);
     ++dpNavigator._activeColIterator;
-    ++dpNavigator._prevColIterator;
 }
 
-// ----------------------------------------------------------------------------
-// Function _goNextCell                                  [FullColumn, LastCell]
-// ----------------------------------------------------------------------------
-
-// If we are in a full column the values correspond to standard dp directions.
-template <typename TValue, typename TColumnType>
+// specilaized for initialization column and all other column locations.
+template <typename TValue, typename TDPMatrixSpec, typename THost,
+          typename TColumnLocation>
 inline void
-_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix>, DPScoreMatrix, NavigateColumnWise> & dpNavigator,
-            MetaColumnDescriptor<TColumnType, FullColumn> const &,
+_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, TDPMatrixSpec, THost>, DPScoreMatrix, NavigateColumnWiseBanded> & dpNavigator,
+            MetaColumnDescriptor<DPInitialColumn, TColumnLocation> const &,
             LastCell const &)
 {
-    dpNavigator._prevCellDiagonal = dpNavigator._prevCellHorizontal;
-    dpNavigator._prevCellVertical = value(dpNavigator._activeColIterator);
-    dpNavigator._prevCellHorizontal = value(++dpNavigator._prevColIterator);
     ++dpNavigator._activeColIterator;
 }
 
-// ----------------------------------------------------------------------------
-// Function _goNextCell                         [PartialColumnBottom, LastCell]
-// ----------------------------------------------------------------------------
-
-// If we are in banded case and are the band crosses the last row, we have to update
-// the additional leap for the current track.
-template <typename TValue, typename TColumnType>
+// specialized for all column types and bottom column.
+template <typename TValue, typename TDPMatrixSpec, typename THost,
+          typename TColumnType>
 inline void
-_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix>, DPScoreMatrix, NavigateColumnWise> & dpNavigator,
+_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, TDPMatrixSpec, THost>, DPScoreMatrix, NavigateColumnWiseBanded> & dpNavigator,
             MetaColumnDescriptor<TColumnType, PartialColumnBottom> const &,
             LastCell const &)
 {
-    dpNavigator._prevCellDiagonal = dpNavigator._prevCellHorizontal;
-    dpNavigator._prevCellVertical = value(dpNavigator._activeColIterator);
-    dpNavigator._prevCellHorizontal = value(++dpNavigator._prevColIterator);
     ++dpNavigator._activeColIterator;
+    ++dpNavigator._prevColIterator;
     ++dpNavigator._laneLeap;
 }
 
-// ----------------------------------------------------------------------------
-// Function _goNextCell      [PartialColumnTop & PartialColumnBottom, LastCell]
-// ----------------------------------------------------------------------------
-
-// If we are in the banded case the left cell of the active represents the diagonal direction.
-template <typename TValue, typename TColumnType, typename TColumnLocation>
+// generic case for all other column types and column locations.
+template <typename TValue, typename TDPMatrixSpec, typename THost,
+          typename TColumnType, typename TColumnLocation>
 inline void
-_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix>, DPScoreMatrix, NavigateColumnWise> & dpNavigator,
+_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, TDPMatrixSpec, THost>, DPScoreMatrix, NavigateColumnWiseBanded> & dpNavigator,
             MetaColumnDescriptor<TColumnType, TColumnLocation> const &,
             LastCell const &)
 {
-    dpNavigator._prevCellDiagonal = dpNavigator._prevCellHorizontal;
-    dpNavigator._prevCellVertical = value(dpNavigator._activeColIterator);
     ++dpNavigator._activeColIterator;
+    ++dpNavigator._prevColIterator;
 }
 
 // ----------------------------------------------------------------------------
-// Function previousCellDiagonal()
+// Function _goNextCell                                    [unbanded, LastCell]
 // ----------------------------------------------------------------------------
 
-template <typename TDPMatrix, typename TNavigationSpec>
-inline typename Reference<DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, TNavigationSpec> >::Type
-previousCellDiagonal(DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, TNavigationSpec> & dpNavigator)
+// specilaized for initialization column.
+template <typename TValue, typename THost>
+inline void
+_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix, THost>, DPScoreMatrix, NavigateColumnWise> & dpNavigator,
+            MetaColumnDescriptor<DPInitialColumn, FullColumn> const &,
+            LastCell const &)
 {
-    return dpNavigator._prevCellDiagonal;
+    ++dpNavigator._activeColIterator;
 }
 
-template <typename TDPMatrix, typename TNavigationSpec>
-inline typename Reference<DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, TNavigationSpec> const>::Type
-previousCellDiagonal(DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, TNavigationSpec> const & dpNavigator)
+// version for all other column types.
+template <typename TValue, typename THost,
+          typename TColumnType>
+inline void
+_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix, THost>, DPScoreMatrix, NavigateColumnWise> & dpNavigator,
+            MetaColumnDescriptor<TColumnType, FullColumn> const &,
+            LastCell const &)
 {
-    return dpNavigator._prevCellDiagonal;
+    ++dpNavigator._activeColIterator; // go to next cell.
+    ++dpNavigator._prevColIterator; // go to next cell.
 }
 
 // ----------------------------------------------------------------------------
-// Function previousCellHorizontal()
+// Function _preInitCacheDiagonal()
 // ----------------------------------------------------------------------------
 
-template <typename TDPMatrix, typename TNavigationSpec>
-inline typename Reference<DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, TNavigationSpec> >::Type
-previousCellHorizontal(DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, TNavigationSpec> & dpNavigator)
+template <typename TDPCell,
+          typename TValue, typename TMatrixSpec, typename THost,
+          typename TColumnType>
+inline void
+_preInitCacheDiagonal(TDPCell & cacheDiagonal,
+                      DPMatrixNavigator_<DPMatrix_<TValue, TMatrixSpec, THost>, DPScoreMatrix, NavigateColumnWiseBanded> const & dpNavigator,
+                      MetaColumnDescriptor<TColumnType, PartialColumnMiddle> const & /*tag*/)
 {
-    return dpNavigator._prevCellHorizontal;
+    _scoreOfCell(cacheDiagonal) = _scoreOfCell(*(dpNavigator._prevColIterator - 1));
 }
 
-template <typename TDPMatrix, typename TNavigationSpec>
-inline typename Reference<DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, TNavigationSpec> const>::Type
-previousCellHorizontal(DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, TNavigationSpec> const & dpNavigator)
+template <typename TDPCell,
+          typename TValue, typename TMatrixSpec, typename THost,
+          typename TColumnType>
+inline void
+_preInitCacheDiagonal(TDPCell & cacheDiagonal,
+                      DPMatrixNavigator_<DPMatrix_<TValue, TMatrixSpec, THost>, DPScoreMatrix, NavigateColumnWiseBanded> const & dpNavigator,
+                      MetaColumnDescriptor<TColumnType, PartialColumnBottom> const & /*tag*/)
 {
-    return dpNavigator._prevCellHorizontal;
+    _scoreOfCell(cacheDiagonal) = _scoreOfCell(*(dpNavigator._prevColIterator - 1));
+}
+
+template <typename TDPCell,
+          typename TValue, typename TMatrixSpec, typename THost, typename TNavigationSpec,
+          typename TColumnType, typename TColumnLocation>
+inline void
+_preInitCacheDiagonal(TDPCell & /*cacheDiagonal*/,
+                      DPMatrixNavigator_<DPMatrix_<TValue, TMatrixSpec, THost>, DPScoreMatrix, TNavigationSpec> const & /*dpNavigator*/,
+                      MetaColumnDescriptor<TColumnType, TColumnLocation> const & /*tag*/)
+{
+    // no-op
 }
 
 // ----------------------------------------------------------------------------
-// Function previousCellVertical()
+// Function previousCellHorizontal()
 // ----------------------------------------------------------------------------
 
 template <typename TDPMatrix, typename TNavigationSpec>
 inline typename Reference<DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, TNavigationSpec> >::Type
-previousCellVertical(DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, TNavigationSpec> & dpNavigator)
+previousCellHorizontal(DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, TNavigationSpec> & dpNavigator)
 {
-    return dpNavigator._prevCellVertical;
+    return *dpNavigator._prevColIterator;
 }
 
 template <typename TDPMatrix, typename TNavigationSpec>
 inline typename Reference<DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, TNavigationSpec> const>::Type
-previousCellVertical(DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, TNavigationSpec> const & dpNavigator)
+previousCellHorizontal(DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, TNavigationSpec> const & dpNavigator)
 {
-    return dpNavigator._prevCellVertical;
+    return *dpNavigator._prevColIterator;
 }
 
 }  // namespace seqan
diff --git a/include/seqan/align/dp_matrix_navigator_score_matrix_sparse.h b/include/seqan/align/dp_matrix_navigator_score_matrix_sparse.h
index acc3267..18fb974 100644
--- a/include/seqan/align/dp_matrix_navigator_score_matrix_sparse.h
+++ b/include/seqan/align/dp_matrix_navigator_score_matrix_sparse.h
@@ -1,7 +1,8 @@
+
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -54,21 +55,60 @@ namespace seqan {
 // ----------------------------------------------------------------------------
 
 // Specialization of the score matrix navigator for a sparse dp matrix.
-template <typename TValue>
-class DPMatrixNavigator_<DPMatrix_<TValue, SparseDPMatrix>, DPScoreMatrix, NavigateColumnWise>
+template <typename TValue, typename THost, typename TNavigationSpec>
+class DPMatrixNavigator_<DPMatrix_<TValue, SparseDPMatrix, THost>, DPScoreMatrix, TNavigationSpec>
 {
 public:
-    typedef  DPMatrix_<TValue, SparseDPMatrix> TDPMatrix_;
+    typedef  DPMatrix_<TValue, SparseDPMatrix, THost> TDPMatrix_;
     typedef typename Pointer_<TDPMatrix_>::Type TDPMatrixPointer_;
     typedef typename Iterator<TDPMatrix_, Standard>::Type TDPMatrixIterator;
 
-    TDPMatrixPointer_ _ptrDataContainer     = nullptr;  // Pointer to the underlying matrix to navigate on.
-    int _laneLeap                           = 0;  // The distance to leap when going to the next column.
-    TDPMatrixIterator _activeColIterator    = TDPMatrixIterator();  // The iterator over the active column.
-    TDPMatrixIterator _prevColIterator      = TDPMatrixIterator();  // The iterator over the previous column.
-    TValue _prevCellDiagonal                = TValue();  // The previous value in diagonal direction.
-    TValue _prevCellHorizontal              = TValue();  // The previous value in horizontal direction.
-    TValue _prevCellVertical                = TValue();  // The previous value in vertical direction.
+    template <typename TBandSpec,
+              std::enable_if_t<std::is_same<TBandSpec, BandOff>::value, int> = 0>
+    DPMatrixNavigator_(TDPMatrix_ & matrix,
+                       DPBandConfig<TBandSpec> const & /*band*/)
+    {
+        _ptrDataContainer = &matrix;
+        _activeColIterator = begin(matrix, Standard());
+        _prevColIterator = _activeColIterator;
+        _laneLeap = 1 - _dataLengths(matrix)[DPMatrixDimension_::VERTICAL];
+        *_activeColIterator = TValue();
+    }
+
+    template <typename TBandSpec,
+              std::enable_if_t<!std::is_same<TBandSpec, BandOff>::value, int> = 0>
+    DPMatrixNavigator_(TDPMatrix_ & matrix,
+                       DPBandConfig<TBandSpec> const & band)
+    {
+        typedef typename Size<TDPMatrix_>::Type TSize;
+        typedef std::make_signed_t<TSize> TSignedSize;
+        _ptrDataContainer = &matrix;
+
+        // Band begins within the first row.
+        if (lowerDiagonal(band) >= 0)
+        {
+            _laneLeap = 0;
+            _activeColIterator = begin(matrix, Standard()) + length(matrix, DPMatrixDimension_::VERTICAL) - 1;
+        }
+        else if (upperDiagonal(band) <= 0) // Band begins within the first column
+        {
+            _laneLeap = 1 - _dataLengths(matrix)[DPMatrixDimension_::VERTICAL];
+            _activeColIterator = begin(matrix, Standard());
+        }
+        else  // Band intersects with the point of origin.
+        {
+            _laneLeap = _max(lowerDiagonal(band), 1 - static_cast<TSignedSize>(length(matrix, DPMatrixDimension_::VERTICAL)));
+            _activeColIterator = begin(matrix, Standard()) + length(matrix, DPMatrixDimension_::VERTICAL) + _laneLeap - 1;
+        }
+        _prevColIterator = _activeColIterator;
+        *_activeColIterator = TValue();
+    }
+
+    TDPMatrixPointer_ _ptrDataContainer{nullptr};   // Pointer to the underlying matrix to navigate on.
+    int               _laneLeap{0};                 // The distance to leap when going to the next column.
+    size_t            _prevColIteratorOffset{0};    // Offset to reset the previous column iterator when going to the next cell.
+    TDPMatrixIterator _activeColIterator{};         // The iterator over the active column.
+    TDPMatrixIterator _prevColIterator{};           // The iterator over the previous column. Only needed in the banded case.
 };
 
 // ============================================================================
@@ -80,288 +120,133 @@ public:
 // ============================================================================
 
 // ----------------------------------------------------------------------------
-// Function _init()
-// ----------------------------------------------------------------------------
-
-
-// Initializes the navigator for unbanded alignments
-template <typename TValue>
-inline void
-_init(DPMatrixNavigator_<DPMatrix_<TValue, SparseDPMatrix>, DPScoreMatrix, NavigateColumnWise> & navigator,
-      DPMatrix_<TValue, SparseDPMatrix> & dpMatrix,
-      DPBandConfig<BandOff> const &)
-{
-    navigator._ptrDataContainer = &dpMatrix;
-    navigator._activeColIterator = begin(dpMatrix, Standard());
-    navigator._prevColIterator = navigator._activeColIterator;
-    navigator._laneLeap = 1 - _dataLengths(dpMatrix)[DPMatrixDimension_::VERTICAL];
-    assignValue(navigator._activeColIterator, TValue());
-}
-
-// Initializes the navigator for banded alignments
-template <typename TValue>
-inline void
-_init(DPMatrixNavigator_<DPMatrix_<TValue, SparseDPMatrix>, DPScoreMatrix, NavigateColumnWise> & navigator,
-      DPMatrix_<TValue, SparseDPMatrix> & dpMatrix,
-      DPBandConfig<BandOn> const & band)
-{
-    typedef DPMatrix_<TValue, SparseDPMatrix> TSparseDPMatrix;
-    typedef typename Size<TSparseDPMatrix>::Type TSize;
-    typedef typename MakeSigned<TSize>::Type TSignedSize;
-    navigator._ptrDataContainer = &dpMatrix;
-
-    // Band begins within the first row.
-    if (lowerDiagonal(band) >= 0)
-    {
-        navigator._laneLeap = 0;
-        navigator._activeColIterator = begin(dpMatrix, Standard()) + length(dpMatrix, DPMatrixDimension_::VERTICAL) - 1;
-    }
-    else if (upperDiagonal(band) <= 0) // Band begins within the first column
-    {
-        navigator._laneLeap = 1 - _dataLengths(dpMatrix)[DPMatrixDimension_::VERTICAL];
-        navigator._activeColIterator = begin(dpMatrix, Standard());
-    }
-    else  // Band intersects with the point of origin.
-    {
-        navigator._laneLeap = _max(lowerDiagonal(band), 1 - static_cast<TSignedSize>(length(dpMatrix, DPMatrixDimension_::VERTICAL)));
-        navigator._activeColIterator = begin(dpMatrix, Standard()) + length(dpMatrix, DPMatrixDimension_::VERTICAL) + navigator._laneLeap - 1;
-    }
-    navigator._prevColIterator = navigator._activeColIterator;
-    assignValue(navigator._activeColIterator, TValue());
-}
-
-// ----------------------------------------------------------------------------
-// Function _goNextCell()        [DPInitialColumn, PartialColumnTop, FirstCell]
-// ----------------------------------------------------------------------------
-
-template <typename TValue>
-inline void
-_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, SparseDPMatrix>, DPScoreMatrix, NavigateColumnWise> & /*dpNavigator*/,
-            MetaColumnDescriptor<DPInitialColumn, PartialColumnTop> const &,
-            FirstCell const &)
-{
-    // no-op
-}
-
-// ----------------------------------------------------------------------------
-// Function _goNextCell()              [DPInitialColumn, FullColumn, FirstCell]
+// Function _goNextCell                                   [unbanded, FirstCell]
 // ----------------------------------------------------------------------------
 
-template <typename TValue>
+// specialized for initalization column.
+template <typename TValue, typename THost>
 inline void
-_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, SparseDPMatrix>, DPScoreMatrix, NavigateColumnWise> & /*dpNavigator*/,
+_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, SparseDPMatrix, THost>, DPScoreMatrix, NavigateColumnWise> & /*dpNavigator*/,
             MetaColumnDescriptor<DPInitialColumn, FullColumn> const &,
             FirstCell const &)
 {
     // no-op
 }
 
-// ----------------------------------------------------------------------------
-// Function _goNextCell()                          [DPInitialColumn, FirstCell]
-// ----------------------------------------------------------------------------
-
-template <typename TValue, typename TColumnLocation>
+// all other column types.
+template <typename TValue, typename THost,
+          typename TColumnType>
 inline void
-_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, SparseDPMatrix>, DPScoreMatrix, NavigateColumnWise> & /*dpNavigator*/,
-            MetaColumnDescriptor<DPInitialColumn, TColumnLocation> const &,
-            FirstCell const &)
-{
-    // no-op
-}
-
-// ----------------------------------------------------------------------------
-// Function _goNextCell()                         [PartialColumnTop, FirstCell]
-// ----------------------------------------------------------------------------
-
-template <typename TValue, typename TColumnType>
-inline void
-_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, SparseDPMatrix>, DPScoreMatrix, NavigateColumnWise> & dpNavigator,
-            MetaColumnDescriptor<TColumnType, PartialColumnTop> const &,
-            FirstCell const &)
-{
-    --dpNavigator._laneLeap;
-    dpNavigator._activeColIterator += dpNavigator._laneLeap;
-    dpNavigator._prevColIterator = dpNavigator._activeColIterator;
-    dpNavigator._prevCellHorizontal = value(++dpNavigator._prevColIterator);
-}
-
-// ----------------------------------------------------------------------------
-// Function _goNextCell()                               [FullColumn, FirstCell]
-// ----------------------------------------------------------------------------
-
-template <typename TValue, typename TColumnType>
-inline void
-_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, SparseDPMatrix>, DPScoreMatrix, NavigateColumnWise> & dpNavigator,
+_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, SparseDPMatrix, THost>, DPScoreMatrix, NavigateColumnWise> & dpNavigator,
             MetaColumnDescriptor<TColumnType, FullColumn> const &,
             FirstCell const &)
 {
+    // Set to begin of column.
     dpNavigator._activeColIterator += dpNavigator._laneLeap;
-    dpNavigator._prevCellHorizontal = value(dpNavigator._activeColIterator);
-}
-
-// ----------------------------------------------------------------------------
-// Function _goNextCell()                                           [FirstCell]
-// ----------------------------------------------------------------------------
-
-template <typename TValue, typename TColumnType, typename TColumnLocation>
-inline void
-_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, SparseDPMatrix>, DPScoreMatrix, NavigateColumnWise> & dpNavigator,
-            MetaColumnDescriptor<TColumnType, TColumnLocation> const &,
-            FirstCell const &)
-{
-    dpNavigator._activeColIterator += dpNavigator._laneLeap;
-    dpNavigator._prevColIterator = dpNavigator._activeColIterator;
-    dpNavigator._prevCellDiagonal = value(dpNavigator._prevColIterator);
-    dpNavigator._prevCellHorizontal = value(++dpNavigator._prevColIterator);
 }
 
 // ----------------------------------------------------------------------------
-// Function _goNextCell                            [DPInitialColumn, InnerCell]
+// Function _goNextCell                                   [unbanded, InnerCell]
 // ----------------------------------------------------------------------------
 
-template <typename TValue, typename TColumnLocation>
+// specialized for the initialization column.
+template <typename TValue, typename THost>
 inline void
-_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, SparseDPMatrix>, DPScoreMatrix, NavigateColumnWise> & dpNavigator,
-            MetaColumnDescriptor<DPInitialColumn, TColumnLocation> const &,
-            InnerCell const &)
-{
-    dpNavigator._prevCellVertical = value(dpNavigator._activeColIterator);
-    ++dpNavigator._activeColIterator;
-}
-
-// ----------------------------------------------------------------------------
-// Function _goNextCell                [DPInitialColumn, FullColumn, InnerCell]
-// ----------------------------------------------------------------------------
-
-template <typename TValue>
-inline void
-_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, SparseDPMatrix>, DPScoreMatrix, NavigateColumnWise> & dpNavigator,
+_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, SparseDPMatrix, THost>, DPScoreMatrix, NavigateColumnWise> & dpNavigator,
             MetaColumnDescriptor<DPInitialColumn, FullColumn> const &,
             InnerCell const &)
 {
-    dpNavigator._prevCellVertical = value(dpNavigator._activeColIterator);
-    ++dpNavigator._activeColIterator;
-}
-
-// ----------------------------------------------------------------------------
-// Function _goNextCell                                             [InnerCell]
-// ----------------------------------------------------------------------------
-
-template <typename TValue, typename TColumnType, typename TColumnLocation>
-inline void
-_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, SparseDPMatrix>, DPScoreMatrix, NavigateColumnWise> & dpNavigator,
-            MetaColumnDescriptor<TColumnType, TColumnLocation> const &,
-            InnerCell const &)
-{
-    dpNavigator._prevCellDiagonal = dpNavigator._prevCellHorizontal;
-    dpNavigator._prevCellVertical = value(dpNavigator._activeColIterator);
-    dpNavigator._prevCellHorizontal = value(++dpNavigator._prevColIterator);
     ++dpNavigator._activeColIterator;
 }
 
-// ----------------------------------------------------------------------------
-// Function _goNextCell                                 [FullColumn, InnerCell]
-// ----------------------------------------------------------------------------
-
-template <typename TValue, typename TColumnType>
+// version for the all other column types.
+template <typename TValue, typename THost,
+          typename TColumnType>
 inline void
-_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, SparseDPMatrix>, DPScoreMatrix, NavigateColumnWise> & dpNavigator,
+_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, SparseDPMatrix, THost>, DPScoreMatrix, NavigateColumnWise> & dpNavigator,
             MetaColumnDescriptor<TColumnType, FullColumn> const &,
             InnerCell const &)
 {
-    dpNavigator._prevCellDiagonal = dpNavigator._prevCellHorizontal;
-    dpNavigator._prevCellVertical = value(dpNavigator._activeColIterator);
-    dpNavigator._prevCellHorizontal = value(++dpNavigator._activeColIterator);
+    ++dpNavigator._activeColIterator;
 }
 
 // ----------------------------------------------------------------------------
-// Function _goNextCell                             [DPInitialColumn, LastCell]
+// Function _goNextCell                                    [unbanded, LastCell]
 // ----------------------------------------------------------------------------
 
-template <typename TValue, typename TColumnLocation>
+// specilaized for initialization column.
+template <typename TValue, typename THost>
 inline void
-_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, SparseDPMatrix>, DPScoreMatrix, NavigateColumnWise> & dpNavigator,
-            MetaColumnDescriptor<DPInitialColumn, TColumnLocation> const &,
+_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, SparseDPMatrix, THost>, DPScoreMatrix, NavigateColumnWise> & dpNavigator,
+            MetaColumnDescriptor<DPInitialColumn, FullColumn> const &,
             LastCell const &)
 {
-    dpNavigator._prevCellVertical = value(dpNavigator._activeColIterator);
     ++dpNavigator._activeColIterator;
 }
 
-// ----------------------------------------------------------------------------
-// Function _goNextCell        [DPInitialColumn, PartialColumnBottom, LastCell]
-// ----------------------------------------------------------------------------
-
-template <typename TValue>
+// version for all other column types.
+template <typename TValue, typename THost,
+          typename TColumnType>
 inline void
-_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, SparseDPMatrix>, DPScoreMatrix, NavigateColumnWise> & dpNavigator,
-            MetaColumnDescriptor<DPInitialColumn, PartialColumnBottom> const &,
+_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, SparseDPMatrix, THost>, DPScoreMatrix, NavigateColumnWise> & dpNavigator,
+            MetaColumnDescriptor<TColumnType, FullColumn> const &,
             LastCell const &)
 {
-    dpNavigator._prevCellVertical = value(dpNavigator._activeColIterator);
-    ++dpNavigator._activeColIterator;
+    ++dpNavigator._activeColIterator; // go to next cell.
 }
 
 // ----------------------------------------------------------------------------
-// Function _goNextCell                 [DPInitialColumn, FullColumn, LastCell]
+// Function previousCellHorizontal()
 // ----------------------------------------------------------------------------
 
-template <typename TValue>
-inline void
-_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, SparseDPMatrix>, DPScoreMatrix, NavigateColumnWise> & dpNavigator,
-            MetaColumnDescriptor<DPInitialColumn, FullColumn> const &,
-            LastCell const &)
+// unbanded.
+template <typename TValue, typename THost>
+inline typename Reference<DPMatrixNavigator_<DPMatrix_<TValue, SparseDPMatrix, THost>,
+                                             DPScoreMatrix,
+                                             NavigateColumnWise>
+                         >::Type
+previousCellHorizontal(DPMatrixNavigator_<DPMatrix_<TValue, SparseDPMatrix, THost>,
+                                          DPScoreMatrix,
+                                          NavigateColumnWise> & dpNavigator)
 {
-    dpNavigator._prevCellVertical = value(dpNavigator._activeColIterator);
-    ++dpNavigator._activeColIterator;
+    return *dpNavigator._activeColIterator;
 }
 
-// ----------------------------------------------------------------------------
-// Function _goNextCell                                              [LastCell]
-// ----------------------------------------------------------------------------
-
-template <typename TValue, typename TColumnType, typename TColumnLocation>
-inline void
-_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, SparseDPMatrix>, DPScoreMatrix, NavigateColumnWise> & dpNavigator,
-            MetaColumnDescriptor<TColumnType, TColumnLocation> const &,
-            LastCell const &)
+template <typename TValue, typename THost, typename TNavigationSpec>
+inline typename Reference<DPMatrixNavigator_<DPMatrix_<TValue, SparseDPMatrix, THost>,
+                                             DPScoreMatrix,
+                                             NavigateColumnWise> const
+                         >::Type
+previousCellHorizontal(DPMatrixNavigator_<DPMatrix_<TValue, SparseDPMatrix, THost>,
+                                          DPScoreMatrix,
+                                          NavigateColumnWise> const & dpNavigator)
 {
-    dpNavigator._prevCellDiagonal = dpNavigator._prevCellHorizontal;
-    dpNavigator._prevCellVertical = value(dpNavigator._activeColIterator);
-    ++dpNavigator._activeColIterator;
+    return *dpNavigator._activeColIterator;
 }
 
-// ----------------------------------------------------------------------------
-// Function _goNextCell                         [PartialColumnBottom, LastCell]
-// ----------------------------------------------------------------------------
-
-template <typename TValue, typename TColumnType>
-inline void
-_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, SparseDPMatrix>, DPScoreMatrix, NavigateColumnWise> & dpNavigator,
-            MetaColumnDescriptor<TColumnType, PartialColumnBottom> const &,
-            LastCell const &)
+// banded.
+template <typename TValue, typename THost>
+inline typename Reference<DPMatrixNavigator_<DPMatrix_<TValue, SparseDPMatrix, THost>,
+                                             DPScoreMatrix,
+                                             NavigateColumnWiseBanded>
+                         >::Type
+previousCellHorizontal(DPMatrixNavigator_<DPMatrix_<TValue, SparseDPMatrix, THost>,
+                                          DPScoreMatrix,
+                                          NavigateColumnWiseBanded> & dpNavigator)
 {
-    dpNavigator._prevCellDiagonal = dpNavigator._prevCellHorizontal;
-    dpNavigator._prevCellVertical = value(dpNavigator._activeColIterator);
-    dpNavigator._prevCellHorizontal = value(++dpNavigator._prevColIterator);
-    ++dpNavigator._activeColIterator;
-    ++dpNavigator._laneLeap;
+    return *dpNavigator._prevColIterator;
 }
 
-// ----------------------------------------------------------------------------
-// Function _goNextCell                                  [FullColumn, LastCell]
-// ----------------------------------------------------------------------------
-
-
-template <typename TValue, typename TColumnType>
-inline void
-_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, SparseDPMatrix>, DPScoreMatrix, NavigateColumnWise> & dpNavigator,
-            MetaColumnDescriptor<TColumnType, FullColumn> const &,
-            LastCell const &)
+template <typename TValue, typename THost>
+inline typename Reference<DPMatrixNavigator_<DPMatrix_<TValue, SparseDPMatrix, THost>,
+                                             DPScoreMatrix,
+                                             NavigateColumnWiseBanded> const
+                         >::Type
+previousCellHorizontal(DPMatrixNavigator_<DPMatrix_<TValue, SparseDPMatrix, THost>,
+                                          DPScoreMatrix,
+                                          NavigateColumnWiseBanded> const & dpNavigator)
 {
-    dpNavigator._prevCellDiagonal = dpNavigator._prevCellHorizontal;
-    dpNavigator._prevCellVertical = value(dpNavigator._activeColIterator);
-    dpNavigator._prevCellHorizontal = value(++dpNavigator._activeColIterator);
+    return *(dpNavigator._prevColIterator);
 }
 
 }  // namespace seqan
diff --git a/include/seqan/align/dp_matrix_navigator_trace_matrix.h b/include/seqan/align/dp_matrix_navigator_trace_matrix.h
index 0fc7233..3735d2a 100644
--- a/include/seqan/align/dp_matrix_navigator_trace_matrix.h
+++ b/include/seqan/align/dp_matrix_navigator_trace_matrix.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -64,19 +64,70 @@ namespace seqan {
 // specifies that this is a trace-matrix navigator while the TTraceFlag can either
 // be TracebackOn to enable the navigator or TracebackOff to disable it.
 // The last parameter specifies the kind of navigation.
-template <typename TValue, typename TTraceFlag>
-class DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix>, DPTraceMatrix<TTraceFlag>, NavigateColumnWise>
+template <typename TValue, typename THost, typename TTraceFlag, typename TNavigationSpec>
+class DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix, THost>, DPTraceMatrix<TTraceFlag>, TNavigationSpec>
 {
 public:
 
-    typedef  DPMatrix_<TValue, FullDPMatrix> TDPMatrix_;
+    typedef  DPMatrix_<TValue, FullDPMatrix, THost> TDPMatrix_;
     typedef typename Pointer_<TDPMatrix_>::Type TDPMatrixPointer_;
     typedef typename Iterator<TDPMatrix_, Standard>::Type TDPMatrixIterator;
 
-    TDPMatrixPointer_   _ptrDataContainer  = nullptr;  // The pointer to the underlying Matrix.
-    int                 _laneLeap          = 0;  // Keeps track of the jump size from one column to another.
-    unsigned            _simdLane          = 0;  // Used for tracing the correct cell in case of simd vectors.
-    TDPMatrixIterator   _activeColIterator = TDPMatrixIterator();  // The current column iterator.
+    template <typename TBandSpec,
+              std::enable_if_t<std::is_same<TBandSpec, BandOff>::value, int> = 0>
+    DPMatrixNavigator_(TDPMatrix_ & matrix,
+                       DPBandConfig<TBandSpec> const & /*band*/)
+    {
+        if (IsSameType<TTraceFlag, TracebackOff>::VALUE)
+            return;  // Leave navigator uninitialized because it is never used.
+
+        _ptrDataContainer = &matrix;
+        _activeColIterator = begin(matrix, Standard());
+        _laneLeap = 1;
+        *_activeColIterator = TValue();
+    }
+
+    template <typename TBandSpec,
+              std::enable_if_t<!std::is_same<TBandSpec, BandOff>::value, int> = 0>
+    DPMatrixNavigator_(TDPMatrix_ & matrix,
+                       DPBandConfig<TBandSpec> const & band)
+    {
+        using TMatrixSize = typename Size<TDPMatrix_>::Type;
+        using TSignedSize = std::make_signed_t<TMatrixSize>;
+
+        if (std::is_same<TTraceFlag, TracebackOff>::value)
+            return;  // Leave navigator as is because it should never be used.
+
+        _ptrDataContainer = &matrix;
+
+        // Band begins within the first row.
+        if (lowerDiagonal(band) >= 0)
+        {
+            // The first cell of the first column starts at the last cell in the matrix of the current column.
+            _laneLeap = _min(length(matrix, DPMatrixDimension_::VERTICAL), bandSize(band));
+            _activeColIterator = begin(matrix, Standard()) + _dataLengths(matrix)[DPMatrixDimension_::VERTICAL] - 1;
+        }
+        else if (upperDiagonal(band) <= 0)  // Band begins within the first column.
+        {
+            // The first cell starts at the beginning of the current column.
+            _laneLeap = 1;
+            _activeColIterator = begin(matrix, Standard());
+        }
+        else  // Band intersects with the point of origin.
+        {
+            // First cell starts at position i, such that i + abs(lowerDiagonal) = length(seqV).
+            TMatrixSize lengthVertical = length(matrix, DPMatrixDimension_::VERTICAL);
+            int lastPos = _max(-static_cast<TSignedSize>(lengthVertical - 1), lowerDiagonal(band));
+            _laneLeap = lengthVertical + lastPos;
+            _activeColIterator = begin(matrix, Standard()) + _laneLeap - 1;
+        }
+        *_activeColIterator = TValue();
+    }
+
+    TDPMatrixPointer_   _ptrDataContainer{nullptr}; // The pointer to the underlying Matrix.
+    int                 _laneLeap{0};               // Keeps track of the jump size from one column to another.
+    unsigned            _simdLane{0};               // Used for tracing the correct cell in case of simd vectors.
+    TDPMatrixIterator   _activeColIterator{};       // The current column iterator.
 };
 
 // ============================================================================
@@ -88,99 +139,43 @@ public:
 // ============================================================================
 
 // ----------------------------------------------------------------------------
-// Function _init()
-// ----------------------------------------------------------------------------
-
-// Initializes the navigator for unbanded alignments.
-template <typename TValue, typename TTraceFlag>
-inline void
-_init(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix>, DPTraceMatrix<TTraceFlag>, NavigateColumnWise> & navigator,
-      DPMatrix_<TValue, FullDPMatrix> & dpMatrix,
-      DPBandConfig<BandOff> const &)
-{
-    if (IsSameType<TTraceFlag, TracebackOff>::VALUE)
-        return;  // Leave navigator uninitialized because it is never used.
-
-    navigator._ptrDataContainer = &dpMatrix;
-    navigator._activeColIterator = begin(dpMatrix, Standard());
-    navigator._laneLeap = 1;
-    assignValue(navigator._activeColIterator, TValue());
-}
-
-// Initializes the navigator for banded alignments.
-// Note, the band size has a maximal width of length of the vertical sequence.
-template <typename TValue, typename TTraceFlag>
-inline void
-_init(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix>, DPTraceMatrix<TTraceFlag>, NavigateColumnWise> & navigator,
-      DPMatrix_<TValue, FullDPMatrix> & dpMatrix,
-      DPBandConfig<BandOn> const & band)
-{
-    typedef typename Size<DPMatrix_<TValue, FullDPMatrix> >::Type TMatrixSize;
-    typedef typename MakeSigned<TMatrixSize>::Type TSignedSize;
-
-    if (IsSameType<TTraceFlag, TracebackOff>::VALUE)
-        return;  // Leave navigator as is because it should never be used.
-
-    navigator._ptrDataContainer = &dpMatrix;
-
-    // Band begins within the first row.
-    if (lowerDiagonal(band) >= 0)
-    {
-        // The first cell of the first column starts at the last cell in the matrix of the current column.
-        navigator._laneLeap = _min(length(dpMatrix, DPMatrixDimension_::VERTICAL), bandSize(band));
-        navigator._activeColIterator = begin(dpMatrix, Standard()) + _dataLengths(dpMatrix)[DPMatrixDimension_::VERTICAL] - 1;
-    }
-    else if (upperDiagonal(band) <= 0)  // Band begins within the first column.
-    {
-        // The first cell starts at the beginning of the current column.
-        navigator._laneLeap = 1;
-        navigator._activeColIterator = begin(dpMatrix, Standard());
-    }
-    else  // Band intersects with the point of origin.
-    {
-        // First cell starts at position i, such that i + abs(lowerDiagonal) = length(seqV).
-        TMatrixSize lengthVertical = length(dpMatrix, DPMatrixDimension_::VERTICAL);
-        int lastPos = _max(-static_cast<TSignedSize>(lengthVertical - 1), lowerDiagonal(band));
-        navigator._laneLeap = lengthVertical + lastPos;
-        navigator._activeColIterator = begin(dpMatrix, Standard()) + navigator._laneLeap - 1;
-    }
-    assignValue(navigator._activeColIterator, TValue());
-}
-
-// ----------------------------------------------------------------------------
-// Function _goNextCell()                          [DPInitialColumn, FirstCell]
+// Function _goNextCell()                                   [banded, FirstCell]
 // ----------------------------------------------------------------------------
 
 // In the initial column we don't need to do anything because, the navigagtor is already initialized.
-template <typename TValue, typename TTraceFlag>
+template <typename TValue, typename THost, typename TTraceFlag,
+          typename TColumnLocation>
 inline void
-_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix>, DPTraceMatrix<TTraceFlag>, NavigateColumnWise> & /*dpNavigator*/,
-            MetaColumnDescriptor<DPInitialColumn, PartialColumnTop> const &,
+_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix, THost>,
+                                  DPTraceMatrix<TTraceFlag>,
+                                  NavigateColumnWiseBanded> & /*dpNavigator*/,
+            MetaColumnDescriptor<DPInitialColumn, TColumnLocation> const &,
             FirstCell const &)
 {
     // no-op
 }
 
-template <typename TValue, typename TTraceFlag, typename TColumnLocation>
+// overload needed to avoid ambigious overload.
+template <typename TValue, typename THost, typename TTraceFlag>
 inline void
-_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix>, DPTraceMatrix<TTraceFlag>, NavigateColumnWise> & /*dpNavigator*/,
-            MetaColumnDescriptor<DPInitialColumn, TColumnLocation> const &,
+_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix, THost>,
+                                  DPTraceMatrix<TTraceFlag>,
+                                  NavigateColumnWiseBanded> & /*dpNavigator*/,
+            MetaColumnDescriptor<DPInitialColumn, PartialColumnTop> const &,
             FirstCell const &)
 {
     // no-op
 }
 
-// ----------------------------------------------------------------------------
-// Function _goNextCell()                         [PartialColumnTop, FirstCell]
-// ----------------------------------------------------------------------------
-
 // We are in the banded case, where the band crosses the first row.
 // The left cell of the active cell is not valid, beacause we only can come from horizontal direction.
 // The lower left cell of the active cell is the horizontal direction.
-
-template <typename TValue, typename TTraceFlag, typename TColumnType>
+template <typename TValue, typename THost, typename TTraceFlag,
+          typename TColumnType>
 inline void
-_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix>, DPTraceMatrix<TTraceFlag>, NavigateColumnWise> & dpNavigator,
+_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix, THost>,
+                                  DPTraceMatrix<TTraceFlag>,
+                                  NavigateColumnWiseBanded> & dpNavigator,
             MetaColumnDescriptor<TColumnType, PartialColumnTop> const &,
             FirstCell const &)
 {
@@ -191,53 +186,108 @@ _goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix>, DPTraceMatrix<TT
     dpNavigator._activeColIterator += dpNavigator._laneLeap;
 }
 
-// ----------------------------------------------------------------------------
-// Function _goNextCell()                       [other column types, FirstCell]
-// ----------------------------------------------------------------------------
-
 // We are in the banded case.
 // The left cell of the active cell represents diagonal direction. The lower left diagonal represents the horizontal direction.
-
-template <typename TValue, typename TTraceFlag, typename TColumnType, typename TColumnLocation>
+template <typename TValue, typename THost, typename TTraceFlag,
+          typename TColumnType, typename TColumnLocation>
 inline void
-_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix>, DPTraceMatrix<TTraceFlag>, NavigateColumnWise> & dpNavigator,
+_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix, THost>,
+                                  DPTraceMatrix<TTraceFlag>,
+                                  NavigateColumnWiseBanded> & dpNavigator,
             MetaColumnDescriptor<TColumnType, TColumnLocation> const &,
             FirstCell const &)
 {
     if (IsSameType<TTraceFlag, TracebackOff>::VALUE)
         return;  // Do nothing since no trace back is computed.
 
+    // go to begin of next column.
     dpNavigator._activeColIterator += dpNavigator._laneLeap;
 }
 
 // ----------------------------------------------------------------------------
-// Function _goNextCell                                 [any column, InnerCell]
+// Function _goNextCell()                                 [unbanded, FirstCell]
+// ----------------------------------------------------------------------------
+
+//
+template <typename TValue, typename THost, typename TTraceFlag>
+inline void
+_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix, THost>,
+                                  DPTraceMatrix<TTraceFlag>,
+                                  NavigateColumnWise> & /*dpNavigator*/,
+            MetaColumnDescriptor<DPInitialColumn, FullColumn> const &,
+            FirstCell const &)
+{
+    // no-op
+}
+
+template <typename TValue, typename THost, typename TTraceFlag,
+          typename TColumnType>
+inline void
+_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix, THost>,
+                                  DPTraceMatrix<TTraceFlag>,
+                                  NavigateColumnWise> & dpNavigator,
+            MetaColumnDescriptor<TColumnType, FullColumn> const &,
+            FirstCell const &)
+{
+    SEQAN_IF_CONSTEXPR (IsSameType<TTraceFlag, TracebackOff>::VALUE)
+        return;  // Do nothing since no trace back is computed.
+
+    dpNavigator._activeColIterator += dpNavigator._laneLeap;
+}
+
+// ----------------------------------------------------------------------------
+// Function _goNextCell                                     [banded, InnerCell]
 // ----------------------------------------------------------------------------
 
 // For any other column type and location we can use the same navigation procedure.
-template <typename TValue, typename TTraceFlag, typename TColumnType, typename TColumnLocation>
+template <typename TValue, typename THost, typename TTraceFlag,
+          typename TColumnType, typename TColumnLocation>
 inline void
-_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix>, DPTraceMatrix<TTraceFlag>, NavigateColumnWise> & dpNavigator,
+_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix, THost>,
+                                  DPTraceMatrix<TTraceFlag>,
+                                  NavigateColumnWiseBanded> & dpNavigator,
             MetaColumnDescriptor<TColumnType, TColumnLocation> const &,
             InnerCell const &)
 {
-    if (IsSameType<TTraceFlag, TracebackOff>::VALUE)
+    SEQAN_IF_CONSTEXPR (IsSameType<TTraceFlag, TracebackOff>::VALUE)
         return;  // Do nothing since no trace back is computed.
 
     ++dpNavigator._activeColIterator;
 }
 
 // ----------------------------------------------------------------------------
-// Function _goNextCell                         [PartialColumnBottom, LastCell]
+// Function _goNextCell                                   [unbanded, InnerCell]
 // ----------------------------------------------------------------------------
 
-template <typename TValue, typename TTraceFlag>
+// For any other column type and location we can use the same navigation procedure.
+template <typename TValue, typename THost, typename TTraceFlag,
+          typename TColumnType>
 inline void
-_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix>, DPTraceMatrix<TTraceFlag>, NavigateColumnWise> & dpNavigator,
+_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix, THost>,
+                                  DPTraceMatrix<TTraceFlag>,
+                                  NavigateColumnWise> & dpNavigator,
+            MetaColumnDescriptor<TColumnType, FullColumn> const &,
+            InnerCell const &)
+{
+    SEQAN_IF_CONSTEXPR (IsSameType<TTraceFlag, TracebackOff>::VALUE)
+        return;  // Do nothing since no trace back is computed.
+
+    ++dpNavigator._activeColIterator;
+}
+
+// ----------------------------------------------------------------------------
+// Function _goNextCell                                      [banded, LastCell]
+// ----------------------------------------------------------------------------
+
+template <typename TValue, typename THost, typename TTraceFlag>
+inline void
+_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix, THost>,
+                                  DPTraceMatrix<TTraceFlag>,
+                                  NavigateColumnWiseBanded> & dpNavigator,
             MetaColumnDescriptor<DPInitialColumn, PartialColumnBottom> const &,
             LastCell const &)
 {
-    if (IsSameType<TTraceFlag, TracebackOff>::VALUE)
+    SEQAN_IF_CONSTEXPR (IsSameType<TTraceFlag, TracebackOff>::VALUE)
         return;  // Do nothing since no trace back is computed.
 
     ++dpNavigator._activeColIterator;
@@ -245,27 +295,29 @@ _goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix>, DPTraceMatrix<TT
 
 // If we are in banded case and the band crosses the last row, we have to update
 // the additional leap for the current track.
-template <typename TValue, typename TTraceFlag, typename TColumnType>
+template <typename TValue, typename THost, typename TTraceFlag,
+          typename TColumnType>
 inline void
-_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix>, DPTraceMatrix<TTraceFlag>, NavigateColumnWise> & dpNavigator,
+_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix, THost>,
+                                  DPTraceMatrix<TTraceFlag>,
+                                  NavigateColumnWiseBanded> & dpNavigator,
             MetaColumnDescriptor<TColumnType, PartialColumnBottom> const &,
             LastCell const &)
 {
-    if (IsSameType<TTraceFlag, TracebackOff>::VALUE)
+    SEQAN_IF_CONSTEXPR (IsSameType<TTraceFlag, TracebackOff>::VALUE)
         return;  // Do nothing since no trace back is computed.
 
     ++dpNavigator._activeColIterator;
     ++dpNavigator._laneLeap;
 }
 
-// ----------------------------------------------------------------------------
-// Function _goNextCell                            [any other column, LastCell]
-// ----------------------------------------------------------------------------
-
 // If we are in the banded case the left cell of the active represents the diagonal direction.
-template <typename TValue, typename TTraceFlag, typename TColumnType, typename TColumnLocation>
+template <typename TValue, typename THost, typename TTraceFlag,
+          typename TColumnType, typename TColumnLocation>
 inline void
-_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix>, DPTraceMatrix<TTraceFlag>, NavigateColumnWise> & dpNavigator,
+_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix, THost>,
+                                  DPTraceMatrix<TTraceFlag>,
+                                  NavigateColumnWiseBanded> & dpNavigator,
             MetaColumnDescriptor<TColumnType, TColumnLocation> const &,
             LastCell const &)
 {
@@ -276,15 +328,36 @@ _goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix>, DPTraceMatrix<TT
 }
 
 // ----------------------------------------------------------------------------
+// Function _goNextCell                                    [unbanded, LastCell]
+// ----------------------------------------------------------------------------
+
+template <typename TValue, typename THost, typename TTraceFlag,
+          typename TColumnType>
+inline void
+_goNextCell(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix, THost>,
+                                  DPTraceMatrix<TTraceFlag>,
+                                  NavigateColumnWise> & dpNavigator,
+            MetaColumnDescriptor<TColumnType, FullColumn> const &,
+            LastCell const &)
+{
+    SEQAN_IF_CONSTEXPR (IsSameType<TTraceFlag, TracebackOff>::VALUE)
+        return;  // Do nothing since no trace back is computed.
+
+    ++dpNavigator._activeColIterator;
+}
+
+// ----------------------------------------------------------------------------
 // Function _traceHorizontal()
 // ----------------------------------------------------------------------------
 
-template <typename TValue, typename TTraceFlag>
+template <typename TValue, typename THost, typename TTraceFlag, typename TNavigationSpec>
 inline void
-_traceHorizontal(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix>, DPTraceMatrix<TTraceFlag>, NavigateColumnWise> & dpNavigator,
+_traceHorizontal(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix, THost>,
+                                  DPTraceMatrix<TTraceFlag>,
+                                  TNavigationSpec> & dpNavigator,
                  bool isBandShift)
 {
-    if (IsSameType<TTraceFlag, TracebackOff>::VALUE)
+    SEQAN_IF_CONSTEXPR (IsSameType<TTraceFlag, TracebackOff>::VALUE)
         return;  // Do nothing since no trace back is computed.
 
     if (isBandShift)
@@ -298,12 +371,14 @@ _traceHorizontal(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix>, DPTraceMatr
 // Function _traceDiagonal()
 // ----------------------------------------------------------------------------
 
-template <typename TValue, typename TTraceFlag>
+template <typename TValue, typename THost, typename TTraceFlag, typename TNavigationSpec>
 inline void
-_traceDiagonal(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix>, DPTraceMatrix<TTraceFlag>, NavigateColumnWise> & dpNavigator,
+_traceDiagonal(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix, THost>,
+                                  DPTraceMatrix<TTraceFlag>,
+                                  TNavigationSpec> & dpNavigator,
                bool isBandShift)
 {
-    if (IsSameType<TTraceFlag, TracebackOff>::VALUE)
+    SEQAN_IF_CONSTEXPR (IsSameType<TTraceFlag, TracebackOff>::VALUE)
         return;  // Do nothing since no trace back is computed.
 
     if (isBandShift)
@@ -317,12 +392,14 @@ _traceDiagonal(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix>, DPTraceMatrix
 // Function _traceVertical()
 // ----------------------------------------------------------------------------
 
-template <typename TValue, typename TTraceFlag>
+template <typename TValue, typename THost, typename TTraceFlag, typename TNavigationSpec>
 inline void
-_traceVertical(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix>, DPTraceMatrix<TTraceFlag>, NavigateColumnWise> & dpNavigator,
+_traceVertical(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix, THost>,
+                                  DPTraceMatrix<TTraceFlag>,
+                                  TNavigationSpec> & dpNavigator,
                bool /*isBandShift*/)
 {
-    if (IsSameType<TTraceFlag, TracebackOff>::VALUE)
+    SEQAN_IF_CONSTEXPR (IsSameType<TTraceFlag, TracebackOff>::VALUE)
         return;  // Do nothing since no trace back is computed.
 
     dpNavigator._activeColIterator -= _dataFactors(*dpNavigator._ptrDataContainer)[DPMatrixDimension_::VERTICAL];
@@ -332,12 +409,15 @@ _traceVertical(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix>, DPTraceMatrix
 // Function setToPosition()
 // ----------------------------------------------------------------------------
 
-template <typename TValue, typename TTraceFlag, typename TPosition>
+template <typename TValue, typename THost, typename TTraceFlag, typename TNavigationSpec,
+          typename TPosition>
 inline void
-_setToPosition(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix>, DPTraceMatrix<TTraceFlag>, NavigateColumnWise> & dpNavigator,
+_setToPosition(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix, THost>,
+                                  DPTraceMatrix<TTraceFlag>,
+                                  TNavigationSpec> & dpNavigator,
               TPosition const & hostPosition)
 {
-    if (IsSameType<TTraceFlag, TracebackOff>::VALUE)
+    SEQAN_IF_CONSTEXPR (IsSameType<TTraceFlag, TracebackOff>::VALUE)
         return;
 
     SEQAN_ASSERT_LT(hostPosition, static_cast<TPosition>(length(container(dpNavigator))));
@@ -349,13 +429,16 @@ _setToPosition(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix>, DPTraceMatrix
 // Sets the host position based on the given horizontal and vertical position. Note that the horizontal and
 // vertical positions must correspond to the correct size of the underlying matrix.
 // For banded matrices the vertical dimension might not equal the length of the vertical sequence.
-template <typename TValue, typename TTraceFlag, typename TPositionH, typename TPositionV>
+template <typename TValue, typename THost, typename TTraceFlag, typename TNavigationSpec,
+          typename TPositionH, typename TPositionV>
 inline void
-_setToPosition(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix>, DPTraceMatrix<TTraceFlag>, NavigateColumnWise> & dpNavigator,
+_setToPosition(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix, THost>,
+                                  DPTraceMatrix<TTraceFlag>,
+                                  TNavigationSpec> & dpNavigator,
               TPositionH const & horizontalPosition,
               TPositionV const & verticalPosition)
 {
-    if (IsSameType<TTraceFlag, TracebackOff>::VALUE)
+    SEQAN_IF_CONSTEXPR (IsSameType<TTraceFlag, TracebackOff>::VALUE)
         return;
     SEQAN_ASSERT_LT(horizontalPosition, static_cast<TPositionH>(length(container(dpNavigator), +DPMatrixDimension_::HORIZONTAL)));
     SEQAN_ASSERT_LT(verticalPosition, static_cast<TPositionV>(length(container(dpNavigator), +DPMatrixDimension_::VERTICAL)));
@@ -368,15 +451,16 @@ _setToPosition(DPMatrixNavigator_<DPMatrix_<TValue, FullDPMatrix>, DPTraceMatrix
 // Function assignValue()
 // ----------------------------------------------------------------------------
 
-template <typename TDPMatrix, typename TTraceFlag, typename TNavigationSpec, typename TValue>
+template <typename TDPMatrix, typename TTraceFlag, typename TNavigationSpec,
+          typename TValue>
 inline void
 assignValue(DPMatrixNavigator_<TDPMatrix, DPTraceMatrix<TTraceFlag>, TNavigationSpec> & dpNavigator,
             TValue const & element)
 {
-    if (IsSameType<TTraceFlag, TracebackOff>::VALUE)
+    SEQAN_IF_CONSTEXPR (IsSameType<TTraceFlag, TracebackOff>::VALUE)
         return;  // Do nothing since no trace back is computed.
 
-    assignValue(dpNavigator._activeColIterator, element);
+    *dpNavigator._activeColIterator = element;
 }
 
 // ----------------------------------------------------------------------------
@@ -385,7 +469,7 @@ assignValue(DPMatrixNavigator_<TDPMatrix, DPTraceMatrix<TTraceFlag>, TNavigation
 
 // SIMD Version. Returns always a copy and never a reference.
 template <typename TValue, typename TPos>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TValue> >, typename Value<TValue>::Type)
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TValue> >, typename TraceBitMap_<>::Type)
 _scalarValue(TValue const & vec,
              TPos const pos)
 {
@@ -394,7 +478,7 @@ _scalarValue(TValue const & vec,
 
 // Non-simd variant. Identity version.
 template <typename TValue, typename TPos>
-inline SEQAN_FUNC_ENABLE_IF(Not<Is<SimdVectorConcept<TValue> > >, TValue &)
+inline SEQAN_FUNC_ENABLE_IF(Not<Is<SimdVectorConcept<TValue> > >, TValue)
 _scalarValue(TValue & val,
              TPos const /*pos*/)
 {
@@ -406,7 +490,7 @@ template <typename TDPMatrix, typename TTraceFlag, typename TNavigationSpec>
 inline auto
 scalarValue(DPMatrixNavigator_<TDPMatrix, DPTraceMatrix<TTraceFlag>, TNavigationSpec> const & dpNavigator)
 {
-    if (IsSameType<TTraceFlag, TracebackOff>::VALUE)
+    SEQAN_IF_CONSTEXPR (IsSameType<TTraceFlag, TracebackOff>::VALUE)
         SEQAN_ASSERT_FAIL("Try to access uninitialized object!");
 
     return _scalarValue(*dpNavigator._activeColIterator, dpNavigator._simdLane);
@@ -421,7 +505,7 @@ template <typename TDPMatrix, typename TTraceFlag, typename TNavigationSpec>
 inline typename Reference<DPMatrixNavigator_<TDPMatrix, DPTraceMatrix<TTraceFlag>, TNavigationSpec> >::Type
 value(DPMatrixNavigator_<TDPMatrix, DPTraceMatrix<TTraceFlag>, TNavigationSpec> & dpNavigator)
 {
-    if (IsSameType<TTraceFlag, TracebackOff>::VALUE)
+    SEQAN_IF_CONSTEXPR (IsSameType<TTraceFlag, TracebackOff>::VALUE)
         SEQAN_ASSERT_FAIL("Try to access uninitialized object!");
 
     return *dpNavigator._activeColIterator;
@@ -431,7 +515,7 @@ template <typename TDPMatrix, typename TTraceFlag, typename TNavigationSpec>
 inline typename Reference<DPMatrixNavigator_<TDPMatrix, DPTraceMatrix<TTraceFlag>, TNavigationSpec> const >::Type
 value(DPMatrixNavigator_<TDPMatrix, DPTraceMatrix<TTraceFlag>, TNavigationSpec> const & dpNavigator)
 {
-    if (IsSameType<TTraceFlag, TracebackOff>::VALUE)
+    SEQAN_IF_CONSTEXPR (IsSameType<TTraceFlag, TracebackOff>::VALUE)
         SEQAN_ASSERT_FAIL("Try to access uninitialized object!");
 
     return *dpNavigator._activeColIterator;
@@ -443,18 +527,19 @@ inline typename Reference<DPMatrixNavigator_<TDPMatrix, DPTraceMatrix<TTraceFlag
 value(DPMatrixNavigator_<TDPMatrix, DPTraceMatrix<TTraceFlag>, TNavigationSpec> & dpNavigator,
       TPosition const & position)
 {
-    if (IsSameType<TTraceFlag, TracebackOff>::VALUE)
+    SEQAN_IF_CONSTEXPR (IsSameType<TTraceFlag, TracebackOff>::VALUE)
         SEQAN_ASSERT_FAIL("Try to access uninitialized object!");
 
     return *(begin(*dpNavigator._ptrDataContainer) + position);
 }
 
-template <typename TDPMatrix, typename TTraceFlag, typename TNavigationSpec, typename TPosition>
+template <typename TDPMatrix, typename TTraceFlag, typename TNavigationSpec,
+          typename TPosition>
 inline typename Reference<DPMatrixNavigator_<TDPMatrix, DPTraceMatrix<TTraceFlag>, TNavigationSpec> const >::Type
 value(DPMatrixNavigator_<TDPMatrix, DPTraceMatrix<TTraceFlag>, TNavigationSpec> const & dpNavigator,
       TPosition const & position)
 {
-    if (IsSameType<TTraceFlag, TracebackOff>::VALUE)
+    SEQAN_IF_CONSTEXPR (IsSameType<TTraceFlag, TracebackOff>::VALUE)
         SEQAN_ASSERT_FAIL("Try to access uninitialized object!");
 
     return *(begin(*dpNavigator._ptrDataContainer) + position);
@@ -467,21 +552,42 @@ value(DPMatrixNavigator_<TDPMatrix, DPTraceMatrix<TTraceFlag>, TNavigationSpec>
 // Returns the coordinate of the given dimension for the current position of the
 // navigator within the matrix.
 template <typename TDPMatrix, typename TTraceFlag, typename TNavigationSpec>
-inline typename DPMatrixDimension_::TValue
+inline size_t
 coordinate(DPMatrixNavigator_<TDPMatrix, DPTraceMatrix<TTraceFlag>, TNavigationSpec> const & dpNavigator,
            typename DPMatrixDimension_::TValue const & dimension)
 {
     if (IsSameType<TTraceFlag, TracebackOff>::VALUE)
-        SEQAN_ASSERT_FAIL("Try to access uninitialized object!");
+        return 0;  // Returns default 0, when traceback is set off.
     SEQAN_ASSERT_EQ(_checkCorrectDimension(dimension), true);
 
-    if (IsSameType<TTraceFlag, TracebackOff>::VALUE)
+    SEQAN_IF_CONSTEXPR (IsSameType<TTraceFlag, TracebackOff>::VALUE)
         return _dataLengths(*dpNavigator._ptrDataContainer)[dimension];  // Return lengths of given dimension.
 
     return coordinate(value(dpNavigator._ptrDataContainer), position(dpNavigator), dimension); // Simply delegate to coordinate of underlying matrix.
 }
 
 // ----------------------------------------------------------------------------
+// Function toGlobalPosition()
+// ----------------------------------------------------------------------------
+
+// Returns the current position of the navigator within the matrix.
+template <typename TDPMatrix, typename TTraceFlag, typename TNavigationSpec,
+          typename TPosH,
+          typename TPosV>
+inline typename Position<DPMatrixNavigator_<TDPMatrix, DPTraceMatrix<TTraceFlag>, TNavigationSpec> >::Type
+toGlobalPosition(DPMatrixNavigator_<TDPMatrix, DPTraceMatrix<TTraceFlag>, TNavigationSpec> const & dpNavigator,
+                 TPosH const horizontalCoordinate,
+                 TPosV const verticalCoordinate)
+{
+    // Return 0 when traceback is not enabled. This is necessary to still track the score even
+    // the traceback is not enabled.
+    if (IsSameType<TTraceFlag, TracebackOff>::VALUE)
+        return 0;
+
+    return  toGlobalPosition(*dpNavigator._ptrDataContainer, horizontalCoordinate, verticalCoordinate);
+}
+
+// ----------------------------------------------------------------------------
 // Function position()
 // ----------------------------------------------------------------------------
 
@@ -492,7 +598,7 @@ position(DPMatrixNavigator_<TDPMatrix, DPTraceMatrix<TTraceFlag>, TNavigationSpe
 {
     // Return 0 when traceback is not enabled. This is necessary to still track the score even
     // the traceback is not enabled.
-    if (IsSameType<TTraceFlag, TracebackOff>::VALUE)
+    SEQAN_IF_CONSTEXPR (IsSameType<TTraceFlag, TracebackOff>::VALUE)
         return 0;
 
     return position(dpNavigator._activeColIterator, *dpNavigator._ptrDataContainer);
@@ -502,7 +608,8 @@ position(DPMatrixNavigator_<TDPMatrix, DPTraceMatrix<TTraceFlag>, TNavigationSpe
 // Function _setSimdLane()
 // ----------------------------------------------------------------------------
 
-template <typename TDPMatrix, typename TTraceFlag, typename TNavigationSpec, typename TPos>
+template <typename TDPMatrix, typename TTraceFlag, typename TNavigationSpec,
+          typename TPos>
 inline void
 _setSimdLane(DPMatrixNavigator_<TDPMatrix, DPTraceMatrix<TTraceFlag>, TNavigationSpec> & dpNavigator,
              TPos const pos)
diff --git a/include/seqan/align/dp_matrix_sparse.h b/include/seqan/align/dp_matrix_sparse.h
index 4666a46..53ea660 100644
--- a/include/seqan/align/dp_matrix_sparse.h
+++ b/include/seqan/align/dp_matrix_sparse.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -49,14 +49,14 @@ namespace seqan {
 // Class DPMatrix                                              [SparseDPMatrix]
 // ----------------------------------------------------------------------------
 
-template <typename TValue>
-class DPMatrix_<TValue, SparseDPMatrix>
+template <typename TValue, typename THost>
+class DPMatrix_<TValue, SparseDPMatrix, THost>
 {
 public:
 
-    typedef typename Member<DPMatrix_, DPMatrixMember>::Type THost;
+    typedef typename Member<DPMatrix_, DPMatrixMember>::Type TMatrix;
 
-    Holder<THost>   data_host;  // The host containing the actual matrix.
+    Holder<TMatrix>   data_host;  // The host containing the actual matrix.
 
     DPMatrix_() :
         data_host()
@@ -77,11 +77,11 @@ public:
 // Function resize()
 // ----------------------------------------------------------------------------
 
-template <typename TValue>
+template <typename TValue, typename THost>
 inline void
-resize(DPMatrix_<TValue, SparseDPMatrix> & dpMatrix)
+resize(DPMatrix_<TValue, SparseDPMatrix, THost> & dpMatrix)
 {
-    typedef DPMatrix_<TValue, SparseDPMatrix> TDPMatrix;
+    typedef DPMatrix_<TValue, SparseDPMatrix, THost> TDPMatrix;
     typedef typename Size<TDPMatrix>::Type TSize;
 
     TSize _dimVertical = length(dpMatrix, DPMatrixDimension_::VERTICAL);
@@ -90,12 +90,12 @@ resize(DPMatrix_<TValue, SparseDPMatrix> & dpMatrix)
         resize(host(dpMatrix), _dimVertical, Exact());
 }
 
-template <typename TValue>
+template <typename TValue, typename THost>
 inline void
-resize(DPMatrix_<TValue, SparseDPMatrix> & dpMatrix,
+resize(DPMatrix_<TValue, SparseDPMatrix, THost> & dpMatrix,
        TValue const & fillValue)
 {
-    typedef DPMatrix_<TValue, SparseDPMatrix> TDPMatrix;
+    typedef DPMatrix_<TValue, SparseDPMatrix, THost> TDPMatrix;
     typedef typename Size<TDPMatrix>::Type TSize;
 
     TSize _dimVertical = length(dpMatrix, DPMatrixDimension_::VERTICAL);
@@ -108,18 +108,18 @@ resize(DPMatrix_<TValue, SparseDPMatrix> & dpMatrix,
 // Function value()
 // ----------------------------------------------------------------------------
 
-template <typename TValue, typename TPositionV, typename TPositionH>
-inline typename Reference<DPMatrix_<TValue, SparseDPMatrix> >::Type
-value(DPMatrix_<TValue, SparseDPMatrix> & dpMatrix,
+template <typename TValue, typename THost, typename TPositionV, typename TPositionH>
+inline typename Reference<DPMatrix_<TValue, SparseDPMatrix, THost> >::Type
+value(DPMatrix_<TValue, SparseDPMatrix, THost> & dpMatrix,
       TPositionV const & posV,
       TPositionH const &)
 {
     return value(dpMatrix, posV);
 }
 
-template <typename TValue, typename TPositionV, typename TPositionH>
-inline typename Reference<DPMatrix_<TValue, SparseDPMatrix> const>::Type
-value(DPMatrix_<TValue, SparseDPMatrix> const & dpMatrix,
+template <typename TValue, typename THost, typename TPositionV, typename TPositionH>
+inline typename Reference<DPMatrix_<TValue, SparseDPMatrix, THost> const>::Type
+value(DPMatrix_<TValue, SparseDPMatrix, THost> const & dpMatrix,
       TPositionV const & posV,
       TPositionH const &)
 {
@@ -131,9 +131,9 @@ value(DPMatrix_<TValue, SparseDPMatrix> const & dpMatrix,
 // ----------------------------------------------------------------------------
 
 
-template <typename TValue, typename TPosition>
-inline typename Position<DPMatrix_<TValue, SparseDPMatrix> >::Type
-coordinate(DPMatrix_<TValue, SparseDPMatrix> const & /*dpMatrix*/,
+template <typename TValue, typename THost, typename TPosition>
+inline typename Position<DPMatrix_<TValue, SparseDPMatrix, THost> >::Type
+coordinate(DPMatrix_<TValue, SparseDPMatrix, THost> const & /*dpMatrix*/,
            TPosition hostPos,
            typename DPMatrixDimension_::TValue dimension)
 {
diff --git a/include/seqan/align/dp_meta_info.h b/include/seqan/align/dp_meta_info.h
index dab1bdc..f0e5219 100644
--- a/include/seqan/align/dp_meta_info.h
+++ b/include/seqan/align/dp_meta_info.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -451,7 +451,7 @@ struct TrackingEnabled_<TDPMetaColumn, LastCell>:
 template <typename TAlgo, typename TColumnDescriptor>
 struct LastColumnEnabled_
 {
-    typedef typename IsSameType<typename TColumnDescriptor::TColumnProperty, DPLastColumn>::Type Type;
+    typedef typename IsSameType<typename TColumnDescriptor::TColumnProperty, DPFinalColumn>::Type Type;
 };
 
 template <typename TAlgo, typename TGapSpec, typename TTraceSpec, typename TColumnDescriptor>
diff --git a/include/seqan/align/dp_profile.h b/include/seqan/align/dp_profile.h
index f57e161..8085bca 100644
--- a/include/seqan/align/dp_profile.h
+++ b/include/seqan/align/dp_profile.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -80,7 +80,7 @@ typedef Tag<AlignmentSplitBreakpoint_> SplitBreakpointAlignment;
 //
 // Note, all global alignments have to be specialized versions of GlobalAlignment_<>
 template <typename TSpec = FreeEndGaps_<> >
-struct GlobalAlignment_;
+struct GlobalAlignment_{};
 
 typedef GlobalAlignment_<> DPGlobal;
 
@@ -103,61 +103,82 @@ typedef Tag<AlignmentSuboptimal_> SuboptimalAlignment;
 // Note, all local alignments have to be specialized versions of LocalAlignment_<>
 
 template <typename TSpec = Default>
-struct LocalAlignment_;
+struct LocalAlignment_{};
 
 typedef LocalAlignment_<> DPLocal;
 typedef LocalAlignment_<SuboptimalAlignment> DPLocalEnumerate;
 
-// Use macro expansion to define all possible SIMD initialization types.
-
-template <typename TVector, __uint8 FILL_VALUE, unsigned SIZE>
-struct InitSimdTrace_;
-
-#define SEQAN_SIMD_INIT_FILL_VALUE_2_ FILL_VALUE, FILL_VALUE
-#define SEQAN_SIMD_INIT_FILL_VALUE_4_ SEQAN_SIMD_INIT_FILL_VALUE_2_, SEQAN_SIMD_INIT_FILL_VALUE_2_
-#define SEQAN_SIMD_INIT_FILL_VALUE_8_ SEQAN_SIMD_INIT_FILL_VALUE_4_, SEQAN_SIMD_INIT_FILL_VALUE_4_
-#define SEQAN_SIMD_INIT_FILL_VALUE_16_ SEQAN_SIMD_INIT_FILL_VALUE_8_, SEQAN_SIMD_INIT_FILL_VALUE_8_
-#define SEQAN_SIMD_INIT_FILL_VALUE_32_ SEQAN_SIMD_INIT_FILL_VALUE_16_, SEQAN_SIMD_INIT_FILL_VALUE_16_
-
-#define SEQAN_SIMD_TRACE_SETUP_2_(SIZE, ...)                                                        \
-template <typename TVector, __uint8 FILL_VALUE>                                                     \
-struct InitSimdTrace_<TVector, FILL_VALUE, SIZE>                                                    \
-{                                                                                                   \
-    static const TVector VALUE;                                                                     \
-};                                                                                                  \
-                                                                                                    \
-template <typename TVector, __uint8 FILL_VALUE>                                                     \
-const TVector InitSimdTrace_<TVector, FILL_VALUE, SIZE>::VALUE = TVector{__VA_ARGS__};
-
-#define SEQAN_SIMD_TRACE_SETUP_1_(SIZE, MACRO) SEQAN_SIMD_TRACE_SETUP_2_(SIZE, MACRO)
-#define SEQAN_SIMD_TRACE_SETUP_(SIZE) SEQAN_SIMD_TRACE_SETUP_1_(SIZE, SEQAN_SIMD_INIT_FILL_VALUE_ ## SIZE ## _)
-
-SEQAN_SIMD_TRACE_SETUP_(2)
-SEQAN_SIMD_TRACE_SETUP_(4)
-SEQAN_SIMD_TRACE_SETUP_(8)
-SEQAN_SIMD_TRACE_SETUP_(16)
-SEQAN_SIMD_TRACE_SETUP_(32)
-
-// Scalar version.
+// ----------------------------------------------------------------------------
+// Class TraceBitMap_
+// ----------------------------------------------------------------------------
+
+// Defines static const/constexpr tables for the traceback directions.
+// We use TraceValue_ as a helper to distinguish between vector and
+// scalar version.
+// For the vector version we use some compile time hackery to initialize the
+// const vector values with the corresponding values generically for
+// seqan simd vector types and UME::SIMD vector types.
 template <typename TValue, typename TIsSimdVector>
 struct TraceValue_
 {
     typedef uint8_t Type;
-    static const Type NONE = 0u;                         //0000000
-    static const Type DIAGONAL = 1u;                     //0000001
-    static const Type HORIZONTAL = 2u;                   //0000010
-    static const Type VERTICAL = 4u;                     //0000100
-    static const Type HORIZONTAL_OPEN = 8u;              //0001000
-    static const Type VERTICAL_OPEN = 16u;               //0010000
-    static const Type MAX_FROM_HORIZONTAL_MATRIX = 32u;  //0100000
-    static const Type MAX_FROM_VERTICAL_MATRIX = 64u;    //1000000
-    static const Type NO_VERTICAL_TRACEBACK = ~(VERTICAL | VERTICAL_OPEN);
-    static const Type NO_HORIZONTAL_TRACEBACK = ~(HORIZONTAL | HORIZONTAL_OPEN);
+    static constexpr Type NONE = 0u;                         //0000000
+    static constexpr Type DIAGONAL = 1u;                     //0000001
+    static constexpr Type HORIZONTAL = 2u;                   //0000010
+    static constexpr Type VERTICAL = 4u;                     //0000100
+    static constexpr Type HORIZONTAL_OPEN = 8u;              //0001000
+    static constexpr Type VERTICAL_OPEN = 16u;               //0010000
+    static constexpr Type MAX_FROM_HORIZONTAL_MATRIX = 32u;  //0100000
+    static constexpr Type MAX_FROM_VERTICAL_MATRIX = 64u;    //1000000
+    static constexpr Type NO_VERTICAL_TRACEBACK = ~(VERTICAL | VERTICAL_OPEN);
+    static constexpr Type NO_HORIZONTAL_TRACEBACK = ~(HORIZONTAL | HORIZONTAL_OPEN);
 };
 
-// SIMD Vector version.
-template <typename TVector>
-struct TraceValue_<TVector, True>
+template <typename TValue, typename TIsSimdVector>
+constexpr typename TraceValue_<TValue, TIsSimdVector>::Type TraceValue_<TValue, TIsSimdVector>::NONE;
+template <typename TValue, typename TIsSimdVector>
+constexpr typename TraceValue_<TValue, TIsSimdVector>::Type TraceValue_<TValue, TIsSimdVector>::DIAGONAL;
+template <typename TValue, typename TIsSimdVector>
+constexpr typename TraceValue_<TValue, TIsSimdVector>::Type TraceValue_<TValue, TIsSimdVector>::HORIZONTAL;
+template <typename TValue, typename TIsSimdVector>
+constexpr typename TraceValue_<TValue, TIsSimdVector>::Type TraceValue_<TValue, TIsSimdVector>::VERTICAL;
+template <typename TValue, typename TIsSimdVector>
+constexpr typename TraceValue_<TValue, TIsSimdVector>::Type TraceValue_<TValue, TIsSimdVector>::HORIZONTAL_OPEN;
+template <typename TValue, typename TIsSimdVector>
+constexpr typename TraceValue_<TValue, TIsSimdVector>::Type TraceValue_<TValue, TIsSimdVector>::VERTICAL_OPEN;
+template <typename TValue, typename TIsSimdVector>
+constexpr typename TraceValue_<TValue, TIsSimdVector>::Type TraceValue_<TValue, TIsSimdVector>::MAX_FROM_HORIZONTAL_MATRIX;
+template <typename TValue, typename TIsSimdVector>
+constexpr typename TraceValue_<TValue, TIsSimdVector>::Type TraceValue_<TValue, TIsSimdVector>::MAX_FROM_VERTICAL_MATRIX;
+template <typename TValue, typename TIsSimdVector>
+constexpr typename TraceValue_<TValue, TIsSimdVector>::Type TraceValue_<TValue, TIsSimdVector>::NO_VERTICAL_TRACEBACK;
+template <typename TValue, typename TIsSimdVector>
+constexpr typename TraceValue_<TValue, TIsSimdVector>::Type TraceValue_<TValue, TIsSimdVector>::NO_HORIZONTAL_TRACEBACK;
+
+// Recursion anchor to return the generated tuple with all fill values.
+template <typename ...TValues>
+constexpr auto _fillTraceValueVector(std::index_sequence<0> const &, std::tuple<TValues...> const & t)
+{
+    return t;
+}
+
+// Helper function to fill the vector with the correct number of values.
+// We use the std::tuple (which supports constexpr functions) to make it evaluate at compile time.
+template <size_t ...I, typename ...TValues>
+constexpr auto _fillTraceValueVector(std::index_sequence<I...> const &, std::tuple<TValues...> const & t)
+{
+    // Expand the tuple by one and return the next tuple while reducing the number of elements to add.
+    return _fillTraceValueVector(std::make_index_sequence<sizeof...(I) - 1>{},
+                                 std::tuple_cat(std::make_tuple(std::get<0>(t)), t));
+}
+
+// Helper class to used to expand the elements from the returned tuple with the fill values.
+// NOTE(rrahn): Might be easier to solve with fold expressions in SeqAn3.
+template <typename TVector, typename TIndexSequence>
+struct TraceValueVectorBase_;
+
+template <typename TVector, size_t ...I>
+struct TraceValueVectorBase_<TVector, std::index_sequence<I...>>
 {
     typedef TVector Type;
     static const Type NONE;
@@ -172,26 +193,46 @@ struct TraceValue_<TVector, True>
     static const Type NO_VERTICAL_TRACEBACK;
 };
 
-// Macro expansion to define out-of-class initialization of static members.
+template <typename TVector, size_t ...I>
+const typename TraceValueVectorBase_<TVector, std::index_sequence<I...>>::Type TraceValueVectorBase_<TVector, std::index_sequence<I...>>::NONE =
+    {std::get<I>(_fillTraceValueVector(std::make_index_sequence<LENGTH<TVector>::VALUE>{}, std::make_tuple(TraceValue_<uint8_t, False>::NONE)))...};
+template <typename TVector, size_t ...I>
+const typename TraceValueVectorBase_<TVector, std::index_sequence<I...>>::Type TraceValueVectorBase_<TVector, std::index_sequence<I...>>::DIAGONAL =
+    {std::get<I>(_fillTraceValueVector(std::make_index_sequence<LENGTH<TVector>::VALUE>{}, std::make_tuple(TraceValue_<uint8_t, False>::DIAGONAL)))...};
+template <typename TVector, size_t ...I>
+const typename TraceValueVectorBase_<TVector, std::index_sequence<I...>>::Type TraceValueVectorBase_<TVector, std::index_sequence<I...>>::HORIZONTAL =
+    {std::get<I>(_fillTraceValueVector(std::make_index_sequence<LENGTH<TVector>::VALUE>{}, std::make_tuple(TraceValue_<uint8_t, False>::HORIZONTAL)))...};
+template <typename TVector, size_t ...I>
+const typename TraceValueVectorBase_<TVector, std::index_sequence<I...>>::Type TraceValueVectorBase_<TVector, std::index_sequence<I...>>::VERTICAL =
+    {std::get<I>(_fillTraceValueVector(std::make_index_sequence<LENGTH<TVector>::VALUE>{}, std::make_tuple(TraceValue_<uint8_t, False>::VERTICAL)))...};
+template <typename TVector, size_t ...I>
+const typename TraceValueVectorBase_<TVector, std::index_sequence<I...>>::Type TraceValueVectorBase_<TVector, std::index_sequence<I...>>::HORIZONTAL_OPEN =
+    {std::get<I>(_fillTraceValueVector(std::make_index_sequence<LENGTH<TVector>::VALUE>{}, std::make_tuple(TraceValue_<uint8_t, False>::HORIZONTAL_OPEN)))...};
+template <typename TVector, size_t ...I>
+const typename TraceValueVectorBase_<TVector, std::index_sequence<I...>>::Type TraceValueVectorBase_<TVector, std::index_sequence<I...>>::VERTICAL_OPEN =
+    {std::get<I>(_fillTraceValueVector(std::make_index_sequence<LENGTH<TVector>::VALUE>{}, std::make_tuple(TraceValue_<uint8_t, False>::VERTICAL_OPEN)))...};
+template <typename TVector, size_t ...I>
+const typename TraceValueVectorBase_<TVector, std::index_sequence<I...>>::Type TraceValueVectorBase_<TVector, std::index_sequence<I...>>::MAX_FROM_HORIZONTAL_MATRIX =
+    {std::get<I>(_fillTraceValueVector(std::make_index_sequence<LENGTH<TVector>::VALUE>{}, std::make_tuple(TraceValue_<uint8_t, False>::MAX_FROM_HORIZONTAL_MATRIX)))...};
+template <typename TVector, size_t ...I>
+const typename TraceValueVectorBase_<TVector, std::index_sequence<I...>>::Type TraceValueVectorBase_<TVector, std::index_sequence<I...>>::MAX_FROM_VERTICAL_MATRIX =
+    {std::get<I>(_fillTraceValueVector(std::make_index_sequence<LENGTH<TVector>::VALUE>{}, std::make_tuple(TraceValue_<uint8_t, False>::MAX_FROM_VERTICAL_MATRIX)))...};
+template <typename TVector, size_t ...I>
+const typename TraceValueVectorBase_<TVector, std::index_sequence<I...>>::Type TraceValueVectorBase_<TVector, std::index_sequence<I...>>::NO_VERTICAL_TRACEBACK =
+    {std::get<I>(_fillTraceValueVector(std::make_index_sequence<LENGTH<TVector>::VALUE>{}, std::make_tuple(TraceValue_<uint8_t, False>::NO_HORIZONTAL_TRACEBACK)))...};
+template <typename TVector, size_t ...I>
+const typename TraceValueVectorBase_<TVector, std::index_sequence<I...>>::Type TraceValueVectorBase_<TVector, std::index_sequence<I...>>::NO_HORIZONTAL_TRACEBACK =
+    {std::get<I>(_fillTraceValueVector(std::make_index_sequence<LENGTH<TVector>::VALUE>{}, std::make_tuple(TraceValue_<uint8_t, False>::NO_VERTICAL_TRACEBACK)))...};
 
-#define SEQAN_SIMD_TRACE_OUT_OF_CLASS_INIT_(TRACE_VALUE)                             \
-    template <typename TVector>                                                      \
-    const TVector TraceValue_<TVector, True>::TRACE_VALUE = InitSimdTrace_<TVector, TraceValue_<__uint8, False>::TRACE_VALUE, LENGTH<TVector>::VALUE>::VALUE;
-
-SEQAN_SIMD_TRACE_OUT_OF_CLASS_INIT_(NONE)
-SEQAN_SIMD_TRACE_OUT_OF_CLASS_INIT_(DIAGONAL)
-SEQAN_SIMD_TRACE_OUT_OF_CLASS_INIT_(HORIZONTAL)
-SEQAN_SIMD_TRACE_OUT_OF_CLASS_INIT_(VERTICAL)
-SEQAN_SIMD_TRACE_OUT_OF_CLASS_INIT_(HORIZONTAL_OPEN)
-SEQAN_SIMD_TRACE_OUT_OF_CLASS_INIT_(VERTICAL_OPEN)
-SEQAN_SIMD_TRACE_OUT_OF_CLASS_INIT_(MAX_FROM_HORIZONTAL_MATRIX)
-SEQAN_SIMD_TRACE_OUT_OF_CLASS_INIT_(MAX_FROM_VERTICAL_MATRIX)
-SEQAN_SIMD_TRACE_OUT_OF_CLASS_INIT_(NO_HORIZONTAL_TRACEBACK)
-SEQAN_SIMD_TRACE_OUT_OF_CLASS_INIT_(NO_VERTICAL_TRACEBACK)
+// SIMD Vector version.
+// Simply delegates to the base class by passing the index_sequence with the corresponding length of the vector.
+template <typename TVector>
+struct TraceValue_<TVector, True> : public TraceValueVectorBase_<TVector, std::make_index_sequence<LENGTH<TVector>::VALUE>>
+{};
 
 // Type alias to choose between scalar and simd version of trace value.
-template <typename TValue = __uint8>
-using TraceBitMap_ = TraceValue_<TValue, typename Is<SimdVectorConcept<TValue> >::Type >;
+template <typename TValue = uint8_t>
+using TraceBitMap_ = TraceValue_<TValue, typename Is<SimdVectorConcept<TValue> >::Type>;
 
 // ----------------------------------------------------------------------------
 // Tag GapsLeft
@@ -298,10 +339,9 @@ typedef Tag<DynamicGaps_> DynamicGaps;
 // TAlignment: The type to select the pairwise alignment algorithm.
 // TGapCosts:  The gap cost function (LinearGaps or AffineGaps).
 // TTraceback: The traceback switch (TracebackOn or TracebackOff).
-template <typename TAlignment, typename TGapCosts, typename TTraceback>
+template <typename TAlignment, typename TGapCosts, typename TTraceback, typename TExecPolicy = Serial>
 struct DPProfile_ {};
 
-
 // ----------------------------------------------------------------------------
 // Tag DPFirstRow
 // ----------------------------------------------------------------------------
@@ -351,6 +391,63 @@ public:
 // Metafunctions
 // ============================================================================
 
+enum class DPProfileTypeId : uint8_t
+{
+    ALGORITHM = 0,
+    GAP_MODEL = 1,
+    TRACE_CONFIG = 2,
+    EXEC_POLICY = 3
+};
+
+// ----------------------------------------------------------------------------
+// Metafunction DPContextSpec
+// ----------------------------------------------------------------------------
+
+template <typename TDPProfile, DPProfileTypeId ID>
+struct DPProfileType;
+
+template <typename TAlignment, typename TGapCosts, typename TTraceback, typename TExecPolicy>
+struct DPProfileType<DPProfile_<TAlignment, TGapCosts, TTraceback, TExecPolicy>, DPProfileTypeId::ALGORITHM>
+{
+    using Type = TAlignment;
+};
+
+template <typename TAlignment, typename TGapCosts, typename TTraceback, typename TExecPolicy>
+struct DPProfileType<DPProfile_<TAlignment, TGapCosts, TTraceback, TExecPolicy>, DPProfileTypeId::GAP_MODEL>
+{
+    using Type = TGapCosts;
+};
+
+template <typename TAlignment, typename TGapCosts, typename TTraceback, typename TExecPolicy>
+struct DPProfileType<DPProfile_<TAlignment, TGapCosts, TTraceback, TExecPolicy>, DPProfileTypeId::TRACE_CONFIG>
+{
+    using Type = TTraceback;
+};
+
+template <typename TAlignment, typename TGapCosts, typename TTraceback, typename TExecPolicy>
+struct DPProfileType<DPProfile_<TAlignment, TGapCosts, TTraceback, TExecPolicy>, DPProfileTypeId::EXEC_POLICY>
+{
+    using Type = TExecPolicy;
+};
+
+// ----------------------------------------------------------------------------
+// Metafunction GapTraits
+// ----------------------------------------------------------------------------
+
+template <typename T>
+struct GapTraits;
+
+template <typename T>
+struct GapTraits<T const> :
+    GapTraits<T>
+{};
+
+template <typename TAlgoSpec, typename TGapCosts, typename TTraceFlag, typename TExecPolicy>
+struct GapTraits<DPProfile_<TAlgoSpec, TGapCosts, TTraceFlag, TExecPolicy> >
+{
+    typedef TGapCosts Type;
+};
+
 // ----------------------------------------------------------------------------
 // Metafunction IsGlobalAlignment
 // ----------------------------------------------------------------------------
@@ -368,12 +465,12 @@ template <typename TSpec>
 struct IsGlobalAlignment_<GlobalAlignment_<TSpec> const>:
     True {};
 
-template <typename TAlgoSpec, typename TGapCosts, typename TTraceFlag>
-struct IsGlobalAlignment_<DPProfile_<TAlgoSpec, TGapCosts, TTraceFlag> >:
+template <typename TAlgoSpec, typename TGapCosts, typename TTraceFlag, typename TExecPolicy>
+struct IsGlobalAlignment_<DPProfile_<TAlgoSpec, TGapCosts, TTraceFlag, TExecPolicy> >:
     IsGlobalAlignment_<TAlgoSpec>{};
 
-template <typename TAlgoSpec, typename TGapCosts, typename TTraceFlag>
-struct IsGlobalAlignment_<DPProfile_<TAlgoSpec, TGapCosts, TTraceFlag> const>:
+template <typename TAlgoSpec, typename TGapCosts, typename TTraceFlag, typename TExecPolicy>
+struct IsGlobalAlignment_<DPProfile_<TAlgoSpec, TGapCosts, TTraceFlag, TExecPolicy> const>:
     IsGlobalAlignment_<TAlgoSpec>{};
 
 // ----------------------------------------------------------------------------
@@ -422,12 +519,12 @@ template <typename TSpec>
 struct IsLocalAlignment_<LocalAlignment_<TSpec> const>:
     True {};
 
-template <typename TAlgoSpec, typename TGapCosts, typename TTraceFlag>
-struct IsLocalAlignment_<DPProfile_<TAlgoSpec, TGapCosts, TTraceFlag> >:
+template <typename TAlgoSpec, typename TGapCosts, typename TTraceFlag, typename TExecPolicy>
+struct IsLocalAlignment_<DPProfile_<TAlgoSpec, TGapCosts, TTraceFlag, TExecPolicy> >:
     IsLocalAlignment_<TAlgoSpec>{};
 
-template <typename TAlgoSpec, typename TGapCosts, typename TTraceFlag>
-struct IsLocalAlignment_<DPProfile_<TAlgoSpec, TGapCosts, TTraceFlag> const>:
+template <typename TAlgoSpec, typename TGapCosts, typename TTraceFlag, typename TExecPolicy>
+struct IsLocalAlignment_<DPProfile_<TAlgoSpec, TGapCosts, TTraceFlag, TExecPolicy> const>:
     IsLocalAlignment_<TAlgoSpec>{};
 
 // ----------------------------------------------------------------------------
@@ -447,12 +544,12 @@ template <typename TTracebackConfig>
 struct IsTracebackEnabled_<TracebackOn<TTracebackConfig> const>:
     True {};
 
-template <typename TAlgoSpec, typename TGapCosts, typename TTraceFlag>
-struct IsTracebackEnabled_<DPProfile_<TAlgoSpec, TGapCosts, TTraceFlag> >:
+template <typename TAlgoSpec, typename TGapCosts, typename TTraceFlag, typename TExecPolicy>
+struct IsTracebackEnabled_<DPProfile_<TAlgoSpec, TGapCosts, TTraceFlag, TExecPolicy> >:
     IsTracebackEnabled_<TTraceFlag>{};
 
-template <typename TAlgoSpec, typename TGapCosts, typename TTraceFlag>
-struct IsTracebackEnabled_<DPProfile_<TAlgoSpec, TGapCosts, TTraceFlag> const>:
+template <typename TAlgoSpec, typename TGapCosts, typename TTraceFlag, typename TExecPolicy>
+struct IsTracebackEnabled_<DPProfile_<TAlgoSpec, TGapCosts, TTraceFlag, TExecPolicy> const>:
     IsTracebackEnabled_<TTraceFlag>{};
 
 // ----------------------------------------------------------------------------
@@ -466,8 +563,8 @@ template <typename TTraceSpec>
 struct IsGapsLeft_<TracebackOn<TracebackConfig_<TTraceSpec, GapsLeft > > >
         : True{};
 
-template <typename TAlgorithm, typename TGapSpec, typename TTraceConfig>
-struct IsGapsLeft_<DPProfile_<TAlgorithm, TGapSpec, TTraceConfig> >
+template <typename TAlgorithm, typename TGapSpec, typename TTraceConfig, typename TExecPolicy>
+struct IsGapsLeft_<DPProfile_<TAlgorithm, TGapSpec, TTraceConfig, TExecPolicy> >
         : IsGapsLeft_<TTraceConfig>{};
 
 // ----------------------------------------------------------------------------
@@ -475,15 +572,16 @@ struct IsGapsLeft_<DPProfile_<TAlgorithm, TGapSpec, TTraceConfig> >
 // ----------------------------------------------------------------------------
 
 template <typename TTraceConfig>
-struct IsSingleTrace_ : False{};
+struct IsSingleTrace_ : False
+{};
 
 template <typename TGapsPlacement>
-struct IsSingleTrace_<TracebackOn<TracebackConfig_<SingleTrace, TGapsPlacement> > >
-: True{};
+struct IsSingleTrace_<TracebackOn<TracebackConfig_<SingleTrace, TGapsPlacement> > > : True
+{};
 
-template <typename TAlgorithm, typename TGapSpec, typename TTraceConfig>
-struct IsSingleTrace_<DPProfile_<TAlgorithm, TGapSpec, TTraceConfig> >
-: IsSingleTrace_<TTraceConfig>{};
+template <typename TAlgorithm, typename TGapSpec, typename TTraceConfig, typename TExecPolicy>
+struct IsSingleTrace_<DPProfile_<TAlgorithm, TGapSpec, TTraceConfig, TExecPolicy> > : IsSingleTrace_<TTraceConfig>
+{};
 
 // ----------------------------------------------------------------------------
 // Metafunction IsFreeEndGap_
@@ -494,12 +592,12 @@ template <typename TAlignmentSpec, typename TDPSide>
 struct IsFreeEndGap_ :
     False {};
 
-template <typename TAlignmentSpec, typename TGapSpec, typename TTracebackSpec, typename TDPSide>
-struct IsFreeEndGap_<DPProfile_<TAlignmentSpec, TGapSpec, TTracebackSpec> const, TDPSide>:
+template <typename TAlignmentSpec, typename TGapSpec, typename TTracebackSpec, typename TExecPolicy, typename TDPSide>
+struct IsFreeEndGap_<DPProfile_<TAlignmentSpec, TGapSpec, TTracebackSpec, TExecPolicy> const, TDPSide>:
     IsFreeEndGap_<TAlignmentSpec, TDPSide>{};
 
-template <typename TAlignmentSpec, typename TGapSpec, typename TTracebackSpec, typename TDPSide>
-struct IsFreeEndGap_<DPProfile_<TAlignmentSpec, TGapSpec, TTracebackSpec>, TDPSide>:
+template <typename TAlignmentSpec, typename TGapSpec, typename TTracebackSpec, typename TExecPolicy, typename TDPSide>
+struct IsFreeEndGap_<DPProfile_<TAlignmentSpec, TGapSpec, TTracebackSpec, TExecPolicy>, TDPSide>:
     IsFreeEndGap_<TAlignmentSpec, TDPSide>{};
 
 template <typename TLocalSpec, typename TDPSide>
@@ -566,6 +664,27 @@ struct IsFreeEndGap_<FreeEndGaps_<TFirstRow, TFirstColumn, TLastRow, True> const
 // Functions
 // ============================================================================
 
+namespace impl
+{
+    template <typename TStream>
+    inline TStream &
+    printTraceValue(TStream & stream, char traceValue)
+    {
+        if (traceValue & (TraceBitMap_<char>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<char>::VERTICAL))
+        {
+            stream << "|";
+        }
+        if (traceValue & (TraceBitMap_<char>::MAX_FROM_HORIZONTAL_MATRIX | TraceBitMap_<char>::HORIZONTAL))
+        {
+            stream << "-";
+        }
+        if (traceValue & TraceBitMap_<char>::DIAGONAL)
+        {
+            stream << "\\";
+        }
+        return stream;
+    }
+}  // namespace impl
 }  // namespace seqan
 
 #endif  // #ifndef SEQAN_INCLUDE_SEQAN_ALIGN_DP_PROFILE_H_
diff --git a/include/seqan/align/dp_scout.h b/include/seqan/align/dp_scout.h
index 4642f9d..08aba5b 100644
--- a/include/seqan/align/dp_scout.h
+++ b/include/seqan/align/dp_scout.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -93,10 +93,11 @@ template <typename TDPCell, typename TSpec>
 class DPScout_
 {
 public:
+    using TBase = DPScout_;
     using TScoreValue = typename Value<TDPCell>::Type;
 
     TDPCell _maxScore         = TDPCell();
-    uint32_t _maxHostPosition = DPCellDefaultInfinity<TScoreValue>::VALUE; // The corresponding host position within the underlying dp-matrix.
+    size_t _maxHostPosition   = 0; // The corresponding host position within the underlying dp-matrix.
 
     DPScout_() = default;
 
@@ -109,7 +110,7 @@ class DPScout_<TDPCell, Terminator_<TSpec> >
     : public DPScout_<TDPCell, Default>
 {
 public:
-    typedef DPScout_<TDPCell, Default>  TParent;
+    using TBase = DPScout_<TDPCell, Default>;
 
     DPScoutState_<Terminator_<TSpec> > * state = nullptr;
     bool terminationCriteriumMet               = false;
@@ -117,7 +118,7 @@ public:
     DPScout_() = default;
 
     DPScout_(DPScoutState_<Terminator_<TSpec> > & pState) :
-        DPScout_<TDPCell, Default>(),
+        TBase(),
         state(&pState)
     {}
 };
@@ -217,7 +218,7 @@ maxScore(DPScout_<TDPCell, TScoutSpec> const & dpScout)
 
 // Returns the host position that holds the current maximum score.
 template <typename TDPCell, typename TScoutSpec>
-inline unsigned int
+inline auto
 maxHostPosition(DPScout_<TDPCell, TScoutSpec> const & dpScout)
 {
     return dpScout._maxHostPosition;
@@ -335,6 +336,21 @@ _incVerticalPos(DPScout_<TDPCell, TSpec> const & /*scout*/)
     // no-op.
 }
 
+// ----------------------------------------------------------------------------
+//  Function swapStateIf()
+// ----------------------------------------------------------------------------
+
+template <typename TSingleMaxState, typename TPredicate>
+inline bool swapStateIf(TSingleMaxState && lhs, TSingleMaxState && rhs, TPredicate && p)
+{
+    using std::swap;
+
+    if (!p(lhs.mMaxScore, rhs.mMaxScore))
+        return false;
+    swap(lhs, rhs);
+    return true;
+}
+
 }  // namespace seqan
 
 #endif  // #ifndef SEQAN_INCLUDE_SEQAN_ALIGN_TEST_ALIGNMENT_DP_SCOUT_H_
diff --git a/include/seqan/align/dp_scout_simd.h b/include/seqan/align/dp_scout_simd.h
index 92095d2..a39b152 100644
--- a/include/seqan/align/dp_scout_simd.h
+++ b/include/seqan/align/dp_scout_simd.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -72,70 +72,16 @@ public:
     using TSizeH = typename Size<typename TTraits::TSeqH>::Type;
     using TSizeV = typename Size<typename TTraits::TSeqV>::Type;
 
-    String<typename TTraits::TSimdVector, Alloc<OverAligned> > masksH;
-    String<typename TTraits::TSimdVector, Alloc<OverAligned> > masksV;
-    String<typename TTraits::TSimdVector, Alloc<OverAligned> > masks;
+    using TIterator = typename Iterator<String<size_t>, Rooted>::Type;
 
-    String<size_t> endsH;
-    String<size_t> endsV;
-    ModifiedString<String<size_t>, ModPos<String<size_t> > > sortedEndsH;
-    ModifiedString<String<size_t>, ModPos<String<size_t> > > sortedEndsV;
+    typename TTraits::TSimdVector endPosVecH;
+    typename TTraits::TSimdVector endPosVecV;
 
-    decltype(begin(sortedEndsH, Standard())) nextEndsH;
-    decltype(begin(sortedEndsV, Standard())) nextEndsV;
-
-    size_t dimV;
     size_t posH;
     size_t posV;
-    bool right;
-    bool bottom;
-    bool isLocalAlignment;
-
-    // ----------------------------------------------------------------------------
-    // Function DPScout_#updateMasksRight()
-    // ----------------------------------------------------------------------------
-
-    inline void updateMasksRight()
-    {
-        for(size_t pos = dimV - 2; pos != MaxValue<size_t>::VALUE; --pos)
-            masks[pos] |= masks[pos + 1];
-    }
-
-    // ----------------------------------------------------------------------------
-    // Function DPScout_#updateMasksBottom()
-    // ----------------------------------------------------------------------------
-
-    inline void updateMasksBottom()
-    {
-        for (auto posIt  = begin(sortedEndsV, Standard()); posIt != end(sortedEndsV, Standard()); ++posIt)
-            for (auto it = nextEndsH; it != end(sortedEndsH, Standard()); ++it)
-            {
-                masks[*posIt] |= (masksH[*it] & masksV[*posIt]);
-            }
-    }
-
-    // ----------------------------------------------------------------------------
-    // Function DPScout_#updateMasks()
-    // ----------------------------------------------------------------------------
-
-    inline void updateMasks()
-    {
-        for(size_t pos = 0; pos < dimV; ++pos)
-            masks[pos] = masksH[posH] & masksV[pos];
-        //for local alignments the BOTTOM parameter must be checked first
-        if(isLocalAlignment)
-        {
-            updateMasksBottom();
-            updateMasksRight();
-        }
-        else
-        {
-            if(right && posH == *nextEndsH)
-                updateMasksRight();
-            if(bottom)
-                updateMasksBottom();
-        }
-    }
+
+    TIterator nextEndsH;
+    TIterator nextEndsV;
 };
 
 // ----------------------------------------------------------------------------
@@ -147,18 +93,14 @@ class DPScout_<TDPCell, SimdAlignmentScout<TSpec> > :
     public DPScout_<TDPCell, Default>
 {
 public:
+    using TSimdVec    = typename Value<TDPCell>::Type;
     using TBase       = DPScout_<TDPCell, Default>;
     using TScoutState = DPScoutState_<TSpec>;
 
-    //used in the SIMD version to keep track of all host positions
-    //SIMD register size divided by 16bit is the amount of alignments
-    //so we need two vectors of type 32bit to save the host for all alignments
-
-    // TODO(rrahn): Abstract into a struct, so we can model different configurations.
-    SimdVector<int32_t>::Type _maxHostLow; //first half of alignments
-    SimdVector<int32_t>::Type _maxHostHigh; //other half
-    TScoutState * state = nullptr;
-    unsigned _simdLane  = 0;
+    TSimdVec      mHorizontalPos{};
+    TSimdVec      mVerticalPos{};
+    TScoutState * state{nullptr};
+    unsigned      _simdLane{0};
 
     DPScout_(TScoutState & pState) : TBase(), state(&pState)
     {}
@@ -192,31 +134,40 @@ struct ScoutSpecForAlignmentAlgorithm_<TAlignmentAlgorithm, DPScoutState_<SimdAl
 // Function _copySimdCell()
 // ----------------------------------------------------------------------------
 
-template <typename TValue, typename TSpec, typename TScoreValue>
+template <typename TValue, typename TGapSpec, typename TSpec,
+          typename TScoreValue,
+          typename TTraceConfig>
 inline void
-_copySimdCell(DPScout_<DPCell_<TValue, LinearGaps>, SimdAlignmentScout<TSpec> > & dpScout,
-              DPCell_<TValue, LinearGaps> const & activeCell,
-              TScoreValue const & cmp)
+_copySimdCell(DPScout_<DPCell_<TValue, TGapSpec>, SimdAlignmentScout<TSpec> > & dpScout,
+              DPCell_<TValue, TGapSpec> const & activeCell,
+              TScoreValue const & cmp,
+              DPTraceMatrix<TTraceConfig> const & /**/)
 {
     dpScout._maxScore._score = blend(dpScout._maxScore._score, activeCell._score, cmp);
 }
 
-template <typename TValue, typename TSpec, typename TScoreValue>
+template <typename TValue, typename TSpec,
+          typename TScoreValue,
+          typename TTraceConfig>
 inline void
 _copySimdCell(DPScout_<DPCell_<TValue, AffineGaps>, SimdAlignmentScout<TSpec> > & dpScout,
               DPCell_<TValue, AffineGaps> const & activeCell,
-              TScoreValue const & cmp)
+              TScoreValue const & cmp,
+              DPTraceMatrix<TracebackOn<TTraceConfig>> const & /**/)
 {
     dpScout._maxScore._score = blend(dpScout._maxScore._score, activeCell._score, cmp);
     dpScout._maxScore._horizontalScore = blend(dpScout._maxScore._horizontalScore, activeCell._horizontalScore, cmp);
     dpScout._maxScore._verticalScore = blend(dpScout._maxScore._verticalScore, activeCell._verticalScore, cmp);
 }
 
-template <typename TValue, typename TSpec, typename TScoreValue>
+template <typename TValue, typename TSpec,
+          typename TScoreValue,
+          typename TTraceConfig, typename TGapsPlacement>
 inline void
 _copySimdCell(DPScout_<DPCell_<TValue, DynamicGaps>, SimdAlignmentScout<TSpec> > & dpScout,
               DPCell_<TValue, DynamicGaps> const & activeCell,
-              TScoreValue const & cmp)
+              TScoreValue const & cmp,
+              DPTraceMatrix<TracebackOn<TTraceConfig>> const & /**/)
 {
     dpScout._maxScore._score = blend(dpScout._maxScore._score, activeCell._score, cmp);
     dpScout._maxScore._flagMask = blend(dpScout._maxScore._flagMask, activeCell._flagMask, cmp);
@@ -226,31 +177,45 @@ _copySimdCell(DPScout_<DPCell_<TValue, DynamicGaps>, SimdAlignmentScout<TSpec> >
 // Function _updateHostPositions()
 // ----------------------------------------------------------------------------
 
-template<typename TDPCell, typename TScoutSpec, typename TSimdVec>
+// No trace needed, hence we do not track the max positions.
+template<typename TDPCell, typename TScoutSpec,
+         typename TMask,
+         typename TNavigator>
+inline void
+_updateHostPositions(DPScout_<TDPCell, TScoutSpec> & /*dpScout*/,
+                     TMask const & /*cmp*/,
+                     TNavigator const & /*navi*/,
+                     DPTraceMatrix<TracebackOff> const & /**/)
+{}
+
+template<typename TDPCell, typename TScoutSpec,
+         typename TMask,
+         typename TNavigator,
+         typename TTraceConfig>
 inline void
 _updateHostPositions(DPScout_<TDPCell, TScoutSpec> & dpScout,
-                     TSimdVec & cmp,
-                     SimdVector<int32_t>::Type positionNavigator)
+                     TMask const & cmp,
+                     TNavigator const & navi,
+                     DPTraceMatrix<TTraceConfig> const & /**/)
 {
-// TODO(rrahn): Refactor!
-#if defined(__AVX2__)
-    dpScout._maxHostLow = blend(dpScout._maxHostLow, positionNavigator,
-                                _mm256_cvtepi16_epi32(_mm256_castsi256_si128(reinterpret_cast<__m256i&>(cmp))));
-    dpScout._maxHostHigh = blend(dpScout._maxHostHigh, positionNavigator,
-                                 _mm256_cvtepi16_epi32(_mm256_extractf128_si256(reinterpret_cast<__m256i&>(cmp),1)));
-#elif defined(__SSE3__)
-    dpScout._maxHostLow = blend(dpScout._maxHostLow, positionNavigator,
-                                _mm_unpacklo_epi16(reinterpret_cast<__m128i&>(cmp), reinterpret_cast<__m128i&>(cmp)));
-    dpScout._maxHostHigh = blend(dpScout._maxHostHigh, positionNavigator,
-                                 _mm_unpackhi_epi16(reinterpret_cast<__m128i&>(cmp), reinterpret_cast<__m128i&>(cmp)));
-#endif
+    using TSimdVector = typename Value<TDPCell>::Type;
+    dpScout.mHorizontalPos = blend(dpScout.mHorizontalPos,
+                                   createVector<TSimdVector>(coordinate(navi, +DPMatrixDimension_::HORIZONTAL)),
+                                   cmp);
+
+    dpScout.mVerticalPos = blend(dpScout.mVerticalPos,
+                                 createVector<TSimdVector>(coordinate(navi, +DPMatrixDimension_::VERTICAL)),
+                                 cmp);
 }
 
 // ----------------------------------------------------------------------------
-// Function _scoutBestScore()
+// Function _scoutBestScore()                            [SimdAlignEqualLength]
 // ----------------------------------------------------------------------------
 
-template <typename TDPCell, typename TTraceMatrixNavigator, typename TIsLastColumn, typename TIsLastRow>
+template <typename TDPCell,
+          typename TTraceMatrixNavigator,
+          typename TIsLastColumn,
+          typename TIsLastRow>
 inline void
 _scoutBestScore(DPScout_<TDPCell, SimdAlignmentScout<SimdAlignEqualLength> > & dpScout,
                 TDPCell const & activeCell,
@@ -258,12 +223,345 @@ _scoutBestScore(DPScout_<TDPCell, SimdAlignmentScout<SimdAlignEqualLength> > & d
                 TIsLastColumn const & /**/,
                 TIsLastRow const & /**/)
 {
+    using TMatrixType = typename MatrixType<TTraceMatrixNavigator>::Type;
     auto cmp = cmpGt(_scoreOfCell(activeCell), _scoreOfCell(dpScout._maxScore));
-    _copySimdCell(dpScout, activeCell, cmp);
-    _updateHostPositions(dpScout, cmp, createVector<SimdVector<int32_t>::Type>(position(navigator)));
+    _copySimdCell(dpScout, activeCell, cmp, TMatrixType());
+    _updateHostPositions(dpScout, cmp, navigator, TMatrixType());
+}
+
+// ----------------------------------------------------------------------------
+// Function _getCompareMask()
+// ----------------------------------------------------------------------------
+
+// Helper functions to resolve the correct tracking of cells for different
+// alignment modes.
+
+// Standard global alignment.
+template <typename TDPCell, typename TTraits,
+          typename TTop, typename TLeft, typename TGapModel, typename TTraceConfig, typename TExecPolicy>
+inline auto _getCompareMask(DPScout_<TDPCell, SimdAlignmentScout<SimdAlignVariableLength<TTraits> > > const & dpScout,
+                            True const & /*lastCol*/,
+                            True const & /*lastRow*/,
+                            DPProfile_<GlobalAlignment_<FreeEndGaps_<TTop, TLeft, False, False>>,
+                                       TGapModel, TTraceConfig, TExecPolicy> const &)
+{
+    using TSimdVec = typename TTraits::TSimdVector;
+    return ((dpScout.state->endPosVecH) == createVector<TSimdVec>(dpScout.state->posH)) &
+           ((dpScout.state->endPosVecV) == createVector<TSimdVec>(dpScout.state->posV));
+}
+
+template <typename TDPCell, typename TTraits,
+          typename TIsLastColumn,
+          typename TIsLastRow,
+          typename TTop, typename TLeft, typename TGapModel, typename TTraceConfig, typename TExecPolicy>
+inline auto _getCompareMask(DPScout_<TDPCell, SimdAlignmentScout<SimdAlignVariableLength<TTraits> > > const & /*dpScout*/,
+                            TIsLastColumn const & /*lastCol*/,
+                            TIsLastRow const & /*lastRow*/,
+                            DPProfile_<GlobalAlignment_<FreeEndGaps_<TTop, TLeft, False, False>>,
+                                       TGapModel, TTraceConfig, TExecPolicy> const &)
+{
+    using TSimdMaskVec = typename SimdMaskVector<typename TTraits::TSimdVector>::Type;
+    return createVector<TSimdMaskVec>(0);
+}
+
+// Tracking the last row is enabled
+template <typename TDPCell, typename TTraits,
+          typename TIsLastColumn,
+          typename TIsLastRow,
+          typename TTop, typename TLeft, typename TGapModel, typename TTraceConfig, typename TExecPolicy>
+inline auto _getCompareMask(DPScout_<TDPCell, SimdAlignmentScout<SimdAlignVariableLength<TTraits> > > const & dpScout,
+                            TIsLastColumn const & /*lastCol*/,
+                            TIsLastRow const & /*lastRow*/,
+                            DPProfile_<GlobalAlignment_<FreeEndGaps_<TTop, TLeft, True, False>>,
+                                       TGapModel, TTraceConfig, TExecPolicy> const &)
+{
+    using TSimdVec = typename TTraits::TSimdVector;
+    return (createVector<TSimdVec>(dpScout.state->posH) <= (dpScout.state->endPosVecH)) &
+           (createVector<TSimdVec>(dpScout.state->posV) == (dpScout.state->endPosVecV));
+}
+
+// ----------------------------------------------------------------------------
+// Function _getCompareMask()
+// ----------------------------------------------------------------------------
+
+// Helper functions to resolve the correct tracking of cells for different
+// alignment modes.
+
+// Standard global alignment.
+template <typename TDPCell, typename TTraits,
+          typename TTop, typename TLeft, typename TGapModel, typename TTraceConfig>
+inline auto _getCompareMask(DPScout_<TDPCell, SimdAlignmentScout<SimdAlignVariableLength<TTraits> > > const & dpScout,
+                            True const & /*lastCol*/,
+                            True const & /*lastRow*/,
+                            DPProfile_<GlobalAlignment_<FreeEndGaps_<TTop, TLeft, False, False>>,
+                                       TGapModel, TTraceConfig> const &)
+{
+    using TSimdVec = typename TTraits::TSimdVector;
+    return ((dpScout.state->endPosVecH) == createVector<TSimdVec>(dpScout.state->posH)) &
+           ((dpScout.state->endPosVecV) == createVector<TSimdVec>(dpScout.state->posV));
 }
 
 template <typename TDPCell, typename TTraits,
+          typename TIsLastColumn,
+          typename TIsLastRow,
+          typename TTop, typename TLeft, typename TGapModel, typename TTraceConfig>
+inline auto _getCompareMask(DPScout_<TDPCell, SimdAlignmentScout<SimdAlignVariableLength<TTraits> > > const & /*dpScout*/,
+                            TIsLastColumn const & /*lastCol*/,
+                            TIsLastRow const & /*lastRow*/,
+                            DPProfile_<GlobalAlignment_<FreeEndGaps_<TTop, TLeft, False, False>>,
+                                       TGapModel, TTraceConfig> const &)
+{
+    using TSimdMaskVec = typename SimdMaskVector<typename TTraits::TSimdVector>::Type;
+    return createVector<TSimdMaskVec>(0);
+}
+
+// Tracking the last row is enabled
+template <typename TDPCell, typename TTraits,
+          typename TIsLastColumn,
+          typename TIsLastRow,
+          typename TTop, typename TLeft, typename TGapModel, typename TTraceConfig>
+inline auto _getCompareMask(DPScout_<TDPCell, SimdAlignmentScout<SimdAlignVariableLength<TTraits> > > const & dpScout,
+                            TIsLastColumn const & /*lastCol*/,
+                            TIsLastRow const & /*lastRow*/,
+                            DPProfile_<GlobalAlignment_<FreeEndGaps_<TTop, TLeft, True, False>>,
+                                       TGapModel, TTraceConfig> const &)
+{
+    using TSimdVec = typename TTraits::TSimdVector;
+    return (createVector<TSimdVec>(dpScout.state->posH) <= (dpScout.state->endPosVecH)) &
+           (createVector<TSimdVec>(dpScout.state->posV) == (dpScout.state->endPosVecV));
+}
+
+template <typename TDPCell, typename TTraits,
+          typename TIsLastColumn,
+          typename TTop, typename TLeft, typename TGapModel, typename TTraceConfig>
+inline auto _getCompareMask(DPScout_<TDPCell, SimdAlignmentScout<SimdAlignVariableLength<TTraits> > > const & /*dpScout*/,
+                            TIsLastColumn const & /*lastCol*/,
+                            False const & /*lastRow*/,
+                            DPProfile_<GlobalAlignment_<FreeEndGaps_<TTop, TLeft, True, False>>,
+                                       TGapModel, TTraceConfig> const &)
+{
+    using TSimdMaskVec = typename SimdMaskVector<typename TTraits::TSimdVector>::Type;
+    return createVector<TSimdMaskVec>(0);
+}
+
+// Tracking if the last column is enabled
+template <typename TDPCell, typename TTraits,
+          typename TIsLastColumn,
+          typename TIsLastRow,
+          typename TTop, typename TLeft, typename TGapModel, typename TTraceConfig>
+inline auto _getCompareMask(DPScout_<TDPCell, SimdAlignmentScout<SimdAlignVariableLength<TTraits> > > const & dpScout,
+                            TIsLastColumn const & /*lastCol*/,
+                            TIsLastRow const & /*lastRow*/,
+                            DPProfile_<GlobalAlignment_<FreeEndGaps_<TTop, TLeft, False, True>>,
+                                       TGapModel, TTraceConfig> const &)
+{
+    using TSimdVec = typename TTraits::TSimdVector;
+    return (createVector<TSimdVec>(dpScout.state->posH) == (dpScout.state->endPosVecH)) &
+           (createVector<TSimdVec>(dpScout.state->posV) <= (dpScout.state->endPosVecV));
+}
+
+template <typename TDPCell, typename TTraits,
+          typename TIsLastRow,
+          typename TTop, typename TLeft, typename TGapModel, typename TTraceConfig>
+inline auto _getCompareMask(DPScout_<TDPCell, SimdAlignmentScout<SimdAlignVariableLength<TTraits> > > const & /*dpScout*/,
+                            False const & /*lastCol*/,
+                            TIsLastRow const & /*lastRow*/,
+                            DPProfile_<GlobalAlignment_<FreeEndGaps_<TTop, TLeft, False, True>>,
+                                       TGapModel, TTraceConfig> const &)
+{
+    using TSimdMaskVec = typename SimdMaskVector<typename TTraits::TSimdVector>::Type;
+    return createVector<TSimdMaskVec>(0);
+}
+
+// Tracking if the last column and last row is enabled
+template <typename TDPCell, typename TTraits,
+          typename TTop, typename TLeft, typename TGapModel, typename TTraceConfig>
+inline auto _getCompareMask(DPScout_<TDPCell, SimdAlignmentScout<SimdAlignVariableLength<TTraits> > > const & dpScout,
+                            True const & /*lastCol*/,
+                            True const & /*lastRow*/,
+                            DPProfile_<GlobalAlignment_<FreeEndGaps_<TTop, TLeft, True, True>>,
+                                       TGapModel, TTraceConfig> const &)
+{
+    using TSimdVec = typename TTraits::TSimdVector;
+    return ((createVector<TSimdVec>(dpScout.state->posH) == (dpScout.state->endPosVecH)) &
+            (createVector<TSimdVec>(dpScout.state->posV) <= (dpScout.state->endPosVecV))) |
+           ((createVector<TSimdVec>(dpScout.state->posH) <= (dpScout.state->endPosVecH)) &
+            (createVector<TSimdVec>(dpScout.state->posV) == (dpScout.state->endPosVecV)));
+}
+
+template <typename TDPCell, typename TTraits,
+          typename TTop, typename TLeft, typename TGapModel, typename TTraceConfig>
+inline auto _getCompareMask(DPScout_<TDPCell, SimdAlignmentScout<SimdAlignVariableLength<TTraits> > > const & dpScout,
+                            False const & /*lastCol*/,
+                            True const & /*lastRow*/,
+                            DPProfile_<GlobalAlignment_<FreeEndGaps_<TTop, TLeft, True, True>>,
+                                       TGapModel, TTraceConfig> const &)
+{
+    using TSimdVec = typename TTraits::TSimdVector;
+    return (createVector<TSimdVec>(dpScout.state->posH) <= (dpScout.state->endPosVecH)) &
+           (createVector<TSimdVec>(dpScout.state->posV) == (dpScout.state->endPosVecV));
+}
+
+template <typename TDPCell, typename TTraits,
+          typename TTop, typename TLeft, typename TGapModel, typename TTraceConfig>
+inline auto _getCompareMask(DPScout_<TDPCell, SimdAlignmentScout<SimdAlignVariableLength<TTraits> > > const & dpScout,
+                            True const & /*lastCol*/,
+                            False const & /*lastRow*/,
+                            DPProfile_<GlobalAlignment_<FreeEndGaps_<TTop, TLeft, True, True>>,
+                                       TGapModel, TTraceConfig> const &)
+{
+    using TSimdVec = typename TTraits::TSimdVector;
+    return (createVector<TSimdVec>(dpScout.state->posH) == (dpScout.state->endPosVecH)) &
+           (createVector<TSimdVec>(dpScout.state->posV) <= (dpScout.state->endPosVecV));
+}
+
+template <typename TDPCell, typename TTraits,
+          typename TTop, typename TLeft, typename TGapModel, typename TTraceConfig>
+inline auto _getCompareMask(DPScout_<TDPCell, SimdAlignmentScout<SimdAlignVariableLength<TTraits> > > const & /*dpScout*/,
+                            False const & /*lastCol*/,
+                            False const & /*lastRow*/,
+                            DPProfile_<GlobalAlignment_<FreeEndGaps_<TTop, TLeft, True, True>>,
+                                       TGapModel, TTraceConfig> const &)
+{
+    using TSimdMaskVec = typename SimdMaskVector<typename TTraits::TSimdVector>::Type;
+    return createVector<TSimdMaskVec>(0);
+}
+
+// If local alignment.
+template <typename TDPCell, typename TTraits,
+          typename TIsLastColumn,
+          typename TIsLastRow,
+          typename TAlgoSpec, typename TGapModel, typename TTraceConfig>
+inline auto _getCompareMask(DPScout_<TDPCell, SimdAlignmentScout<SimdAlignVariableLength<TTraits> > > const & dpScout,
+                            TIsLastColumn const & /*lastCol*/,
+                            TIsLastRow const & /*lastRow*/,
+                            DPProfile_<LocalAlignment_<TAlgoSpec>, TGapModel, TTraceConfig> const &)
+{
+    using TSimdVec = typename TTraits::TSimdVector;
+    return (createVector<TSimdVec>(dpScout.state->posH) <= (dpScout.state->endPosVecH)) &
+           (createVector<TSimdVec>(dpScout.state->posV) <= (dpScout.state->endPosVecV));
+}
+
+// ----------------------------------------------------------------------------
+// Function _scoutBestScore()                         [SimdAlignVariableLength]
+// ----------------------------------------------------------------------------
+
+template <typename TDPCell, typename TTraits,
+          typename TIsLastColumn,
+          typename TTop, typename TLeft, typename TGapModel, typename TTraceConfig, typename TExecPolicy>
+inline auto _getCompareMask(DPScout_<TDPCell, SimdAlignmentScout<SimdAlignVariableLength<TTraits> > > const & /*dpScout*/,
+                            TIsLastColumn const & /*lastCol*/,
+                            False const & /*lastRow*/,
+                            DPProfile_<GlobalAlignment_<FreeEndGaps_<TTop, TLeft, True, False>>,
+                                       TGapModel, TTraceConfig, TExecPolicy> const &)
+{
+    using TSimdMaskVec = typename SimdMaskVector<typename TTraits::TSimdVector>::Type;
+    return createVector<TSimdMaskVec>(0);
+}
+
+// Tracking if the last column is enabled
+template <typename TDPCell, typename TTraits,
+          typename TIsLastColumn,
+          typename TIsLastRow,
+          typename TTop, typename TLeft, typename TGapModel, typename TTraceConfig, typename TExecPolicy>
+inline auto _getCompareMask(DPScout_<TDPCell, SimdAlignmentScout<SimdAlignVariableLength<TTraits> > > const & dpScout,
+                            TIsLastColumn const & /*lastCol*/,
+                            TIsLastRow const & /*lastRow*/,
+                            DPProfile_<GlobalAlignment_<FreeEndGaps_<TTop, TLeft, False, True>>,
+                                       TGapModel, TTraceConfig, TExecPolicy> const &)
+{
+    using TSimdVec = typename TTraits::TSimdVector;
+    return (createVector<TSimdVec>(dpScout.state->posH) == (dpScout.state->endPosVecH)) &
+           (createVector<TSimdVec>(dpScout.state->posV) <= (dpScout.state->endPosVecV));
+}
+
+template <typename TDPCell, typename TTraits,
+          typename TIsLastRow,
+          typename TTop, typename TLeft, typename TGapModel, typename TTraceConfig, typename TExecPolicy>
+inline auto _getCompareMask(DPScout_<TDPCell, SimdAlignmentScout<SimdAlignVariableLength<TTraits> > > const & /*dpScout*/,
+                            False const & /*lastCol*/,
+                            TIsLastRow const & /*lastRow*/,
+                            DPProfile_<GlobalAlignment_<FreeEndGaps_<TTop, TLeft, False, True>>,
+                                       TGapModel, TTraceConfig, TExecPolicy> const &)
+{
+    using TSimdVec = typename TTraits::TSimdVector;
+    return createVector<TSimdVec>(0);
+}
+
+// Tracking if the last column and last row is enabled
+template <typename TDPCell, typename TTraits,
+          typename TTop, typename TLeft, typename TGapModel, typename TTraceConfig, typename TExecPolicy>
+inline auto _getCompareMask(DPScout_<TDPCell, SimdAlignmentScout<SimdAlignVariableLength<TTraits> > > const & dpScout,
+                            True const & /*lastCol*/,
+                            True const & /*lastRow*/,
+                            DPProfile_<GlobalAlignment_<FreeEndGaps_<TTop, TLeft, True, True>>,
+                                       TGapModel, TTraceConfig, TExecPolicy> const &)
+{
+    using TSimdVec = typename TTraits::TSimdVector;
+    return ((createVector<TSimdVec>(dpScout.state->posH) == (dpScout.state->endPosVecH)) &
+            (createVector<TSimdVec>(dpScout.state->posV) <= (dpScout.state->endPosVecV))) |
+           ((createVector<TSimdVec>(dpScout.state->posH) <= (dpScout.state->endPosVecH)) &
+            (createVector<TSimdVec>(dpScout.state->posV) == (dpScout.state->endPosVecV)));
+}
+
+template <typename TDPCell, typename TTraits,
+          typename TTop, typename TLeft, typename TGapModel, typename TTraceConfig, typename TExecPolicy>
+inline auto _getCompareMask(DPScout_<TDPCell, SimdAlignmentScout<SimdAlignVariableLength<TTraits> > > const & dpScout,
+                            False const & /*lastCol*/,
+                            True const & /*lastRow*/,
+                            DPProfile_<GlobalAlignment_<FreeEndGaps_<TTop, TLeft, True, True>>,
+                                       TGapModel, TTraceConfig, TExecPolicy> const &)
+{
+    using TSimdVec = typename TTraits::TSimdVector;
+    return (createVector<TSimdVec>(dpScout.state->posH) <= (dpScout.state->endPosVecH)) &
+           (createVector<TSimdVec>(dpScout.state->posV) == (dpScout.state->endPosVecV));
+}
+
+template <typename TDPCell, typename TTraits,
+          typename TTop, typename TLeft, typename TGapModel, typename TTraceConfig, typename TExecPolicy>
+inline auto _getCompareMask(DPScout_<TDPCell, SimdAlignmentScout<SimdAlignVariableLength<TTraits> > > const & dpScout,
+                            True const & /*lastCol*/,
+                            False const & /*lastRow*/,
+                            DPProfile_<GlobalAlignment_<FreeEndGaps_<TTop, TLeft, True, True>>,
+                                       TGapModel, TTraceConfig, TExecPolicy> const &)
+{
+    using TSimdVec = typename TTraits::TSimdVector;
+    return (createVector<TSimdVec>(dpScout.state->posH) == (dpScout.state->endPosVecH)) &
+           (createVector<TSimdVec>(dpScout.state->posV) <= (dpScout.state->endPosVecV));
+}
+
+template <typename TDPCell, typename TTraits,
+          typename TTop, typename TLeft, typename TGapModel, typename TTraceConfig, typename TExecPolicy>
+inline auto _getCompareMask(DPScout_<TDPCell, SimdAlignmentScout<SimdAlignVariableLength<TTraits> > > const & /*dpScout*/,
+                            False const & /*lastCol*/,
+                            False const & /*lastRow*/,
+                            DPProfile_<GlobalAlignment_<FreeEndGaps_<TTop, TLeft, True, True>>,
+                                       TGapModel, TTraceConfig, TExecPolicy> const &)
+{
+    using TSimdMaskVec = typename SimdMaskVector<typename TTraits::TSimdVector>::Type;
+    return createVector<TSimdMaskVec>(0);
+}
+
+// If local alignment.
+template <typename TDPCell, typename TTraits,
+          typename TIsLastColumn,
+          typename TIsLastRow,
+          typename TAlgoSpec, typename TGapModel, typename TTraceConfig, typename TExecPolicy>
+inline auto _getCompareMask(DPScout_<TDPCell, SimdAlignmentScout<SimdAlignVariableLength<TTraits> > > const & dpScout,
+                            TIsLastColumn const & /*lastCol*/,
+                            TIsLastRow const & /*lastRow*/,
+                            DPProfile_<LocalAlignment_<TAlgoSpec>, TGapModel, TTraceConfig, TExecPolicy> const &)
+{
+    using TSimdVec = typename TTraits::TSimdVector;
+    return (createVector<TSimdVec>(dpScout.state->posH) <= (dpScout.state->endPosVecH)) &
+           (createVector<TSimdVec>(dpScout.state->posV) <= (dpScout.state->endPosVecV));
+}
+
+// ----------------------------------------------------------------------------
+// Function _scoutBestScore()                         [SimdAlignVariableLength]
+// ----------------------------------------------------------------------------
+
+template <typename TDPCell, typename TTraits,
           typename TTraceMatrixNavigator,
           typename TIsLastColumn,
           typename TIsLastRow>
@@ -274,27 +572,56 @@ _scoutBestScore(DPScout_<TDPCell, SimdAlignmentScout<SimdAlignVariableLength<TTr
                 TIsLastColumn const & /**/,
                 TIsLastRow const & /**/)
 {
-    auto cmp = cmpGt(_scoreOfCell(activeCell), _scoreOfCell(dpScout._maxScore));
-    cmp &= dpScout.state->masks[dpScout.state->posV];
-    _copySimdCell(dpScout, activeCell, cmp);
-    _updateHostPositions(dpScout, cmp, createVector<SimdVector<int32_t>::Type>(position(navigator)));
+    using TMatrixType = typename MatrixType<TTraceMatrixNavigator>::Type;
+    auto mask = cmpGt(_scoreOfCell(activeCell), _scoreOfCell(dpScout._maxScore)) &
+                _getCompareMask(dpScout, TIsLastColumn{}, TIsLastRow{}, typename TTraits::TDPProfile{});
+    _copySimdCell(dpScout, activeCell, mask, TMatrixType());
+    _updateHostPositions(dpScout, mask, navigator, TMatrixType());
 }
 
 // ----------------------------------------------------------------------------
-// Function maxHostPosition()
+// Function maxHostCoordinate()
 // ----------------------------------------------------------------------------
 
+template <typename TDPCell, typename TScoutSpec,
+          typename TDimension>
+inline auto
+maxHostCoordinate(DPScout_<TDPCell, SimdAlignmentScout<TScoutSpec> > const & dpScout,
+                  TDimension const dimension)
+{
+    return (dimension == DPMatrixDimension_::HORIZONTAL) ? dpScout.mHorizontalPos[dpScout._simdLane] :
+            dpScout.mVerticalPos[dpScout._simdLane];
+}
+
 template <typename TDPCell, typename TScoutSpec>
-inline unsigned int
-maxHostPosition(DPScout_<TDPCell, SimdAlignmentScout<TScoutSpec> > const & dpScout)
+inline auto
+maxHostCoordinates(DPScout_<TDPCell, SimdAlignmentScout<TScoutSpec> > const & dpScout)
 {
-    if(dpScout._simdLane < LENGTH<SimdVector<int32_t>::Type>::VALUE)
-        return value(dpScout._maxHostLow, dpScout._simdLane);
-    else
-        return value(dpScout._maxHostHigh, dpScout._simdLane - LENGTH<SimdVector<int32_t>::Type>::VALUE);
+    return std::make_pair(maxHostCoordinate(dpScout, DPMatrixDimension_::HORIZONTAL),
+                          maxHostCoordinate(dpScout, DPMatrixDimension_::VERTICAL));
 }
 
 // ----------------------------------------------------------------------------
+// Function maxScoreAt()
+// ----------------------------------------------------------------------------
+
+template <typename TDPCell, typename TScoutSpec>
+inline auto
+maxScoreAt(DPScout_<TDPCell, SimdAlignmentScout<TScoutSpec> > const & dpScout)
+{
+    return maxScore(dpScout)[dpScout._simdLane];
+}
+
+// ----------------------------------------------------------------------------
+// Function maxHostPosition()
+// ----------------------------------------------------------------------------
+
+template <typename TDPCell, typename TScoutSpec>
+[[deprecated("Use maxHostCoordinate instead!")]] auto
+maxHostPosition(DPScout_<TDPCell, SimdAlignmentScout<TScoutSpec> > const & /*unused*/)
+{}
+
+// ----------------------------------------------------------------------------
 // Function _setSimdLane()
 // ----------------------------------------------------------------------------
 
@@ -313,7 +640,7 @@ template <typename TDPCell, typename TTraits>
 inline void
 _preInitScoutHorizontal(DPScout_<TDPCell, SimdAlignmentScout<SimdAlignVariableLength<TTraits> > > & scout)
 {
-    scout.state->nextEndsH = begin(scout.state->sortedEndsH, Standard());
+    goBegin(scout.state->nextEndsH);
     scout.state->posH = 0;
 }
 
@@ -325,8 +652,8 @@ template <typename TDPCell, typename TTraits>
 inline void
 _preInitScoutVertical(DPScout_<TDPCell, SimdAlignmentScout<SimdAlignVariableLength<TTraits> > > & scout)
 {
-    scout.state->updateMasks();
-    scout.state->nextEndsV = begin(scout.state->sortedEndsV, Standard());
+    // scout.state->updateMasks();
+    goBegin(scout.state->nextEndsV);
     scout.state->posV = 0;
 }
 
@@ -339,7 +666,7 @@ inline bool
 _reachedHorizontalEndPoint(DPScout_<TDPCell, SimdAlignmentScout<SimdAlignVariableLength<TTraits> > > & scout,
                            TIter const & hIt)
 {
-    return *(scout.state->nextEndsH) == position(hIt);
+    return *(scout.state->nextEndsH) == position(hIt) + 1;
 }
 
 // ----------------------------------------------------------------------------
@@ -351,7 +678,7 @@ inline bool
 _reachedVerticalEndPoint(DPScout_<TDPCell, SimdAlignmentScout<SimdAlignVariableLength<TTraits> > > & scout,
                          TIter const & vIt)
 {
-    return *(scout.state->nextEndsV) == position(vIt);
+    return *(scout.state->nextEndsV) == position(vIt) + 1;
 }
 
 // ----------------------------------------------------------------------------
@@ -362,12 +689,7 @@ template <typename TDPCell, typename TTraits>
 inline void
 _nextHorizontalEndPos(DPScout_<TDPCell, SimdAlignmentScout<SimdAlignVariableLength<TTraits> > > & scout)
 {
-    auto oldLength = *scout.state->nextEndsH;
-    while (scout.state->nextEndsH != end(scout.state->sortedEndsH, Standard()) &&
-           *scout.state->nextEndsH == oldLength)
-    {
-        ++scout.state->nextEndsH;
-    }
+    ++scout.state->nextEndsH;
 }
 
 // ----------------------------------------------------------------------------
@@ -378,12 +700,7 @@ template <typename TDPCell, typename TTraits>
 inline void
 _nextVerticalEndPos(DPScout_<TDPCell, SimdAlignmentScout<SimdAlignVariableLength<TTraits> > > & scout)
 {
-    auto oldLength = *scout.state->nextEndsV;
-    while (scout.state->nextEndsV != end(scout.state->sortedEndsV, Standard()) &&
-           *scout.state->nextEndsV == oldLength)
-    {
-        ++scout.state->nextEndsV;
-    }
+    ++scout.state->nextEndsV;
 }
 
 // ----------------------------------------------------------------------------
@@ -425,7 +742,8 @@ inline auto
 _hostLengthH(DPScout_<TDPCell, SimdAlignmentScout<SimdAlignVariableLength<TTraits> > > const & scout,
              TSeqH const & /*seqH*/)
 {
-    return host(scout.state->sortedEndsH)[scout._simdLane] + 1;
+    using TInnerValue = typename Value<typename TTraits::TSimdVector>::Type;
+    return static_cast<TInnerValue>(scout.state->endPosVecH[scout._simdLane]);
 }
 
 // ----------------------------------------------------------------------------
@@ -445,10 +763,10 @@ inline auto
 _hostLengthV(DPScout_<TDPCell, SimdAlignmentScout<SimdAlignVariableLength<TTraits> > > const & scout,
              TSeqV const & /*seqV*/)
 {
-    return host(scout.state->sortedEndsV)[scout._simdLane] + 1;
+    using TInnerValue = typename Value<typename TTraits::TSimdVector>::Type;
+    return static_cast<TInnerValue>(scout.state->endPosVecV[scout._simdLane]);
 }
 
 }  // namespace seqan
 
 #endif  // #ifndef SEQAN_INCLUDE_SEQAN_ALIGN_SIMD_DP_SCOUT_SIMD_H_
-
diff --git a/include/seqan/align/dp_setup.h b/include/seqan/align/dp_setup.h
index 29bf429..a9ee724 100644
--- a/include/seqan/align/dp_setup.h
+++ b/include/seqan/align/dp_setup.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -215,21 +215,21 @@ struct SetupAlignmentProfile_;
 template <typename TFreeEndGaps, typename TGapCosts, typename TTraceSwitch>
 struct SetupAlignmentProfile_<DPGlobal, TFreeEndGaps, TGapCosts, TTraceSwitch>
 {
-    typedef DPProfile_<GlobalAlignment_<TFreeEndGaps>, TGapCosts, TTraceSwitch> Type;
+    typedef DPProfile_<GlobalAlignment_<TFreeEndGaps>, TGapCosts, TTraceSwitch, Serial> Type;
 };
 
 // Profile for Smith-Waterman algorithm.
 template <typename TFreeEndGaps, typename TGapCosts, typename TTraceSwitch>
 struct SetupAlignmentProfile_<DPLocal, TFreeEndGaps, TGapCosts, TTraceSwitch>
 {
-    typedef DPProfile_<LocalAlignment_<>, TGapCosts, TTraceSwitch> Type;
+    typedef DPProfile_<LocalAlignment_<>, TGapCosts, TTraceSwitch, Serial> Type;
 };
 
 // Profile for Waterman-Eggert algorithm
 template <typename TFreeEndGaps, typename TGapCosts, typename TTraceSwitch>
 struct SetupAlignmentProfile_<DPLocalEnumerate, TFreeEndGaps, TGapCosts, TTraceSwitch>
 {
-    typedef DPProfile_<LocalAlignment_<SuboptimalAlignment>, TGapCosts, TracebackOn<TracebackConfig_<SingleTrace, GapsLeft> > > Type;
+    typedef DPProfile_<LocalAlignment_<SuboptimalAlignment>, TGapCosts, TracebackOn<TracebackConfig_<SingleTrace, GapsLeft> >, Serial> Type;
 };
 
 
@@ -263,16 +263,17 @@ _usesAffineGaps(TScoringScheme const & scoringScheme,
 // Function _setUpAndRunAlignment()
 // ----------------------------------------------------------------------------
 
-template <typename TScoreValue, typename TGapModel,
+// Scalar implementation.
+template <typename TScoreValue, typename TGapSpec, typename TTraceValue, typename TScoreMat, typename TTraceMat,
+          typename TTraceSegment, typename TSpec,
           typename TDPScoutStateSpec,
-          typename TTrace,
           typename TSequenceH,
           typename TSequenceV,
           typename TScoreValue2, typename TScoreSpec,
           typename TDPType, typename TBand, typename TFreeEndGaps, typename TTraceConfig>
 typename Value<Score<TScoreValue2, TScoreSpec> >::Type
-_setUpAndRunAlignment(DPContext<TScoreValue, TGapModel> & dpContext,
-                      TTrace & traceSegments,
+_setUpAndRunAlignment(DPContext<DPCell_<TScoreValue, TGapSpec>, TTraceValue, TScoreMat, TTraceMat> & dpContext,
+                      String<TTraceSegment, TSpec> & traceSegments,
                       DPScoutState_<TDPScoutStateSpec> & dpScoutState,
                       TSequenceH const & seqH,
                       TSequenceV const & seqV,
@@ -282,12 +283,12 @@ _setUpAndRunAlignment(DPContext<TScoreValue, TGapModel> & dpContext,
     SEQAN_ASSERT_GEQ(length(seqH), 1u);
     SEQAN_ASSERT_GEQ(length(seqV), 1u);
 
-    typedef typename SetupAlignmentProfile_<TDPType, TFreeEndGaps, TGapModel, TTraceConfig>::Type TDPProfile;
+    typedef typename SetupAlignmentProfile_<TDPType, TFreeEndGaps, TGapSpec, TTraceConfig>::Type TDPProfile;
     return _computeAlignment(dpContext, traceSegments, dpScoutState, seqH, seqV, scoringScheme, alignConfig._band,
                              TDPProfile());
 }
 
-template <typename TTrace,
+template <typename TTraceSegment, typename TSpec,
           typename TDPScoutStateSpec,
           typename TSequenceH,
           typename TSequenceV,
@@ -295,7 +296,65 @@ template <typename TTrace,
           typename TDPType, typename TBand, typename TFreeEndGaps, typename TTraceConfig,
           typename TGapModel>
 typename Value<Score<TScoreValue2, TScoreSpec> >::Type
-_setUpAndRunAlignment(TTrace & traceSegments,
+_setUpAndRunAlignment(String<TTraceSegment, TSpec> & traceSegments,
+                      DPScoutState_<TDPScoutStateSpec> & dpScoutState,
+                      TSequenceH const & seqH,
+                      TSequenceV const & seqV,
+                      Score<TScoreValue2, TScoreSpec> const & scoringScheme,
+                      AlignConfig2<TDPType, TBand, TFreeEndGaps, TTraceConfig> const & alignConfig,
+                      TGapModel const & /**/)
+{
+    DPContext<DPCell_<TScoreValue2, TGapModel>, typename TraceBitMap_<>::Type> dpContext;
+    return _setUpAndRunAlignment(dpContext, traceSegments, dpScoutState, seqH, seqV, scoringScheme, alignConfig);
+}
+
+template <typename TTraceSegment, typename TSpec, typename TDPScoutStateSpec,
+          typename TSequenceH, typename TSequenceV, typename TScoreValue2, typename TScoreSpec, typename TDPType,
+          typename TBand, typename TFreeEndGaps, typename TTraceConfig>
+typename Value<Score<TScoreValue2, TScoreSpec> >::Type
+_setUpAndRunAlignment(String<TTraceSegment, TSpec> & traceSegments,
+                      DPScoutState_<TDPScoutStateSpec> & dpScoutState,
+                      TSequenceH const & seqH,
+                      TSequenceV const & seqV,
+                      Score<TScoreValue2, TScoreSpec> const & scoringScheme,
+                      AlignConfig2<TDPType, TBand, TFreeEndGaps, TTraceConfig> const & alignConfig)
+{
+    if (_usesAffineGaps(scoringScheme, seqH, seqV))
+        return _setUpAndRunAlignment(traceSegments, dpScoutState, seqH, seqV, scoringScheme, alignConfig, AffineGaps());
+    else
+        return _setUpAndRunAlignment(traceSegments, dpScoutState, seqH, seqV, scoringScheme, alignConfig, LinearGaps());
+}
+
+// SIMD aware implementation.
+template <typename TScoreValue, typename TGapSpec, typename TTraceValue, typename TScoreMat, typename TTraceMat,
+          typename TTraceSegment, typename TSpec,
+          typename TDPScoutStateSpec,
+          typename TSequenceH,
+          typename TSequenceV,
+          typename TScoreValue2, typename TScoreSpec,
+          typename TDPType, typename TBand, typename TFreeEndGaps, typename TTraceConfig>
+typename Value<Score<TScoreValue2, TScoreSpec> >::Type
+_setUpAndRunAlignment(DPContext<DPCell_<TScoreValue, TGapSpec>, TTraceValue, TScoreMat, TTraceMat> & dpContext,
+                      StringSet<String<TTraceSegment, TSpec> > & traceSegments,
+                      DPScoutState_<TDPScoutStateSpec> & dpScoutState,
+                      TSequenceH const & seqH,
+                      TSequenceV const & seqV,
+                      Score<TScoreValue2, TScoreSpec> const & scoringScheme,
+                      AlignConfig2<TDPType, TBand, TFreeEndGaps, TTraceConfig> const & alignConfig)
+{
+    SEQAN_ASSERT_GEQ(length(seqH), 1u);
+    SEQAN_ASSERT_GEQ(length(seqV), 1u);
+
+    typedef typename SetupAlignmentProfile_<TDPType, TFreeEndGaps, TGapSpec, TTraceConfig>::Type TDPProfile;
+    return _computeAlignment(dpContext, traceSegments, dpScoutState, seqH, seqV, scoringScheme, alignConfig._band,
+                             TDPProfile());
+}
+
+template <typename TTraceSegment, typename TSpec, typename TDPScoutStateSpec,
+          typename TSequenceH, typename TSequenceV, typename TScoreValue2, typename TScoreSpec, typename TDPType,
+          typename TBand, typename TFreeEndGaps, typename TTraceConfig, typename TGapModel>
+typename Value<Score<TScoreValue2, TScoreSpec> >::Type
+_setUpAndRunAlignment(StringSet<String<TTraceSegment, TSpec> > & traceSegments,
                       DPScoutState_<TDPScoutStateSpec> & dpScoutState,
                       TSequenceH const & seqH,
                       TSequenceV const & seqV,
@@ -303,7 +362,12 @@ _setUpAndRunAlignment(TTrace & traceSegments,
                       AlignConfig2<TDPType, TBand, TFreeEndGaps, TTraceConfig> const & alignConfig,
                       TGapModel const & /**/)
 {
-    DPContext<TScoreValue2, TGapModel> dpContext;
+    typedef DPCell_<TScoreValue2, TGapModel> TDPCell;
+    typedef typename TraceBitMap_<TScoreValue2>::Type TTraceValue;
+    typedef String<TDPCell, Alloc<OverAligned> > TScoreHost;
+    typedef String<TTraceValue, Alloc<OverAligned> > TTraceHost;
+
+    DPContext<TDPCell, TTraceValue, TScoreHost, TTraceHost> dpContext;
     return _setUpAndRunAlignment(dpContext, traceSegments, dpScoutState, seqH, seqV, scoringScheme, alignConfig);
 }
 
diff --git a/include/seqan/align/dp_trace_segment.h b/include/seqan/align/dp_trace_segment.h
index 2b591be..5bc8fe6 100644
--- a/include/seqan/align/dp_trace_segment.h
+++ b/include/seqan/align/dp_trace_segment.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -69,7 +69,7 @@ public:
     TTraceValue _traceValue;            // the trace direction
 
     TraceSegment_() :
-        _horizontalBeginPos(0), _verticalBeginPos(0), _length(0), _traceValue(+TraceBitMap_<TTraceValue>::NONE){}
+        _horizontalBeginPos(0), _verticalBeginPos(0), _length(0), _traceValue(TraceBitMap_<TTraceValue>::NONE){}
 
     TraceSegment_(TraceSegment_ const & other) :
         _horizontalBeginPos(other._horizontalBeginPos),
@@ -328,11 +328,11 @@ inline void _recordSegment(TTraceSegments & traceSegments,
         return;  // we don't store empty segments
 
     if (traceValue & TraceBitMap_<TTraceValue>::DIAGONAL)
-        appendValue(traceSegments, TTraceSegment(horizontalBeginPos, verticalBeginPos, segmentLength, +TraceBitMap_<TTraceValue>::DIAGONAL));
+        appendValue(traceSegments, TTraceSegment(horizontalBeginPos, verticalBeginPos, segmentLength, TraceBitMap_<TTraceValue>::DIAGONAL));
     else if (traceValue & TraceBitMap_<TTraceValue>::VERTICAL)
-        appendValue(traceSegments, TTraceSegment(horizontalBeginPos, verticalBeginPos, segmentLength, +TraceBitMap_<TTraceValue>::VERTICAL));
+        appendValue(traceSegments, TTraceSegment(horizontalBeginPos, verticalBeginPos, segmentLength, TraceBitMap_<TTraceValue>::VERTICAL));
     else if (traceValue & TraceBitMap_<TTraceValue>::HORIZONTAL)
-        appendValue(traceSegments, TTraceSegment(horizontalBeginPos, verticalBeginPos, segmentLength, +TraceBitMap_<TTraceValue>::HORIZONTAL));
+        appendValue(traceSegments, TTraceSegment(horizontalBeginPos, verticalBeginPos, segmentLength, TraceBitMap_<TTraceValue>::HORIZONTAL));
     // everything else is not tracked.
 }
 
diff --git a/include/seqan/align/dp_traceback_adaptor.h b/include/seqan/align/dp_traceback_adaptor.h
index f9e495f..b66283c 100644
--- a/include/seqan/align/dp_traceback_adaptor.h
+++ b/include/seqan/align/dp_traceback_adaptor.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/align/dp_traceback_impl.h b/include/seqan/align/dp_traceback_impl.h
index a2439f9..f2c8b6f 100644
--- a/include/seqan/align/dp_traceback_impl.h
+++ b/include/seqan/align/dp_traceback_impl.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -115,12 +115,11 @@ public:
 template <typename TDPProfile>
 struct PreferGapsAtEnd_ : False{};
 
-template <typename TAlgorithm, typename TTracebackSpec>
-struct PreferGapsAtEnd_<DPProfile_<TAlgorithm, AffineGaps, TTracebackSpec > > : True{};
-
-template <typename TAlgorithm, typename TTraceSpec>
-struct PreferGapsAtEnd_<DPProfile_<TAlgorithm, LinearGaps, TracebackOn<TracebackConfig_<TTraceSpec, GapsRight> > > > : True{};
+template <typename TAlgorithm, typename TTracebackSpec, typename TExecSpec>
+struct PreferGapsAtEnd_<DPProfile_<TAlgorithm, AffineGaps, TTracebackSpec, TExecSpec> > : True{};
 
+template <typename TAlgorithm, typename TTraceSpec, typename TExecSpec>
+struct PreferGapsAtEnd_<DPProfile_<TAlgorithm, LinearGaps, TracebackOn<TracebackConfig_<TTraceSpec, GapsRight> >, TExecSpec> > : True{};
 
 // ============================================================================
 // Functions
@@ -143,13 +142,13 @@ _hasReachedEnd(TracebackCoordinator_<TPosition> const & coordinator)
 
 template <typename TPosition, typename TBandFlag, typename TSizeH, typename TSizeV>
 inline void
-_initTracebackCoordinator(TracebackCoordinator_<TPosition> & coordinator,
-                          DPBandConfig<TBandFlag> const & band,
-                          TSizeH seqHSize,
-                          TSizeV seqVSize)
+_initTracebackCoordinator(SEQAN_UNUSED TracebackCoordinator_<TPosition> & coordinator,
+                          SEQAN_UNUSED DPBandConfig<TBandFlag> const & band,
+                          SEQAN_UNUSED TSizeH seqHSize,
+                          SEQAN_UNUSED TSizeV seqVSize)
 {
     typedef typename Position<DPBandConfig<TBandFlag> >::Type TBandPosition;
-    if (IsSameType<TBandFlag, BandOn>::VALUE)
+    SEQAN_IF_CONSTEXPR (IsSameType<TBandFlag, BandOn>::VALUE)
     {
         // Adapt the current column value when the lower diagonal is positive (shift right in horizontal direction).
         if (lowerDiagonal(band) >= 0)
@@ -184,7 +183,6 @@ _isInBand(TracebackCoordinator_<TPosition> const & coordinator)
     return (coordinator._currColumn > coordinator._breakpoint1 || coordinator._currColumn <= coordinator._breakpoint2);
 }
 
-
 // ----------------------------------------------------------------------------
 // Function _doTracebackGoDiagonal()
 // ----------------------------------------------------------------------------
@@ -239,9 +237,10 @@ _doTracebackGoVertical(TTarget & target,
         fragmentLength = 0;
     }
     // We are in a vertical gap. So continue after we reach the end of the vertical gap.
-    if (IsSameType<TGapCosts, AffineGaps>::VALUE)
+    SEQAN_IF_CONSTEXPR (IsSameType<TGapCosts, AffineGaps>::VALUE)
     {
-        while ((!(traceValue & TraceBitMap_<>::VERTICAL_OPEN) || (traceValue & TraceBitMap_<>::VERTICAL)) && (tracebackCoordinator._currRow != 1))
+        while ((!(traceValue & TraceBitMap_<>::VERTICAL_OPEN) || (traceValue & TraceBitMap_<>::VERTICAL)) &&
+               tracebackCoordinator._currRow != 1)
         {
             _traceVertical(matrixNavigator, _isInBand(tracebackCoordinator));
             traceValue = scalarValue(matrixNavigator);
@@ -316,9 +315,10 @@ _doTracebackGoHorizontal(TTarget & target,
         lastTraceValue = TraceBitMap_<>::HORIZONTAL;
         fragmentLength = 0;
     }
-    if (IsSameType<TGapCosts, AffineGaps>::VALUE)
+    SEQAN_IF_CONSTEXPR (IsSameType<TGapCosts, AffineGaps>::VALUE)
     {
-        while ((!(traceValue & TraceBitMap_<>::HORIZONTAL_OPEN) || (traceValue & TraceBitMap_<>::HORIZONTAL)) && (tracebackCoordinator._currColumn != 1))
+        while ((!(traceValue & TraceBitMap_<>::HORIZONTAL_OPEN) || (traceValue & TraceBitMap_<>::HORIZONTAL)) &&
+               tracebackCoordinator._currColumn != 1)
         {
             _traceHorizontal(matrixNavigator, _isInBand(tracebackCoordinator));
             traceValue = scalarValue(matrixNavigator);
@@ -487,52 +487,46 @@ _retrieveInitialTraceDirection(TTraceValue & traceValue, TDPProfile const & /*dp
 // ----------------------------------------------------------------------------
 
 template <typename TTarget,
+          typename TTraceValue,
           typename TDPTraceMatrixNavigator,
           typename TSizeH,
           typename TSizeV,
           typename TBandFlag,
-          typename TAlgorithm, typename TGapCosts, typename TTracebackSpec>
-inline SEQAN_FUNC_DISABLE_IF(Is<ContainerConcept<TSizeH> >, void)
-_computeTraceback(TTarget & target,
-                  TDPTraceMatrixNavigator & matrixNavigator,
-                  unsigned  maxHostPosition,
-                  TSizeH const & seqHSize,
-                  TSizeV const & seqVSize,
-                  DPBandConfig<TBandFlag> const & band,
-                  DPProfile_<TAlgorithm, TGapCosts, TTracebackSpec> const & dpProfile)
+          typename TAlgorithm, typename TGapCosts, typename TTracebackSpec, typename TExecPolicy,
+          typename TTraceHead,
+          typename TTraceTail>
+void _computeTraceback(TTarget & target,
+                       TTraceValue & traceValue,
+                       TTraceValue & lastTraceValue,
+                       TDPTraceMatrixNavigator & matrixNavigator,
+                       TSizeH const & seqHSize,
+                       TSizeV const & seqVSize,
+                       DPBandConfig<TBandFlag> const & band,
+                       DPProfile_<TAlgorithm, TGapCosts, TTracebackSpec, TExecPolicy> const & /*dpProfile*/,
+                       TTraceHead const &,
+                       TTraceTail const &)
 {
-    typedef typename Container<TDPTraceMatrixNavigator>::Type TContainer;
-    typedef typename Size<TContainer>::Type TSize;
-    typedef typename Position<TContainer>::Type TPosition;
-    typedef typename TraceBitMap_<>::Type TTraceValue;
+    typedef typename Size<TTarget>::Type TSize;
+    typedef typename Position<TDPTraceMatrixNavigator>::Type TPosition;
 
-    if (IsSameType<TTracebackSpec, TracebackOff>::VALUE)
+    SEQAN_IF_CONSTEXPR (IsSameType<TTracebackSpec, TracebackOff>::VALUE)
         return;
 
     // Determine whether or not we place gaps to the left.
     typedef typename IsGapsLeft_<TTracebackSpec>::Type TIsGapsLeft;
 
-    // Set the navigator to the position where the maximum was found.
-    _setToPosition(matrixNavigator, maxHostPosition);
-
-    SEQAN_ASSERT_LEQ(coordinate(matrixNavigator, +DPMatrixDimension_::HORIZONTAL), seqHSize);
-    SEQAN_ASSERT_LEQ(coordinate(matrixNavigator, +DPMatrixDimension_::VERTICAL), seqVSize);
-
-    TTraceValue traceValue = scalarValue(matrixNavigator);
-    TTraceValue lastTraceValue = _retrieveInitialTraceDirection(traceValue, dpProfile);
-
     TracebackCoordinator_<TPosition> tracebackCoordinator(coordinate(matrixNavigator, +DPMatrixDimension_::HORIZONTAL),
                                                           coordinate(matrixNavigator, +DPMatrixDimension_::VERTICAL),
                                                           band, seqHSize, seqVSize);
 
-    if (TraceTail_<TAlgorithm>::VALUE)
+    if (TTraceTail::VALUE)
     {
-        if (tracebackCoordinator._currRow != seqVSize)
+        if (tracebackCoordinator._currRow != static_cast<TSize>(seqVSize))
             _recordSegment(target, seqHSize, tracebackCoordinator._currRow, seqVSize - tracebackCoordinator._currRow,
-                           +TraceBitMap_<>::VERTICAL);
-        if (tracebackCoordinator._currColumn != seqHSize)
+                           TraceBitMap_<>::VERTICAL);
+        if (tracebackCoordinator._currColumn != static_cast<TSize>(seqHSize))
             _recordSegment(target, tracebackCoordinator._currColumn, tracebackCoordinator._currRow, seqHSize -
-                           tracebackCoordinator._currColumn, +TraceBitMap_<>::HORIZONTAL);
+                           tracebackCoordinator._currColumn, TraceBitMap_<>::HORIZONTAL);
     }
 
     TSize fragmentLength = 0;
@@ -541,59 +535,92 @@ _computeTraceback(TTarget & target,
 
     // Record last detected fragment.
     _recordSegment(target, tracebackCoordinator._currColumn, tracebackCoordinator._currRow, fragmentLength, lastTraceValue);
-    if (TraceHead_<TAlgorithm>::VALUE)
+    if (TTraceHead::VALUE)
     {
         // Record leading gaps if any.
         if (tracebackCoordinator._currRow != 0u)
-            _recordSegment(target, 0, 0, tracebackCoordinator._currRow, +TraceBitMap_<>::VERTICAL);
+            _recordSegment(target, 0, 0, tracebackCoordinator._currRow, TraceBitMap_<>::VERTICAL);
         if (tracebackCoordinator._currColumn != 0u)
-            _recordSegment(target, 0, 0, tracebackCoordinator._currColumn, +TraceBitMap_<>::HORIZONTAL);
+            _recordSegment(target, 0, 0, tracebackCoordinator._currColumn, TraceBitMap_<>::HORIZONTAL);
     }
 }
 
-//// Needed as a delegation method to allow invocation of both methods with host position and dpScout.
+// Needed as a delegation method to allow invocation of both methods with host position and dpScout.
+// With sizes and maxHostPosition.
 template <typename TTarget,
           typename TDPTraceMatrixNavigator,
-          typename TSequenceH,
-          typename TSequenceV,
+          typename TSeqHSize,
+          typename TSeqVSize,
           typename TBandFlag,
-          typename TAlgorithm, typename TGapCosts, typename TTracebackSpec>
-inline SEQAN_FUNC_ENABLE_IF(Is<ContainerConcept<TSequenceH> >, void)
+          typename TAlgorithm, typename TGapCosts, typename TTracebackSpec, typename TExecPolicy>
+inline SEQAN_FUNC_DISABLE_IF(Is<ContainerConcept<TSeqHSize> >, void)
 _computeTraceback(TTarget & target,
                   TDPTraceMatrixNavigator & matrixNavigator,
                   unsigned  maxHostPosition,
-                  TSequenceH const & seqH,
-                  TSequenceV const & seqV,
+                  TSeqHSize const & seqHSize,
+                  TSeqVSize const & seqVSize,
                   DPBandConfig<TBandFlag> const & band,
-                  DPProfile_<TAlgorithm, TGapCosts, TTracebackSpec> const & dpProfile)
+                  DPProfile_<TAlgorithm, TGapCosts, TTracebackSpec, TExecPolicy> const & dpProfile)
 {
-    _computeTraceback(target, matrixNavigator, maxHostPosition, length(seqH), length(seqV), band, dpProfile);
+    using TSize SEQAN_TYPEDEF_FOR_DEBUG = typename Size<TTarget>::Type;
+    // Set the navigator to the position where the maximum was found.
+    _setToPosition(matrixNavigator, maxHostPosition);
+
+    SEQAN_ASSERT_LEQ(coordinate(matrixNavigator, +DPMatrixDimension_::HORIZONTAL), static_cast<TSize>(seqHSize));
+    SEQAN_ASSERT_LEQ(coordinate(matrixNavigator, +DPMatrixDimension_::VERTICAL), static_cast<TSize>(seqVSize));
+    typename TraceBitMap_<>::Type traceValue = scalarValue(matrixNavigator);
+    typename TraceBitMap_<>::Type lastTraceValue = _retrieveInitialTraceDirection(traceValue, dpProfile);
+    _computeTraceback(target, traceValue, lastTraceValue, matrixNavigator, seqHSize, seqVSize, band, dpProfile,
+                      TraceHead_<TAlgorithm>(), TraceTail_<TAlgorithm>());
 }
 
+// With sizes and dpScout.
 template <typename TTarget,
           typename TDPTraceMatrixNavigator,
           typename TDPCell, typename TScoutSpec,
-          typename TSizeH,
-          typename TSizeV,
+          typename TSeqHSize,
+          typename TSeqVSize,
           typename TBandFlag,
-          typename TAlgorithm,
-          typename TGapCosts,
-          typename TTracebackSpec>
-inline SEQAN_FUNC_DISABLE_IF(Is<ContainerConcept<TSizeH> >, void)
+          typename TAlgorithm, typename TGapCosts, typename TTracebackSpec, typename TExecPolicy>
+inline SEQAN_FUNC_DISABLE_IF(Is<ContainerConcept<TSeqHSize> >, void)
 _computeTraceback(TTarget & target,
                   TDPTraceMatrixNavigator & matrixNavigator,
                   DPScout_<TDPCell, TScoutSpec> const & dpScout,
-                  TSizeH const & seqHSize,
-                  TSizeV const & seqVSize,
+                  TSeqHSize const & seqHSize,
+                  TSeqVSize const & seqVSize,
                   DPBandConfig<TBandFlag> const & band,
-                  DPProfile_<TAlgorithm, TGapCosts, TTracebackSpec> const & dpProfile)
+                  DPProfile_<TAlgorithm, TGapCosts, TTracebackSpec, TExecPolicy> const & dpProfile)
 {
     _computeTraceback(target, matrixNavigator, maxHostPosition(dpScout), seqHSize, seqVSize, band, dpProfile);
 }
 
-template <typename TTarget, typename TDPTraceMatrixNavigator, typename TDPCell, typename TScoutSpec,
-          typename TSequenceH, typename TSequenceV, typename TBandFlag, typename TAlgorithm, typename TGapCosts,
-          typename TTracebackSpec>
+// With sequences and maxHostPosition.
+template <typename TTarget,
+          typename TDPTraceMatrixNavigator,
+          typename TSequenceH,
+          typename TSequenceV,
+          typename TBandFlag,
+          typename TAlgorithm, typename TGapCosts, typename TTracebackSpec, typename TExecPolicy>
+inline SEQAN_FUNC_ENABLE_IF(Is<ContainerConcept<TSequenceH> >, void)
+_computeTraceback(TTarget & target,
+                  TDPTraceMatrixNavigator & matrixNavigator,
+                  unsigned  maxHostPosition,
+                  TSequenceH const & seqH,
+                  TSequenceV const & seqV,
+                  DPBandConfig<TBandFlag> const & band,
+                  DPProfile_<TAlgorithm, TGapCosts, TTracebackSpec, TExecPolicy> const & dpProfile)
+{
+    _computeTraceback(target, matrixNavigator, maxHostPosition, length(seqH), length(seqV), band, dpProfile);
+}
+
+// With sequences and dpScout.
+template <typename TTarget,
+          typename TDPTraceMatrixNavigator,
+          typename TDPCell, typename TScoutSpec,
+          typename TSequenceH,
+          typename TSequenceV,
+          typename TBandFlag,
+          typename TAlgorithm, typename TGapCosts, typename TTracebackSpec, typename TExecPolicy>
 inline SEQAN_FUNC_ENABLE_IF(Is<ContainerConcept<TSequenceH> >, void)
 _computeTraceback(TTarget & target,
                   TDPTraceMatrixNavigator & matrixNavigator,
@@ -601,9 +628,9 @@ _computeTraceback(TTarget & target,
                   TSequenceH const & seqH,
                   TSequenceV const & seqV,
                   DPBandConfig<TBandFlag> const & band,
-                  DPProfile_<TAlgorithm, TGapCosts, TTracebackSpec> const & dpProfile)
+                  DPProfile_<TAlgorithm, TGapCosts, TTracebackSpec, TExecPolicy> const & dpProfile)
 {
-    _computeTraceback(target, matrixNavigator, maxHostPosition(dpScout), length(seqH), length(seqV), band, dpProfile);
+    _computeTraceback(target, matrixNavigator, maxHostPosition(dpScout), seqH, seqV, band, dpProfile);
 }
 
 }  // namespace seqan
diff --git a/include/seqan/align/evaluate_alignment.h b/include/seqan/align/evaluate_alignment.h
index e242f2e..5f7c486 100644
--- a/include/seqan/align/evaluate_alignment.h
+++ b/include/seqan/align/evaluate_alignment.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -316,8 +316,8 @@ TScoreVal computeAlignmentStats(AlignmentStats & stats,
     return computeAlignmentStats(stats, row(align, 0), row(align, 1), scoringScheme);
 }
 
-// NOTE(h-2): this interface is deprecated. Don't use it.
 template <typename TGaps, typename TAlignSpec, typename TScoreVal, typename TScoreSpec>
+[[deprecated("Use computeAlignmentStats(stats, align, scoringScheme) instead.")]]
 TScoreVal computeAlignmentStats(Align<TGaps, TAlignSpec> const & align,
                                 Score<TScoreVal, TScoreSpec> const & scoringScheme)
 {
diff --git a/include/seqan/align/fragment.h b/include/seqan/align/fragment.h
index de6ae1e..33cbcbc 100644
--- a/include/seqan/align/fragment.h
+++ b/include/seqan/align/fragment.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/align/gap_anchor.h b/include/seqan/align/gap_anchor.h
index 1a625fd..6c8d5cf 100644
--- a/include/seqan/align/gap_anchor.h
+++ b/include/seqan/align/gap_anchor.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/align/gapped_value_type.h b/include/seqan/align/gapped_value_type.h
index 855f1d3..3d8f41e 100644
--- a/include/seqan/align/gapped_value_type.h
+++ b/include/seqan/align/gapped_value_type.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/align/gaps_anchor.h b/include/seqan/align/gaps_anchor.h
index c75042d..5b65cf3 100644
--- a/include/seqan/align/gaps_anchor.h
+++ b/include/seqan/align/gaps_anchor.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -301,8 +301,8 @@ template <typename TSize, typename TSource, typename TGapAnchors>
 inline void
 _assignSourceLength(TSize & size, Gaps<TSource, AnchorGaps<TGapAnchors> > const & me)
 {
-    if (IsSameType<TSource, Nothing>::VALUE)
-        size = maxValue<TSize>() / 2;
+    SEQAN_IF_CONSTEXPR (IsSameType<TSource, Nothing>::VALUE)
+        size = std::numeric_limits<TSize>::max() / 2;
     else
         size = length(value(me.data_source));
 }
@@ -345,13 +345,13 @@ _getAnchor(TAnchor & anchor, Gaps<TSource, AnchorGaps<TGapAnchors> > const & me,
             {
                 // if there is no sequence but anchors -> assume infinite sequence
                 if (anchor.seqPos == 0)
-                    anchor.seqPos = maxValue(anchor.gapPos);
+                    anchor.seqPos = std::numeric_limits<decltype(anchor.gapPos)>::max();
                 // if the sequence has a length > 0, but there is an anchor behind the end
                 // -> elongate sequence
                 else if ((int64_t)anchor.seqPos < (int64_t)back(_dataAnchors(me)).seqPos)
                     anchor.seqPos = back(_dataAnchors(me)).seqPos;
             }
-            anchor.gapPos = maxValue(anchor.gapPos);
+            anchor.gapPos = std::numeric_limits<decltype(anchor.gapPos)>::max();
         }
     }
     else if (idx > 0)
@@ -362,7 +362,7 @@ _getAnchor(TAnchor & anchor, Gaps<TSource, AnchorGaps<TGapAnchors> > const & me,
         if (idx == 0)
             anchor.gapPos = 0;
         else
-            anchor.gapPos = minValue(anchor.gapPos);
+            anchor.gapPos = std::numeric_limits<decltype(anchor.gapPos)>::min();
     }
 }
 
diff --git a/include/seqan/align/gaps_array.h b/include/seqan/align/gaps_array.h
index 840cbbb..513c76d 100644
--- a/include/seqan/align/gaps_array.h
+++ b/include/seqan/align/gaps_array.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/align/gaps_base.h b/include/seqan/align/gaps_base.h
index e187688..d37be91 100644
--- a/include/seqan/align/gaps_base.h
+++ b/include/seqan/align/gaps_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -143,6 +143,12 @@ typedef Tag<RightOfViewPos_> RightOfViewPos;
 template <typename TSequence, typename TSpec = ArrayGaps>
 class Gaps;
 
+template <typename TSequence, typename TSpec>
+SEQAN_CONCEPT_IMPL((Gaps<TSequence, TSpec>), (AlignedSequenceConcept));
+
+template <typename TSequence, typename TSpec>
+SEQAN_CONCEPT_IMPL((Gaps<TSequence, TSpec> const), (AlignedSequenceConcept));
+
 // ============================================================================
 // Metafunctions
 // ============================================================================
@@ -455,7 +461,7 @@ bool isGap(Gaps<TSequence, TSpec> const & gaps, TPos clippedViewPos)
  * @fn Gaps#isCharacer
  * @brief Query positions in a Gaps object for being a character.
  *
- * @signature bool isGap(gaps, viewPos);
+ * @signature bool isCharacter(gaps, viewPos);
  *
  * @param[in] gaps    The Gaps object to query.
  * @param[in] viewPos The view position (including clipping and gaps).
diff --git a/include/seqan/align/gaps_iterator_anchor.h b/include/seqan/align/gaps_iterator_anchor.h
index 775af98..1591938 100644
--- a/include/seqan/align/gaps_iterator_anchor.h
+++ b/include/seqan/align/gaps_iterator_anchor.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -180,7 +180,7 @@ getValue(Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > & me)
     typedef typename Value<Iter<TGaps, GapsIterator<ArrayGaps> > >::Type TValue;
     if (isGap(me)) return gapValue<TValue>();
     else if (isUnknown(me)) return unknownValue<TValue>();
-    else return getValue(source(me));
+    else return *source(me);
 }
 
 template <typename TGaps, typename TGapAnchors>
@@ -190,7 +190,7 @@ getValue(Iter<TGaps, GapsIterator<AnchorGaps<TGapAnchors> > > const & me)
     typedef typename Value<Iter<TGaps, GapsIterator<ArrayGaps> > const>::Type TValue;
     if (isGap(me)) return gapValue<TValue>();
     else if (isUnknown(me)) return unknownValue<TValue>();
-    else return getValue(source(me));
+    else return *source(me);
 }
 
 // ----------------------------------------------------------------------------
diff --git a/include/seqan/align/gaps_iterator_array.h b/include/seqan/align/gaps_iterator_array.h
index b32de15..e2cf056 100644
--- a/include/seqan/align/gaps_iterator_array.h
+++ b/include/seqan/align/gaps_iterator_array.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/align/gaps_iterator_base.h b/include/seqan/align/gaps_iterator_base.h
index 097943d..5718728 100644
--- a/include/seqan/align/gaps_iterator_base.h
+++ b/include/seqan/align/gaps_iterator_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/align/global_alignment_banded.h b/include/seqan/align/global_alignment_banded.h
index eab33c6..7b7632f 100644
--- a/include/seqan/align/global_alignment_banded.h
+++ b/include/seqan/align/global_alignment_banded.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -399,13 +399,17 @@ template <typename TSequenceH,
           typename TScoreValue, typename TScoreSpec,
           bool TOP, bool LEFT, bool RIGHT, bool BOTTOM, typename TACSpec,
           typename TAlgoTag>
-TScoreValue globalAlignmentScore(TSequenceH const & seqH,
-                                 TSequenceV const & seqV,
-                                 Score<TScoreValue, TScoreSpec> const & scoringScheme,
-                                 AlignConfig<TOP, LEFT, RIGHT, BOTTOM, TACSpec> const & /*alignConfig*/,
-                                 int lowerDiag,
-                                 int upperDiag,
-                                 TAlgoTag const & /*algoTag*/)
+SEQAN_FUNC_DISABLE_IF(And<And<Is<ContainerConcept<TSequenceH>>, Is<ContainerConcept<typename Value<TSequenceH>::Type>>>,
+                          And<Is<ContainerConcept<TSequenceV>>, Is<ContainerConcept<typename Value<TSequenceH>::Type>>>
+                         >,
+                      TScoreValue)
+globalAlignmentScore(TSequenceH const & seqH,
+                     TSequenceV const & seqV,
+                     Score<TScoreValue, TScoreSpec> const & scoringScheme,
+                     AlignConfig<TOP, LEFT, RIGHT, BOTTOM, TACSpec> const & /*alignConfig*/,
+                     int lowerDiag,
+                     int upperDiag,
+                     TAlgoTag const & /*algoTag*/)
 {
     typedef AlignConfig<TOP, LEFT, RIGHT, BOTTOM, TACSpec> TAlignConfig;
     typedef typename SubstituteAlignConfig_<TAlignConfig>::Type TFreeEndGaps;
@@ -423,12 +427,12 @@ template <typename TSequenceH,
           typename TSequenceV,
           typename TScoreValue, typename TScoreSpec,
           typename TAlgoTag>
-TScoreValue globalAlignmentScore(TSequenceH const & seqH,
-                                 TSequenceV const & seqV,
-                                 Score<TScoreValue, TScoreSpec> const & scoringScheme,
-                                 int lowerDiag,
-                                 int upperDiag,
-                                 TAlgoTag const & algoTag)
+auto globalAlignmentScore(TSequenceH const & seqH,
+                          TSequenceV const & seqV,
+                          Score<TScoreValue, TScoreSpec> const & scoringScheme,
+                          int lowerDiag,
+                          int upperDiag,
+                          TAlgoTag const & algoTag)
 {
     AlignConfig<> alignConfig;
     return globalAlignmentScore(seqH, seqV, scoringScheme, alignConfig, lowerDiag, upperDiag, algoTag);
@@ -439,12 +443,12 @@ template <typename TSequenceH,
           typename TSequenceV,
           typename TScoreValue, typename TScoreSpec,
           bool TOP, bool LEFT, bool RIGHT, bool BOTTOM, typename TACSpec>
-TScoreValue globalAlignmentScore(TSequenceH const & seqH,
-                                 TSequenceV const & seqV,
-                                 Score<TScoreValue, TScoreSpec> const & scoringScheme,
-                                 AlignConfig<TOP, LEFT, RIGHT, BOTTOM, TACSpec> const & alignConfig,
-                                 int lowerDiag,
-                                 int upperDiag)
+auto globalAlignmentScore(TSequenceH const & seqH,
+                          TSequenceV const & seqV,
+                          Score<TScoreValue, TScoreSpec> const & scoringScheme,
+                          AlignConfig<TOP, LEFT, RIGHT, BOTTOM, TACSpec> const & alignConfig,
+                          int lowerDiag,
+                          int upperDiag)
 {
     if (scoreGapOpen(scoringScheme) == scoreGapExtend(scoringScheme))
         return globalAlignmentScore(seqH, seqV, scoringScheme, alignConfig, lowerDiag, upperDiag, NeedlemanWunsch());
@@ -456,11 +460,11 @@ TScoreValue globalAlignmentScore(TSequenceH const & seqH,
 template <typename TSequenceH,
           typename TSequenceV,
           typename TScoreValue, typename TScoreSpec>
-TScoreValue globalAlignmentScore(TSequenceH const & seqH,
-                                 TSequenceV const & seqV,
-                                 Score<TScoreValue, TScoreSpec> const & scoringScheme,
-                                 int lowerDiag,
-                                 int upperDiag)
+auto globalAlignmentScore(TSequenceH const & seqH,
+                          TSequenceV const & seqV,
+                          Score<TScoreValue, TScoreSpec> const & scoringScheme,
+                          int lowerDiag,
+                          int upperDiag)
 {
     AlignConfig<> alignConfig;
     return globalAlignmentScore(seqH, seqV, scoringScheme, alignConfig, lowerDiag, upperDiag);
@@ -551,17 +555,22 @@ TScoreValue globalAlignmentScore(StringSet<TString, TSpec> const & strings,
 // Function globalAlignmentScore()         [banded, SIMD version, 2x StringSet]
 // ----------------------------------------------------------------------------
 
-template <typename TString, typename TSpec,
+template <typename TSeqH,
+          typename TSeqV,
           typename TScoreValue, typename TScoreSpec,
           bool TOP, bool LEFT, bool RIGHT, bool BOTTOM, typename TACSpec,
           typename TAlgoTag>
-String<TScoreValue> globalAlignmentScore(StringSet<TString, TSpec> const & stringsH,
-                                         StringSet<TString, TSpec> const & stringsV,
-                                         Score<TScoreValue, TScoreSpec> const & scoringScheme,
-                                         AlignConfig<TOP, LEFT, RIGHT, BOTTOM, TACSpec> const & /*alignConfig*/,
-                                         int lowerDiag,
-                                         int upperDiag,
-                                         TAlgoTag const & /*algoTag*/)
+SEQAN_FUNC_ENABLE_IF(And<And<Is<ContainerConcept<TSeqH>>, Is<ContainerConcept<typename Value<TSeqH>::Type>>>,
+                         And<Is<ContainerConcept<TSeqV>>, Is<ContainerConcept<typename Value<TSeqV>::Type>>>
+                        >,
+                     String<TScoreValue>)
+globalAlignmentScore(TSeqH const & stringsH,
+                     TSeqV const & stringsV,
+                     Score<TScoreValue, TScoreSpec> const & scoringScheme,
+                     AlignConfig<TOP, LEFT, RIGHT, BOTTOM, TACSpec> const & /*alignConfig*/,
+                     int lowerDiag,
+                     int upperDiag,
+                     TAlgoTag const & /*algoTag*/)
 {
     typedef AlignConfig<TOP, LEFT, RIGHT, BOTTOM, TACSpec> TAlignConfig;
     typedef typename SubstituteAlignConfig_<TAlignConfig>::Type TFreeEndGaps;
@@ -572,51 +581,6 @@ String<TScoreValue> globalAlignmentScore(StringSet<TString, TSpec> const & strin
     return _alignWrapper(stringsH, stringsV, scoringScheme, TAlignConfig2(lowerDiag, upperDiag), TGapModel());
 }
 
-// Interface without AlignConfig<>.
-template <typename TString, typename TSpec,
-          typename TScoreValue, typename TScoreSpec,
-          typename TAlgoTag>
-String<TScoreValue> globalAlignmentScore(StringSet<TString, TSpec> const & stringsH,
-                                         StringSet<TString, TSpec> const & stringsV,
-                                         Score<TScoreValue, TScoreSpec> const & scoringScheme,
-                                         int lowerDiag,
-                                         int upperDiag,
-                                         TAlgoTag const & algoTag)
-{
-    AlignConfig<> alignConfig;
-    return globalAlignmentScore(stringsH, stringsV, scoringScheme, alignConfig, lowerDiag, upperDiag, algoTag);
-}
-
-// Interface without algorithm tag.
-template <typename TString, typename TSpec,
-          typename TScoreValue, typename TScoreSpec,
-          bool TOP, bool LEFT, bool RIGHT, bool BOTTOM, typename TACSpec>
-String<TScoreValue> globalAlignmentScore(StringSet<TString, TSpec> const & stringsH,
-                                         StringSet<TString, TSpec> const & stringsV,
-                                         Score<TScoreValue, TScoreSpec> const & scoringScheme,
-                                         AlignConfig<TOP, LEFT, RIGHT, BOTTOM, TACSpec> const & alignConfig,
-                                         int lowerDiag,
-                                         int upperDiag)
-{
-    if (scoreGapOpen(scoringScheme) == scoreGapExtend(scoringScheme))
-        return globalAlignmentScore(stringsH, stringsV, scoringScheme, alignConfig, lowerDiag, upperDiag, NeedlemanWunsch());
-    else
-        return globalAlignmentScore(stringsH, stringsV, scoringScheme, alignConfig, lowerDiag, upperDiag, Gotoh());
-}
-
-// Interface without AlignConfig<> and algorithm tag.
-template <typename TString, typename TSpec,
-          typename TScoreValue, typename TScoreSpec>
-String<TScoreValue> globalAlignmentScore(StringSet<TString, TSpec> const & stringsH,
-                                         StringSet<TString, TSpec> const & stringsV,
-                                         Score<TScoreValue, TScoreSpec> const & scoringScheme,
-                                         int lowerDiag,
-                                         int upperDiag)
-{
-    AlignConfig<> alignConfig;
-    return globalAlignmentScore(stringsH, stringsV, scoringScheme, alignConfig, lowerDiag, upperDiag);
-}
-
 // ----------------------------------------------------------------------------
 // Function globalAlignmentScore()   [banded, SIMD version, String vs StringSet]
 // ----------------------------------------------------------------------------
diff --git a/include/seqan/align/global_alignment_hirschberg_impl.h b/include/seqan/align/global_alignment_hirschberg_impl.h
index 0497f7d..ab360bb 100644
--- a/include/seqan/align/global_alignment_hirschberg_impl.h
+++ b/include/seqan/align/global_alignment_hirschberg_impl.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/align/global_alignment_myers_hirschberg_impl.h b/include/seqan/align/global_alignment_myers_hirschberg_impl.h
index 24e67ec..31955f6 100644
--- a/include/seqan/align/global_alignment_myers_hirschberg_impl.h
+++ b/include/seqan/align/global_alignment_myers_hirschberg_impl.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -257,7 +257,7 @@ _globalAlignment(Gaps<TSequenceH, TGapsSpecH> & gapsH,
     String<unsigned> forwardBitMask;
     String<unsigned> reverseBitMask;
 
-    resize(VP, blockCount, maxValue<unsigned>());
+    resize(VP, blockCount, std::numeric_limits<unsigned>::max());
     resize(VN, blockCount, 0);
 
     // first bitMask will be constructed from the shorter sequence
@@ -512,7 +512,7 @@ _globalAlignment(Gaps<TSequenceH, TGapsSpecH> & gapsH,
             fSilencer <<= fOffSet;
 
             /* reset v-bitvectors */
-            std::fill(begin(VP, Standard()) + fStartBlock, begin(VP, Standard()) + fEndBlock + 1, maxValue<unsigned>());
+            std::fill(begin(VP, Standard()) + fStartBlock, begin(VP, Standard()) + fEndBlock + 1, std::numeric_limits<unsigned>::max());
             std::fill(begin(VN, Standard()) + fStartBlock, begin(VN, Standard()) + fEndBlock + 1, 0);
 
             /* determine start-position and start-score */
@@ -622,7 +622,7 @@ _globalAlignment(Gaps<TSequenceH, TGapsSpecH> & gapsH,
             rSilencer <<= rOffSet;
 
             /* reset v-bitvectors */
-            std::fill(begin(VP, Standard()) + rStartBlock, begin(VP, Standard()) + rEndBlock + 1, maxValue<unsigned>());
+            std::fill(begin(VP, Standard()) + rStartBlock, begin(VP, Standard()) + rEndBlock + 1, std::numeric_limits<unsigned>::max());
             std::fill(begin(VN, Standard()) + rStartBlock, begin(VN, Standard()) + rEndBlock + 1, 0);
 
             /* determine start-position and start-score */
diff --git a/include/seqan/align/global_alignment_myers_impl.h b/include/seqan/align/global_alignment_myers_impl.h
index 8082f3b..c6f0073 100644
--- a/include/seqan/align/global_alignment_myers_impl.h
+++ b/include/seqan/align/global_alignment_myers_impl.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -94,7 +94,7 @@ _globalAlignmentScore(String<TAlphabetH, TSpecH> const & seqH,
     unsigned int scoreMask = 1 << ((len_y % BLOCK_SIZE) - 1);    // the mask with a bit set at the position of the last active cell
 
     String<unsigned> VP;
-    resize(VP, blockCount, maxValue<unsigned>());
+    resize(VP, blockCount, std::numeric_limits<unsigned>::max());
     String<unsigned> VN;
     resize(VN, blockCount, 0);
     String<unsigned> bitMask;
diff --git a/include/seqan/align/global_alignment_specialized.h b/include/seqan/align/global_alignment_specialized.h
index 1fa2a4d..ac0139e 100644
--- a/include/seqan/align/global_alignment_specialized.h
+++ b/include/seqan/align/global_alignment_specialized.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/align/global_alignment_unbanded.h b/include/seqan/align/global_alignment_unbanded.h
index a58c539..8032898 100644
--- a/include/seqan/align/global_alignment_unbanded.h
+++ b/include/seqan/align/global_alignment_unbanded.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -457,13 +457,14 @@ TScoreValue globalAlignment(String<Fragment<TSize, TFragmentSpec>, TStringSpec>
  * @headerfile <seqan/align.h>
  * @brief Computes the best global pairwise alignment score.
  *
- * @signature TScoreVal globalAlignmentScore(seqH, seqV, scoringScheme[, alignConfig][, lowerDiag, upperDiag][, algorithmTag]);
+ * @signature TScoreVal globalAlignmentScore([exec,] subject, query, scoringScheme[, alignConfig][, lowerDiag, upperDiag]);
  * @signature TScoreVal globalAlignmentScore(strings,    scoringScheme[, alignConfig][, lowerDiag, upperDiag][, algorithmTag]);
  * @signature TScoreVal globalAlignmentScore(seqH, seqV, {MyersBitVector | MyersHirschberg});
  * @signature TScoreVal globalAlignmentScore(strings,    {MyersBitVector | MyersHirschberg});
  *
- * @param[in] seqH          Horizontal gapped sequence in alignment matrix.  Types: String
- * @param[in] seqV          Vertical gapped sequence in alignment matrix.  Types: String
+ * @param[in] exec          @link ExecutionPolicy Policy at endlink to select execution mode of alignment algorithm.
+ * @param[in] subject       Subject sequence(s) (horizontal in alignment matrix). Must satisfy @link ContainerConcept @endlink or container-of-container concept.
+ * @param[in] query         Query sequence(s) (vertical in alignment matrix). Must satisfy @link ContainerConcept @endlink or container-of-container concept.
  * @param[in] strings       A @link StringSet @endlink containing two sequences.  Type: StringSet.
  * @param[in] alignConfig   The @link AlignConfig @endlink to use for the alignment.  Type: AlignConfig
  * @param[in] scoringScheme The scoring scheme to use for the alignment.  Note that the user is responsible for ensuring
@@ -474,17 +475,36 @@ TScoreValue globalAlignment(String<Fragment<TSize, TFragmentSpec>, TStringSpec>
  *                          @endlink.
  *
  * @return TScoreVal   Score value of the resulting alignment  (Metafunction: @link Score#Value @endlink of
- *                     the type of <tt>scoringScheme</tt>).
+ *                     the type of <tt>scoringScheme</tt>). If subject and query are sets the function returns a
+ *                     set of scores representing the score for each pairwise alignment (<tt>subject[i]</tt> with <tt>query[i]</tt>).
  *
  * This function does not perform the (linear time) traceback step after the (mostly quadratic time) dynamic programming
  * step.  Note that Myers' bit-vector algorithm does not compute an alignment (only in the Myers-Hirschberg variant) but
  * scores can be computed using <tt>globalAlignmentScore</tt>.
+ * Global alignment score can be either used with two sequences or two sets of sequences of equal size.
  *
  * The same limitations to algorithms as in @link globalAlignment @endlink apply.  Furthermore, the
  * <tt>MyersBitVector</tt> and <tt>MyersHirschberg</tt> variants can only be used without any other parameter.
  *
+ * @section Parallel execution
+ *
+ * Some of the global alingment score functions are parallelized and vectorized and work on sets of sequences.
+ * The parallelization mode can be selected via the @link ExecutionPolicy @endlink as first argument.
+ * Following execution modes are possible: <i>sequential</i>, <i>parallel</i>, <i>wave-front</i>, <i>vectorized</i>,
+ * <i>parallel+vectorized</i> and <i>wave-front+vectorized</i>.
+ *
+ * The wave-front execution can be selected via the @link WavefrontExecutionPolicy @endlink, which can also be combined
+ * with a vectorized execution. In addition the wave-front execution parallelizes a single pairwise alignment, while the
+ * standard @link ParallelismTags#Parallel @endlink specialization does only parallelizes the sequence set via chunking.
+ * Note, the banded version is at the moment only supported for the following execution modes: <i>sequential</i>,
+ * <i>parallel</i>, <i>vectorized</i> and <i>parallel+vectorized</i>. At the moment the vectorized version only works
+ * reliable if all subject sequences and respectively all query sequences have the same length.
+ *
  * @see https://seqan.readthedocs.io/en/develop/Tutorial/Algorithms/Alignment/PairwiseSequenceAlignment.html
  * @see globalAlignment
+ *
+ * @datarace thread-safe. No shared state is modified during the execution and concurrent invocations of this function
+ * on the same data does not cause any race conditions.
  */
 
 // ----------------------------------------------------------------------------
@@ -496,11 +516,15 @@ template <typename TSequenceH,
           typename TScoreValue, typename TScoreSpec,
           bool TOP, bool LEFT, bool RIGHT, bool BOTTOM, typename TACSpec,
           typename TAlgoTag>
-TScoreValue globalAlignmentScore(TSequenceH const & seqH,
-                                 TSequenceV const & seqV,
-                                 Score<TScoreValue, TScoreSpec> const & scoringScheme,
-                                 AlignConfig<TOP, LEFT, RIGHT, BOTTOM, TACSpec> const & /*alignConfig*/,
-                                 TAlgoTag const & /*algoTag*/)
+SEQAN_FUNC_DISABLE_IF(And<And<Is<ContainerConcept<TSequenceH>>, Is<ContainerConcept<typename Value<TSequenceH>::Type>>>,
+                          And<Is<ContainerConcept<TSequenceV>>, Is<ContainerConcept<typename Value<TSequenceV>::Type>>>
+                         >,
+                      TScoreValue)
+globalAlignmentScore(TSequenceH const & seqH,
+                     TSequenceV const & seqV,
+                     Score<TScoreValue, TScoreSpec> const & scoringScheme,
+                     AlignConfig<TOP, LEFT, RIGHT, BOTTOM, TACSpec> const & /*alignConfig*/,
+                     TAlgoTag const & /*algoTag*/)
 {
     typedef AlignConfig<TOP, LEFT, RIGHT, BOTTOM, TACSpec> TAlignConfig;
     typedef typename SubstituteAlignConfig_<TAlignConfig>::Type TFreeEndGaps;
@@ -517,7 +541,7 @@ template <typename TSequenceH,
           typename TSequenceV,
           typename TScoreValue, typename TScoreSpec,
           typename TAlgoTag>
-TScoreValue globalAlignmentScore(TSequenceH const & seqH,
+auto globalAlignmentScore(TSequenceH const & seqH,
                                  TSequenceV const & seqV,
                                  Score<TScoreValue, TScoreSpec> const & scoringScheme,
                                  TAlgoTag const & algoTag)
@@ -531,7 +555,7 @@ template <typename TSequenceH,
           typename TSequenceV,
           typename TScoreValue, typename TScoreSpec,
           bool TOP, bool LEFT, bool RIGHT, bool BOTTOM, typename TACSpec>
-TScoreValue globalAlignmentScore(TSequenceH const & seqH,
+auto globalAlignmentScore(TSequenceH const & seqH,
                                  TSequenceV const & seqV,
                                  Score<TScoreValue, TScoreSpec> const & scoringScheme,
                                  AlignConfig<TOP, LEFT, RIGHT, BOTTOM, TACSpec> const & alignConfig)
@@ -546,7 +570,7 @@ TScoreValue globalAlignmentScore(TSequenceH const & seqH,
 template <typename TSequenceH,
           typename TSequenceV,
           typename TScoreValue, typename TScoreSpec>
-TScoreValue globalAlignmentScore(TSequenceH const & seqH,
+auto globalAlignmentScore(TSequenceH const & seqH,
                                  TSequenceV const & seqV,
                                  Score<TScoreValue, TScoreSpec> const & scoringScheme)
 {
@@ -626,15 +650,20 @@ TScoreValue globalAlignmentScore(StringSet<TString, TSpec> const & strings,
 // Function globalAlignmentScore()       [unbanded, SIMD version, 2x StringSet]
 // ----------------------------------------------------------------------------
 
-template <typename TString1, typename TString2, typename TSpec,
+template <typename TSeqH,
+          typename TSeqV,
           typename TScoreValue, typename TScoreSpec,
           bool TOP, bool LEFT, bool RIGHT, bool BOTTOM, typename TACSpec,
           typename TAlgoTag>
-String<TScoreValue> globalAlignmentScore(StringSet<TString1, TSpec> const & stringsH,
-                                         StringSet<TString2, TSpec> const & stringsV,
-                                         Score<TScoreValue, TScoreSpec> const & scoringScheme,
-                                         AlignConfig<TOP, LEFT, RIGHT, BOTTOM, TACSpec> const & /*alignConfig*/,
-                                         TAlgoTag const & /*algoTag*/)
+SEQAN_FUNC_ENABLE_IF(And<And<Is<ContainerConcept<TSeqH>>, Is<ContainerConcept<typename Value<TSeqH>::Type>>>,
+                         And<Is<ContainerConcept<TSeqV>>, Is<ContainerConcept<typename Value<TSeqV>::Type>>>
+                        >,
+                    String<TScoreValue>)
+globalAlignmentScore(TSeqH const & stringsH,
+                     TSeqV const & stringsV,
+                     Score<TScoreValue, TScoreSpec> const & scoringScheme,
+                     AlignConfig<TOP, LEFT, RIGHT, BOTTOM, TACSpec> const & /*alignConfig*/,
+                     TAlgoTag const & /*algoTag*/)
 {
     SEQAN_ASSERT_EQ(length(stringsH), length(stringsV));
     typedef AlignConfig<TOP, LEFT, RIGHT, BOTTOM, TACSpec> TAlignConfig;
@@ -645,45 +674,6 @@ String<TScoreValue> globalAlignmentScore(StringSet<TString1, TSpec> const & stri
     return _alignWrapper(stringsH, stringsV, scoringScheme, TAlignConfig2(), TGapModel());
 }
 
-// Interface without AlignConfig<>.
-template <typename TString1, typename TString2, typename TSpec,
-          typename TScoreValue, typename TScoreSpec,
-          typename TAlgoTag>
-String<TScoreValue> globalAlignmentScore(StringSet<TString1, TSpec> const & stringsH,
-                                         StringSet<TString2, TSpec> const & stringsV,
-                                         Score<TScoreValue, TScoreSpec> const & scoringScheme,
-                                         TAlgoTag const & algoTag)
-{
-    AlignConfig<> alignConfig;
-    return globalAlignmentScore(stringsH, stringsV, scoringScheme, alignConfig, algoTag);
-}
-
-// Interface without algorithm tag.
-template <typename TString1, typename TString2, typename TSpec,
-          typename TScoreValue, typename TScoreSpec,
-          bool TOP, bool LEFT, bool RIGHT, bool BOTTOM, typename TACSpec>
-String<TScoreValue> globalAlignmentScore(StringSet<TString1, TSpec> const & stringsH,
-                                         StringSet<TString2, TSpec> const & stringsV,
-                                         Score<TScoreValue, TScoreSpec> const & scoringScheme,
-                                         AlignConfig<TOP, LEFT, RIGHT, BOTTOM, TACSpec> const & alignConfig)
-{
-    if (scoreGapOpen(scoringScheme) == scoreGapExtend(scoringScheme))
-        return globalAlignmentScore(stringsH, stringsV, scoringScheme, alignConfig, NeedlemanWunsch());
-    else
-        return globalAlignmentScore(stringsH, stringsV, scoringScheme, alignConfig, Gotoh());
-}
-
-// Interface without AlignConfig<> and algorithm tag.
-template <typename TString1, typename TString2, typename TSpec,
-          typename TScoreValue, typename TScoreSpec>
-String<TScoreValue> globalAlignmentScore(StringSet<TString1, TSpec> const & stringsH,
-                                         StringSet<TString2, TSpec> const & stringsV,
-                                         Score<TScoreValue, TScoreSpec> const & scoringScheme)
-{
-    AlignConfig<> alignConfig;
-    return globalAlignmentScore(stringsH, stringsV, scoringScheme, alignConfig);
-}
-
 // --------------------------------------------------------------------------------
 // Function globalAlignmentScore()    [unbanded, SIMD version, String vs StringSet]
 // --------------------------------------------------------------------------------
@@ -755,7 +745,7 @@ String<TScoreValue> globalAlignmentScore(TString1 const & stringH,
 template <typename TSequenceH, typename TGapsSpecH, typename TSetSpecH,
           typename TSequenceV, typename TGapsSpecV, typename TSetSpecV,
           typename TScoreValue, typename TScoreSpec,
-          bool TOP, bool LEFT, bool RIGHT, bool BOTTOM, typename TACSpec, 
+          bool TOP, bool LEFT, bool RIGHT, bool BOTTOM, typename TACSpec,
           typename TAlgoTag>
 inline auto
 globalAlignment(StringSet<Gaps<TSequenceH, TGapsSpecH>, TSetSpecH> & gapSeqSetH,
@@ -772,6 +762,34 @@ globalAlignment(StringSet<Gaps<TSequenceH, TGapsSpecH>, TSetSpecH> & gapSeqSetH,
     return _alignWrapper(gapSeqSetH, gapSeqSetV, scoringScheme, TAlignConfig2(), TGapModel());
 }
 
+// Interface without algorithm tag.
+template <typename TSequenceH, typename TGapsSpecH, typename TSetSpecH,
+          typename TSequenceV, typename TGapsSpecV, typename TSetSpecV,
+          typename TScoreValue, typename TScoreSpec,
+          bool TOP, bool LEFT, bool RIGHT, bool BOTTOM, typename TACSpec>
+String<TScoreValue> globalAlignment(StringSet<Gaps<TSequenceH, TGapsSpecH>, TSetSpecH> & gapSeqSetH,
+                                    StringSet<Gaps<TSequenceV, TGapsSpecV>, TSetSpecV> & gapSeqSetV,
+                                    Score<TScoreValue, TScoreSpec> const & scoringScheme,
+                                    AlignConfig<TOP, LEFT, RIGHT, BOTTOM, TACSpec> const & alignConfig)
+{
+    if (scoreGapOpen(scoringScheme) == scoreGapExtend(scoringScheme))
+        return globalAlignment(gapSeqSetH, gapSeqSetV, scoringScheme, alignConfig, NeedlemanWunsch());
+    else
+        return globalAlignment(gapSeqSetH, gapSeqSetV, scoringScheme, alignConfig, Gotoh());
+}
+
+// Interface without AlignConfig<> and algorithm tag.
+template <typename TSequenceH, typename TGapsSpecH, typename TSetSpecH,
+          typename TSequenceV, typename TGapsSpecV, typename TSetSpecV,
+          typename TScoreValue, typename TScoreSpec>
+String<TScoreValue> globalAlignment(StringSet<Gaps<TSequenceH, TGapsSpecH>, TSetSpecH> & gapSeqSetH,
+                                    StringSet<Gaps<TSequenceV, TGapsSpecV>, TSetSpecV> & gapSeqSetV,
+                                    Score<TScoreValue, TScoreSpec> const & scoringScheme)
+{
+    AlignConfig<> alignConfig;
+    return globalAlignment(gapSeqSetH, gapSeqSetV, scoringScheme, alignConfig);
+}
+
 // ----------------------------------------------------------------------------
 // Function globalAlignment()        [unbanded, SIMD version, StringSet<Align>]
 // ----------------------------------------------------------------------------
diff --git a/include/seqan/align/local_alignment_banded.h b/include/seqan/align/local_alignment_banded.h
index 8edcfd5..857f9b3 100644
--- a/include/seqan/align/local_alignment_banded.h
+++ b/include/seqan/align/local_alignment_banded.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -271,13 +271,13 @@ localAlignment(StringSet<Align<TSequence, TAlignSpec>, TSetSpec> & alignSet,
     StringSet<TGapSequence, Dependent<> > gapSetV;
     reserve(gapSetH, length(alignSet));
     reserve(gapSetV, length(alignSet));
-    
+
     for (auto & align : alignSet)
     {
         appendValue(gapSetH, row(align, 0));
         appendValue(gapSetV, row(align, 1));
     }
-    
+
     return localAlignment(gapSetH, gapSetV, scoringScheme, lowerDiag, upperDiag, algoTag);
 }
 
@@ -293,6 +293,75 @@ String<TScoreValue> localAlignment(StringSet<Align<TSequence, TAlignSpec> > & al
         return localAlignment(align, scoringScheme, lowerDiag, upperDiag, LinearGaps());
 }
 
+// ----------------------------------------------------------------------------
+// Function localAlignmentScore()                  [banded, no-simd, TSequence]
+// ----------------------------------------------------------------------------
+
+template <typename TSequenceH,
+          typename TSequenceV,
+          typename TScoreValue, typename TScoreSpec,
+          typename TAlgoTag>
+SEQAN_FUNC_DISABLE_IF(And<And<Is<ContainerConcept<TSequenceH>>, Is<ContainerConcept<typename Value<TSequenceH>::Type>>>,
+                          And<Is<ContainerConcept<TSequenceV>>, Is<ContainerConcept<typename Value<TSequenceV>::Type>>>
+                         >, TScoreValue)
+localAlignmentScore(TSequenceH const & seqH,
+                    TSequenceV const & seqV,
+                    Score<TScoreValue, TScoreSpec> const & scoringScheme,
+                    int const lowerDiag,
+                    int const upperDiag,
+                    TAlgoTag const & /*algoTag*/)
+{
+    typedef AlignConfig2<DPLocal, DPBandConfig<BandOn>, FreeEndGaps_<>, TracebackOff> TAlignConfig2;
+    typedef typename SubstituteAlgoTag_<TAlgoTag>::Type TGapModel;
+
+    DPScoutState_<Default> dpScoutState;
+    String<TraceSegment_<unsigned, unsigned> > traceSegments;  // Dummy segments.
+    return _setUpAndRunAlignment(traceSegments, dpScoutState, seqH, seqV, scoringScheme,
+                                 TAlignConfig2{lowerDiag, upperDiag}, TGapModel{});
+}
+
+// ----------------------------------------------------------------------------
+// Function localAlignmentScore()                     [banded, Simd, TSequence]
+// ----------------------------------------------------------------------------
+
+template <typename TSeqH,
+          typename TSeqV,
+          typename TScoreValue, typename TScoreSpec,
+          typename TAlgoTag>
+inline
+SEQAN_FUNC_ENABLE_IF(And<And<Is<ContainerConcept<TSeqH>>, Is<ContainerConcept<typename Value<TSeqH>::Type>>>,
+                         And<Is<ContainerConcept<TSeqV>>, Is<ContainerConcept<typename Value<TSeqV>::Type>>>
+                        >, String<TScoreValue>)
+localAlignmentScore(TSeqH const & stringsH,
+                    TSeqV const & stringsV,
+                    Score<TScoreValue, TScoreSpec> const & scoringScheme,
+                    int const lowerDiag,
+                    int const upperDiag,
+                    TAlgoTag const & /*algoTag*/)
+{
+    typedef AlignConfig2<DPLocal, DPBandConfig<BandOn>, FreeEndGaps_<>, TracebackOff> TAlignConfig2;
+    typedef typename SubstituteAlgoTag_<TAlgoTag>::Type TGapModel;
+
+    SEQAN_ASSERT_EQ(length(stringsH), length(stringsV));
+    return _alignWrapper(stringsH, stringsV, scoringScheme, TAlignConfig2{lowerDiag, upperDiag}, TGapModel());
+}
+
+// Interface without algorithm tag.
+template <typename TSequenceH,
+          typename TSequenceV,
+          typename TScoreValue, typename TScoreSpec>
+auto localAlignmentScore(TSequenceH const & seqH,
+                         TSequenceV const & seqV,
+                         Score<TScoreValue, TScoreSpec> const & scoringScheme,
+                         int const lowerDiag,
+                         int const upperDiag)
+{
+    if (scoreGapOpen(scoringScheme) == scoreGapExtend(scoringScheme))
+        return localAlignmentScore(seqH, seqV, scoringScheme, lowerDiag, upperDiag, NeedlemanWunsch());
+    else
+        return localAlignmentScore(seqH, seqV, scoringScheme, lowerDiag, upperDiag, Gotoh());
+}
+
 }  // namespace seqan
 
 #endif  // #ifndef SEQAN_INCLUDE_SEQAN_ALIGN_LOCAL_ALIGNMENT_BANDED_H_
diff --git a/include/seqan/align/local_alignment_banded_waterman_eggert_impl.h b/include/seqan/align/local_alignment_banded_waterman_eggert_impl.h
index 3f42d50..c59ff28 100644
--- a/include/seqan/align/local_alignment_banded_waterman_eggert_impl.h
+++ b/include/seqan/align/local_alignment_banded_waterman_eggert_impl.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -498,8 +498,8 @@ _initLocalAlignmentFinder(TSequenceH const & seqH,
 
     resize(finder.forbidden, height * diagonalWidth, false);
 
-    finder.bestEndPos = minValue<typename TFinder::TMatrixPosition>();
-    finder.bestBeginPos = minValue<typename TFinder::TMatrixPosition>();
+    finder.bestEndPos = std::numeric_limits<typename TFinder::TMatrixPosition>::min();
+    finder.bestBeginPos = std::numeric_limits<typename TFinder::TMatrixPosition>::min();
 }
 
 // ----------------------------------------------------------------------------
diff --git a/include/seqan/align/local_alignment_enumeration.h b/include/seqan/align/local_alignment_enumeration.h
index 0dd6946..81d7802 100644
--- a/include/seqan/align/local_alignment_enumeration.h
+++ b/include/seqan/align/local_alignment_enumeration.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/align/local_alignment_enumeration_banded.h b/include/seqan/align/local_alignment_enumeration_banded.h
index 4172d79..0ca025f 100644
--- a/include/seqan/align/local_alignment_enumeration_banded.h
+++ b/include/seqan/align/local_alignment_enumeration_banded.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/align/local_alignment_enumeration_unbanded.h b/include/seqan/align/local_alignment_enumeration_unbanded.h
index a5efcb8..978320b 100644
--- a/include/seqan/align/local_alignment_enumeration_unbanded.h
+++ b/include/seqan/align/local_alignment_enumeration_unbanded.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/align/local_alignment_unbanded.h b/include/seqan/align/local_alignment_unbanded.h
index a6a920f..24c2036 100644
--- a/include/seqan/align/local_alignment_unbanded.h
+++ b/include/seqan/align/local_alignment_unbanded.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -355,13 +355,13 @@ localAlignment(StringSet<Align<TSequence, TAlignSpec> > & alignSet,
     StringSet<TGapSequence, Dependent<> > gapSetV;
     reserve(gapSetH, length(alignSet));
     reserve(gapSetV, length(alignSet));
-    
+
     for (auto & align : alignSet)
     {
         appendValue(gapSetH, row(align, 0));
         appendValue(gapSetV, row(align, 1));
     }
-    
+
     return localAlignment(gapSetH, gapSetV, scoringScheme, algoTag);
 }
 
@@ -376,6 +376,111 @@ String<TScoreValue> localAlignment(StringSet<Align<TSequence, TAlignSpec> > & al
         return localAlignment(align, scoringScheme, LinearGaps());
 }
 
+// ----------------------------------------------------------------------------
+// Function localAlignmentScore()                         [unbanded, TSequence]
+// ----------------------------------------------------------------------------
+
+/*!
+ * @fn localAlignmentScore
+ * @headerfile <seqan/align.h>
+ * @brief Computes the best global pairwise alignment score.
+ *
+ * @signature TScoreVal localAlignmentScore([exec,] subject, query, scoringScheme[, lowerDiag, upperDiag]);
+ *
+ * @param[in] exec          @link ExecutionPolicy Policy at endlink to select execution mode of alignment algorithm.
+ * @param[in] subject       Subject sequence(s) (horizontal in alignment matrix). Must satisfy @link ContainerConcept @endlink or container-of-container concept.
+ * @param[in] query         Query sequence(s) (vertical in alignment matrix). Must satisfy @link ContainerConcept @endlink or container-of-container concept.
+ * @param[in] scoringScheme The scoring scheme to use for the alignment.  Note that the user is responsible for ensuring
+ *                          that the scoring scheme is compatible with <tt>algorithmTag</tt>.  Type: @link Score @endlink.
+ * @param[in] lowerDiag     Optional lower diagonal.  Types: <tt>int</tt>
+ * @param[in] upperDiag     Optional upper diagonal.  Types: <tt>int</tt>
+ *
+ * @return TScoreVal   Score value of the resulting alignment  (Metafunction: @link Score#Value @endlink of
+ *                     the type of <tt>scoringScheme</tt>). If subject and query are sets the function returns a
+ *                     set of scores representing the score for each pairwise alignment (<tt>subject[i]</tt> with <tt>query[i]</tt>).
+ *
+ * This function does not perform the (linear time) traceback step after the (mostly quadratic time) dynamic programming
+ * step. Local alignment score can be either used with two sequences or two sets of sequences of equal size.
+ *
+ * @section Parallel execution
+ *
+ * Some of the local alingment score functions are parallelized and vectorized.
+ * The parallelization mode can be selected via the @link ExecutionPolicy @endlink as first argument.
+ * Following execution modes are possible: <i>sequential</i>, <i>parallel</i>, <i>wave-front</i>, <i>vectorized</i>,
+ * <i>parallel+vectorized</i> and <i>wave-front+vectorized</i>.
+ *
+ * The wave-front execution can be selected via the @link WavefrontExecutionPolicy @endlink, which can also be combined
+ * with a vectorized execution. In addition the wave-front execution parallelizes a single pairwise alignment, while the
+ * standard @link ParallelismTags#Parallel @endlink specialization does only parallelizes the sequence set via chunking.
+ * Note, the banded version is at the moment only supported for the following execution modes: <i>sequential</i>,
+ * <i>parallel</i>, <i>vectorized</i> and <i>parallel+vectorized</i>. At the moment the vectorized version only works
+ * reliable if all subject sequences and respectively all query sequences have the same length.
+ *
+ * @see https://seqan.readthedocs.io/en/develop/Tutorial/Algorithms/Alignment/PairwiseSequenceAlignment.html
+ * @see localAlignment
+ *
+ * @datarace thread-safe. No shared state is modified during the execution and concurrent invocations of this function
+ * on the same data does not cause any race conditions.
+ */
+
+template <typename TSequenceH,
+          typename TSequenceV,
+          typename TScoreValue, typename TScoreSpec,
+          typename TAlgoTag>
+SEQAN_FUNC_DISABLE_IF(And<And<Is<ContainerConcept<TSequenceH>>, Is<ContainerConcept<typename Value<TSequenceH>::Type>>>,
+                          And<Is<ContainerConcept<TSequenceV>>, Is<ContainerConcept<typename Value<TSequenceV>::Type>>>
+                         >, TScoreValue)
+localAlignmentScore(TSequenceH const & seqH,
+                    TSequenceV const & seqV,
+                    Score<TScoreValue, TScoreSpec> const & scoringScheme,
+                    TAlgoTag const & /*algoTag*/)
+{
+    typedef AlignConfig2<DPLocal, DPBandConfig<BandOff>, FreeEndGaps_<>, TracebackOff> TAlignConfig2;
+    typedef typename SubstituteAlgoTag_<TAlgoTag>::Type TGapModel;
+
+    DPScoutState_<Default> dpScoutState;
+    String<TraceSegment_<unsigned, unsigned> > traceSegments;  // Dummy segments.
+    return _setUpAndRunAlignment(traceSegments, dpScoutState, seqH, seqV, scoringScheme, TAlignConfig2{}, TGapModel{});
+}
+
+// ----------------------------------------------------------------------------
+// Function localAlignmentScore()                   [unbanded, Simd, TSequence]
+// ----------------------------------------------------------------------------
+
+template <typename TSeqH,
+          typename TSeqV,
+          typename TScoreValue, typename TScoreSpec,
+          typename TAlgoTag>
+inline
+SEQAN_FUNC_ENABLE_IF(And<And<Is<ContainerConcept<TSeqH>>, Is<ContainerConcept<typename Value<TSeqH>::Type>>>,
+                         And<Is<ContainerConcept<TSeqV>>, Is<ContainerConcept<typename Value<TSeqV>::Type>>>
+                        >, String<TScoreValue>)
+localAlignmentScore(TSeqH const & stringsH,
+                    TSeqV const & stringsV,
+                    Score<TScoreValue, TScoreSpec> const & scoringScheme,
+                    TAlgoTag const & /*algoTag*/)
+{
+    SEQAN_ASSERT_EQ(length(stringsH), length(stringsV));
+    typedef AlignConfig2<DPLocal, DPBandConfig<BandOff>, FreeEndGaps_<>, TracebackOff> TAlignConfig2;
+    typedef typename SubstituteAlgoTag_<TAlgoTag>::Type TGapModel;
+
+    return _alignWrapper(stringsH, stringsV, scoringScheme, TAlignConfig2(), TGapModel());
+}
+
+// Interface without algorithm tag.
+template <typename TSequenceH,
+          typename TSequenceV,
+          typename TScoreValue, typename TScoreSpec>
+auto localAlignmentScore(TSequenceH const & seqH,
+                         TSequenceV const & seqV,
+                         Score<TScoreValue, TScoreSpec> const & scoringScheme)
+{
+    if (scoreGapOpen(scoringScheme) == scoreGapExtend(scoringScheme))
+        return localAlignmentScore(seqH, seqV, scoringScheme, NeedlemanWunsch());
+    else
+        return localAlignmentScore(seqH, seqV, scoringScheme, Gotoh());
+}
+
 }  // namespace seqan
 
 #endif  // #ifndef SEQAN_INCLUDE_SEQAN_ALIGN_LOCAL_ALIGNMENT_UNBANDED_H_
diff --git a/include/seqan/align/local_alignment_waterman_eggert_impl.h b/include/seqan/align/local_alignment_waterman_eggert_impl.h
index e78fc33..8062aea 100644
--- a/include/seqan/align/local_alignment_waterman_eggert_impl.h
+++ b/include/seqan/align/local_alignment_waterman_eggert_impl.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -64,7 +64,7 @@ public:
     TValue value_;
     TID id_;
 
-    ScoreAndID() : value_(MinValue<TValue>::VALUE), id_(MaxValue<TValue>::VALUE)
+    ScoreAndID() : value_(std::numeric_limits<TValue>::min()), id_(std::numeric_limits<TValue>::max())
     {}
 
     ScoreAndID(TValue score, TID id_pos)
@@ -157,8 +157,8 @@ _initLocalAlignmentFinder(TSequenceH const & seqH,
 
     resize(finder.forbidden, (len0 + 1) * (len1 + 1), false);
 
-    finder.bestEndPos = maxValue<typename TFinder::TMatrixPosition>();
-    finder.bestBeginPos = maxValue<typename TFinder::TMatrixPosition>();
+    finder.bestEndPos = std::numeric_limits<typename TFinder::TMatrixPosition>::max();
+    finder.bestBeginPos = std::numeric_limits<typename TFinder::TMatrixPosition>::max();
 }
 
 // ----------------------------------------------------------------------------
@@ -179,7 +179,7 @@ template <typename TScoreValue>
 TScoreValue getScore(LocalAlignmentFinder<TScoreValue> const & sw)
 {
     typedef LocalAlignmentFinder<TScoreValue> TFinder;
-    if(sw.bestEndPos !=  maxValue<typename TFinder::TMatrixPosition>())
+    if(sw.bestEndPos !=  std::numeric_limits<typename TFinder::TMatrixPosition>::max())
         return getValue(const_cast<typename TFinder::TMatrix &>(sw.matrix), sw.bestEndPos);
     return 0;
 }
@@ -188,12 +188,12 @@ TScoreValue getScore(LocalAlignmentFinder<TScoreValue> const & sw)
 // Function _smithWatermanGetMatrix()
 // ----------------------------------------------------------------------------
 
-template <typename TScoreValue, typename TStringH, typename TStringV>
+template <typename TScoreValue, typename TScoreSpec, typename TStringH, typename TStringV>
 TScoreValue
 _smithWatermanGetMatrix(LocalAlignmentFinder<TScoreValue> & sw,
                         TStringH const & strH,
                         TStringV const & strV,
-                        Score<TScoreValue, Simple> const & score_,
+                        Score<TScoreValue, TScoreSpec> const & score_,
                         TScoreValue cutoff)
 {
     // typedefs
@@ -220,8 +220,6 @@ _smithWatermanGetMatrix(LocalAlignmentFinder<TScoreValue> & sw,
     TStringIteratorH x = x_end;
     TStringIteratorV y;
 
-    TScoreValue score_match = scoreMatch(score_);
-    TScoreValue score_mismatch = scoreMismatch(score_);
     TScoreValue score_gap = scoreGapExtend(score_);
 
     TScoreValue h = 0;
@@ -263,14 +261,15 @@ _smithWatermanGetMatrix(LocalAlignmentFinder<TScoreValue> & sw,
             goPrevious(finger1, 0);
             goPrevious(finger2, 0);
 
+            TScoreValue currScore = score(score_, *x, cy);
             if (*x == cy)
             {
-                v = h + score_match;
+                v = h + currScore;
                 h = *finger2;
             }
             else
             {
-                TScoreValue s1 = h + score_mismatch;
+                TScoreValue s1 = h + currScore;
                 h = *finger2;
                 TScoreValue s2 = score_gap + ((h > v) ? h : v);
                 v = (s1 > s2) ? s1 : s2;
@@ -303,12 +302,15 @@ _smithWatermanGetMatrix(LocalAlignmentFinder<TScoreValue> & sw,
 // ----------------------------------------------------------------------------
 
 // declumping
-template <typename TScoreValue, typename TSequenceH, typename TGapsSpecH, typename TSequenceV, typename TGapsSpecV>
+template <typename TScoreValue,
+          typename TSequenceH, typename TGapsSpecH,
+          typename TSequenceV, typename TGapsSpecV,
+          typename TScoreSpec>
 void
 _smithWatermanDeclump(LocalAlignmentFinder<TScoreValue> & sw ,
                       Gaps<TSequenceH, TGapsSpecH> & gapsH,
                       Gaps<TSequenceV, TGapsSpecV> & gapsV,
-                      Score<TScoreValue, Simple> const & score_)
+                      Score<TScoreValue, TScoreSpec> const & score_)
 {
 //-------------------------------------------------------------------------
 //typedefs
@@ -364,8 +366,6 @@ _smithWatermanDeclump(LocalAlignmentFinder<TScoreValue> & sw ,
     TSequenceHIter x_stop = x_end;
 
 
-    TScoreValue score_match = scoreMatch(score_);
-    TScoreValue score_mismatch = scoreMismatch(score_);
     TScoreValue score_gap = scoreGapExtend(score_);
     TScoreValue h,v;
 
@@ -456,9 +456,10 @@ _smithWatermanDeclump(LocalAlignmentFinder<TScoreValue> & sw ,
         {
             goPrevious(finger0, 0);
             goPrevious(finger1, 0);
+            TScoreValue currScore = score(score_, *x, cy);
             if (*x == cy && !(sw.forbidden[position(finger0)]))
             {
-                v = h + score_match;
+                v = h + currScore;
                 h = *finger1;
             }
             else
@@ -474,7 +475,7 @@ _smithWatermanDeclump(LocalAlignmentFinder<TScoreValue> & sw ,
                 else
                 {
                     if(sw.forbidden[position(finger0)]) s1 = 0;
-                    else s1 = h + score_mismatch;
+                    else s1 = h + currScore;
                 }
 
                 h = *finger1;
@@ -522,13 +523,16 @@ _smithWatermanDeclump(LocalAlignmentFinder<TScoreValue> & sw ,
 // ----------------------------------------------------------------------------
 
 // Traceback.
-template <typename TSourceH, typename TGapsSpecH, typename TSourceV, typename TGapsSpecV, typename TScoreValue, unsigned DIMENSION>
+template <typename TSourceH, typename TGapsSpecH,
+          typename TSourceV, typename TGapsSpecV,
+          typename TScoreValue, typename TScoreSpec,
+          unsigned DIMENSION>
 typename Iterator<Matrix<TScoreValue, DIMENSION>, Standard >::Type
 _smithWatermanTrace(Gaps<TSourceH, TGapsSpecH> & gapsH,
                     Gaps<TSourceV, TGapsSpecV> & gapsV,
                     typename LocalAlignmentFinder<TScoreValue>::TBoolMatrix & fb_matrix,
                     Iter< Matrix<TScoreValue, DIMENSION>, PositionIterator > source_,
-                    Score<TScoreValue, Simple> const & scoring_) {
+                    Score<TScoreValue, TScoreSpec> const & scoring_) {
     //typedefs
     typedef Iter<Matrix<TScoreValue, DIMENSION>, PositionIterator > TMatrixIterator;
     typedef typename Position<Matrix<TScoreValue, DIMENSION> >::Type TPosition;
@@ -559,7 +563,6 @@ _smithWatermanTrace(Gaps<TSourceH, TGapsSpecH> & gapsH,
     TSourceIteratorV it_1 = iter(strV, pos_1, Standard());
     TSourceIteratorV it_1_end = end(strV);
 
-    TScoreValue score_mismatch = scoreMismatch(scoring_);
     TScoreValue score_gap = scoreGapExtend(scoring_);
 
     //-------------------------------------------------------------------------
@@ -586,7 +589,7 @@ _smithWatermanTrace(Gaps<TSourceH, TGapsSpecH> & gapsH,
                 d = 0;
             else{
                 goNext(it_, 1);
-                d = *it_ + score_mismatch;
+                d = *it_ + score(scoring_, *it_0, *it_1);
             }
 
             it_ = source_;
@@ -678,7 +681,9 @@ _getNextBestEndPosition(LocalAlignmentFinder<TScoreValue> & sw ,
 // ----------------------------------------------------------------------------
 
 // Wrapper that computes the matrix and does the backtracking for the best alignment
-template <typename TSourceH, typename TGapsSpecH, typename TSourceV, typename TGapsSpecV, typename TScoreValue, typename TScoreSpec>
+template <typename TSourceH, typename TGapsSpecH,
+          typename TSourceV, typename TGapsSpecV,
+          typename TScoreValue, typename TScoreSpec>
 TScoreValue
 _smithWaterman(Gaps<TSourceH, TGapsSpecH> & gapsH,
                Gaps<TSourceV, TGapsSpecV> & gapsV,
diff --git a/include/seqan/align/matrix_base.h b/include/seqan/align/matrix_base.h
index e5ca253..2238bf0 100644
--- a/include/seqan/align/matrix_base.h
+++ b/include/seqan/align/matrix_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -45,34 +45,32 @@ namespace seqan
 struct NDimensional;
 
 
-template <typename TValue, unsigned DIMENSION = 0/*typename TSpec = NDimensional*/>
+template <typename TValue, unsigned DIMENSION = 0/*typename TSpec = NDimensional*/, typename THost = String<TValue> >
 class Matrix;
 
 //////////////////////////////////////////////////////////////////////////////
 template <typename T> struct SizeArr_;
 
-template <typename TValue, unsigned DIMENSION>
-struct SizeArr_<Matrix<TValue, DIMENSION> >
+template <typename TValue, unsigned DIMENSION, typename THost>
+struct SizeArr_<Matrix<TValue, DIMENSION, THost> >
 {
-    typedef Matrix<TValue, DIMENSION> TMatrix_;
+    typedef Matrix<TValue, DIMENSION, THost> TMatrix_;
     typedef typename Size<TMatrix_>::Type TSize_;
     typedef String<TSize_> Type;
 };
 
 //////////////////////////////////////////////////////////////////////////////
 
-template <typename TValue, unsigned DIMENSION>
-struct Host<Matrix<TValue, DIMENSION> >
+template <typename TValue, unsigned DIMENSION, typename THost>
+struct Host<Matrix<TValue, DIMENSION, THost> >
 {
-    typedef typename StringSpecForValue_<TValue>::Type TSpec_;
-    typedef String<TValue, TSpec_> Type;
+    typedef THost Type;
 };
 
-template <typename TValue, unsigned DIMENSION>
-struct Host<Matrix<TValue, DIMENSION> const>
+template <typename TValue, unsigned DIMENSION, typename THost>
+struct Host<Matrix<TValue, DIMENSION, THost> const>
 {
-    typedef typename StringSpecForValue_<TValue>::Type TSpec_;
-    typedef String<TValue, TSpec_> Type;
+    typedef THost const Type;
 };
 
 //////////////////////////////////////////////////////////////////////////////
@@ -94,15 +92,14 @@ struct Host<Matrix<TValue, DIMENSION> const>
  */
 
 
-template <typename TValue>
-class Matrix<TValue, 0>
+template <typename TValue, typename THost>
+class Matrix<TValue, 0, THost>
 {
 //____________________________________________________________________________
 
 public:
     typedef typename Size<Matrix>::Type TSize;
     typedef String<TSize> TSizeArr;
-    typedef typename Host<Matrix>::Type THost;
 
     TSizeArr data_lengths;        //Length of every dimension
     TSizeArr data_factors;        //used for positions of dimensions in host ("size of jumps" to get to next entry of specified dimension)
@@ -158,15 +155,14 @@ public:
 };
 
 
-template <typename TValue>
-class Matrix<TValue, 2>
+template <typename TValue, typename THost>
+class Matrix<TValue, 2, THost>
 {
 //____________________________________________________________________________
 
 public:
     typedef typename Size<Matrix>::Type TSize;
     typedef String<TSize> TSizeArr;
-    typedef typename Host<Matrix>::Type THost;
 
     TSizeArr data_lengths;
     TSizeArr data_factors;
@@ -219,15 +215,14 @@ public:
 //____________________________________________________________________________
 };
 
-template <typename TValue>
-class Matrix<TValue, 3>
+template <typename TValue, typename THost>
+class Matrix<TValue, 3, THost>
 {
 //____________________________________________________________________________
 
 public:
     typedef typename Size<Matrix>::Type TSize;
-    typedef String<TSize> TSizeArr; 
-    typedef typename Host<Matrix>::Type THost;
+    typedef String<TSize> TSizeArr;
 
     TSizeArr data_lengths;
     TSizeArr data_factors;
@@ -280,30 +275,30 @@ public:
 //____________________________________________________________________________
 };
 
-template <typename TValue, unsigned DIMENSION>
-inline typename SizeArr_<Matrix<TValue, DIMENSION> >::Type &
-_dataLengths(Matrix<TValue, DIMENSION> & me)
+template <typename TValue, unsigned DIMENSION, typename THost>
+inline typename SizeArr_<Matrix<TValue, DIMENSION, THost> >::Type &
+_dataLengths(Matrix<TValue, DIMENSION, THost> & me)
 {
     return me.data_lengths;
 }
 
-template <typename TValue, unsigned DIMENSION>
-inline typename SizeArr_<Matrix<TValue, DIMENSION> >::Type const &
-_dataLengths(Matrix<TValue, DIMENSION> const & me)
+template <typename TValue, unsigned DIMENSION, typename THost>
+inline typename SizeArr_<Matrix<TValue, DIMENSION, THost> >::Type const &
+_dataLengths(Matrix<TValue, DIMENSION, THost> const & me)
 {
     return me.data_lengths;
 }
 
-template <typename TValue, unsigned DIMENSION>
-inline typename SizeArr_<Matrix<TValue, DIMENSION> >::Type &
-_dataFactors(Matrix<TValue, DIMENSION> & me)
+template <typename TValue, unsigned DIMENSION, typename THost>
+inline typename SizeArr_<Matrix<TValue, DIMENSION, THost> >::Type &
+_dataFactors(Matrix<TValue, DIMENSION, THost> & me)
 {
     return me.data_factors;
 }
 
-template <typename TValue, unsigned DIMENSION>
-inline typename SizeArr_<Matrix<TValue, DIMENSION> >::Type const &
-_dataFactors(Matrix<TValue, DIMENSION> const & me)
+template <typename TValue, unsigned DIMENSION, typename THost>
+inline typename SizeArr_<Matrix<TValue, DIMENSION, THost> >::Type const &
+_dataFactors(Matrix<TValue, DIMENSION, THost> const & me)
 {
     return me.data_factors;
 }
@@ -311,25 +306,25 @@ _dataFactors(Matrix<TValue, DIMENSION> const & me)
 //____________________________________________________________________________
 
 
-template <typename TValue, unsigned DIMENSION>
+template <typename TValue, unsigned DIMENSION, typename THost>
 inline bool
-dependent(Matrix<TValue, DIMENSION> & me)
+dependent(Matrix<TValue, DIMENSION, THost> & me)
 {
     return dependent(me.data_host);
 }
 
 //____________________________________________________________________________
 
-template <typename TValue, unsigned DIMENSION>
-inline Holder<typename Host<Matrix<TValue, DIMENSION> >::Type> &
-_dataHost(Matrix<TValue, DIMENSION> & matrix)
+template <typename TValue, unsigned DIMENSION, typename THost>
+inline Holder<typename Host<Matrix<TValue, DIMENSION, THost> >::Type> &
+_dataHost(Matrix<TValue, DIMENSION, THost> & matrix)
 {
     return matrix.data_host;
 }
 
-template <typename TValue, unsigned DIMENSION>
-inline Holder<typename Host<Matrix<TValue, DIMENSION> >::Type> const &
-_dataHost(Matrix<TValue, DIMENSION> const & matrix)
+template <typename TValue, unsigned DIMENSION, typename THost>
+inline Holder<typename Host<Matrix<TValue, DIMENSION, THost> >::Type> const &
+_dataHost(Matrix<TValue, DIMENSION, THost> const & matrix)
 {
     return matrix.data_host;
 }
@@ -338,7 +333,7 @@ _dataHost(Matrix<TValue, DIMENSION> const & matrix)
 
 template <typename TValue, unsigned DIMENSION, typename THost>
 inline void
-assignHost(Matrix<TValue, DIMENSION> & me, THost const & value_)
+assignHost(Matrix<TValue, DIMENSION, THost> & me, THost const & value_)
 {
     assignValue(me.data_host, value_);
 }
@@ -347,48 +342,48 @@ assignHost(Matrix<TValue, DIMENSION> & me, THost const & value_)
 
 template <typename TValue, unsigned DIMENSION, typename THost>
 inline void
-moveHost(Matrix<TValue, DIMENSION> & me, THost const & value_)
+moveHost(Matrix<TValue, DIMENSION, THost> & me, THost const & value_)
 {
     moveValue(me.data_host, value_);
 }
 //////////////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////////
 
-template <typename TValue, unsigned DIMENSION>
-struct Value< Matrix<TValue, DIMENSION> >
+template <typename TValue, unsigned DIMENSION, typename THost>
+struct Value< Matrix<TValue, DIMENSION, THost> >
 {
     typedef TValue Type;
 };
 
 //////////////////////////////////////////////////////////////////////////////
 
-template <typename TValue, unsigned DIMENSION, typename TIteratorSpec>
-struct Iterator< Matrix<TValue, DIMENSION>, TIteratorSpec >
+template <typename TValue, unsigned DIMENSION, typename THost, typename TIteratorSpec>
+struct Iterator< Matrix<TValue, DIMENSION, THost>, TIteratorSpec >
 {
-    typedef Iter<Matrix<TValue, DIMENSION>, PositionIterator> Type;
+    typedef Iter<Matrix<TValue, DIMENSION, THost>, PositionIterator> Type;
 };
 
-template <typename TValue, unsigned DIMENSION, typename TIteratorSpec>
-struct Iterator< Matrix<TValue, DIMENSION> const, TIteratorSpec >
+template <typename TValue, unsigned DIMENSION, typename THost, typename TIteratorSpec>
+struct Iterator< Matrix<TValue, DIMENSION, THost> const, TIteratorSpec >
 {
-    typedef Iter<Matrix<TValue, DIMENSION> const, PositionIterator> Type;
+    typedef Iter<Matrix<TValue, DIMENSION, THost> const, PositionIterator> Type;
 };
 
 //////////////////////////////////////////////////////////////////////////////
 //////////////////////////////////////////////////////////////////////////////
 
-template <typename TValue, unsigned DIMENSION>
-inline typename Size<Matrix<TValue, DIMENSION> const>::Type
-dimension(Matrix<TValue, DIMENSION> const & me)
+template <typename TValue, unsigned DIMENSION, typename THost>
+inline typename Size<Matrix<TValue, DIMENSION, THost> const>::Type
+dimension(Matrix<TValue, DIMENSION, THost> const & me)
 {
     return length(_dataLengths(me));
 }
 
 //////////////////////////////////////////////////////////////////////////////
 
-template <typename TValue, unsigned DIMENSION>
+template <typename TValue, unsigned DIMENSION, typename THost>
 inline void
-setDimension(Matrix<TValue, DIMENSION> & me,
+setDimension(Matrix<TValue, DIMENSION, THost> & me,
              unsigned int dim_)
 {
 
@@ -403,39 +398,39 @@ setDimension(Matrix<TValue, DIMENSION> & me,
 
 //////////////////////////////////////////////////////////////////////////////
 
-template <typename TValue, unsigned DIMENSION>
-inline typename Size<Matrix<TValue, DIMENSION> >::Type
-length(Matrix<TValue, DIMENSION> const & me,
+template <typename TValue, unsigned DIMENSION, typename THost>
+inline typename Size<Matrix<TValue, DIMENSION, THost> >::Type
+length(Matrix<TValue, DIMENSION, THost> const & me,
        unsigned int dim_)
 {
     return me.data_lengths[dim_];
 }
 
-template <typename TValue, unsigned DIMENSION>
-inline typename Size<Matrix <TValue, DIMENSION> >::Type
-length(Matrix<TValue, DIMENSION> const & me)
+template <typename TValue, unsigned DIMENSION, typename THost>
+inline typename Size<Matrix <TValue, DIMENSION, THost> >::Type
+length(Matrix<TValue, DIMENSION, THost> const & me)
 {
     return length(host(me));
 }
 
-template <typename TValue, unsigned DIMENSION>
-inline bool empty(Matrix<TValue, DIMENSION> const & me)
+template <typename TValue, unsigned DIMENSION, typename THost>
+inline bool empty(Matrix<TValue, DIMENSION, THost> const & me)
 {
     return empty(host(me));
 }
 
 //////////////////////////////////////////////////////////////////////////////
 
-template <typename TValue, unsigned DIMENSION, typename TLength>
+template <typename TValue, unsigned DIMENSION, typename THost, typename TLength>
 inline void
-setLength(Matrix<TValue, DIMENSION> & me,
+setLength(Matrix<TValue, DIMENSION, THost> & me,
           unsigned int dim_,
           TLength length_)
 {
     SEQAN_ASSERT_GT(length_, static_cast<TLength>(0));
     SEQAN_ASSERT_LT(dim_, dimension(me));
 
-    typedef typename SizeArr_<Matrix<TValue, DIMENSION> >::TSize_ TSize_;
+    typedef typename SizeArr_<Matrix<TValue, DIMENSION, THost> >::TSize_ TSize_;
 
     _dataLengths(me)[dim_] = static_cast<TSize_>(length_);
 }
@@ -453,11 +448,11 @@ setLength(Matrix<TValue, DIMENSION> & me,
  */
 
 
-template <typename TValue, unsigned DIMENSION>
+template <typename TValue, unsigned DIMENSION, typename THost>
 inline void
-resize(Matrix<TValue, DIMENSION> & me)
+resize(Matrix<TValue, DIMENSION, THost> & me)
 {
-    typedef Matrix<TValue, DIMENSION> TMatrix;
+    typedef Matrix<TValue, DIMENSION, THost> TMatrix;
     typedef typename Size<TMatrix>::Type TSize;
 
     unsigned int dimension_ = dimension(me);
@@ -479,11 +474,11 @@ resize(Matrix<TValue, DIMENSION> & me)
 
 //////////////////////////////////////////////////////////////////////////////
 
-template <typename TValue, unsigned DIMENSION, typename TFillValue>
+template <typename TValue, unsigned DIMENSION, typename THost, typename TFillValue>
 inline void
-resize(Matrix<TValue, DIMENSION> & me, TFillValue myValue)    //resize the matrix and fill with value
+resize(Matrix<TValue, DIMENSION, THost> & me, TFillValue myValue)    //resize the matrix and fill with value
 {
-    typedef Matrix<TValue, DIMENSION> TMatrix;
+    typedef Matrix<TValue, DIMENSION, THost> TMatrix;
     typedef typename Size<TMatrix>::Type TSize;
 
     unsigned int dimension_ = dimension(me);
@@ -504,36 +499,36 @@ resize(Matrix<TValue, DIMENSION> & me, TFillValue myValue)    //resize the matri
 
 //////////////////////////////////////////////////////////////////////////////
 
-template <typename TValue, unsigned DIMENSION, typename TPosition>
-inline typename Position<Matrix <TValue, DIMENSION> >::Type
-nextPosition(Matrix<TValue, DIMENSION> & me,
+template <typename TValue, unsigned DIMENSION, typename THost, typename TPosition>
+inline typename Position<Matrix <TValue, DIMENSION, THost> >::Type
+nextPosition(Matrix<TValue, DIMENSION, THost> & me,
              TPosition position_,
              unsigned int dimension_)
 {
     return position_ + _dataFactors(me)[dimension_];
 }
 
-template <typename TValue, unsigned DIMENSION, typename TPosition>
-inline typename Position<Matrix <TValue, DIMENSION> >::Type
-nextPosition(Matrix<TValue, DIMENSION> const & me,
+template <typename TValue, unsigned DIMENSION, typename THost, typename TPosition>
+inline typename Position<Matrix <TValue, DIMENSION, THost> >::Type
+nextPosition(Matrix<TValue, DIMENSION, THost> const & me,
              TPosition position_,
              unsigned int dimension_)
 {
     return position_ + _dataFactors(me)[dimension_];
 }
 
-template <typename TValue, unsigned DIMENSION, typename TPosition>
-inline typename Position<Matrix <TValue, DIMENSION> >::Type
-previousPosition(Matrix<TValue, DIMENSION> & me,
+template <typename TValue, unsigned DIMENSION, typename THost, typename TPosition>
+inline typename Position<Matrix <TValue, DIMENSION, THost> >::Type
+previousPosition(Matrix<TValue, DIMENSION, THost> & me,
                  TPosition position_,
                  unsigned int dimension_)
 {
     return position_ - _dataFactors(me)[dimension_];
 }
 
-template <typename TValue, unsigned DIMENSION, typename TPosition>
-inline typename Position<Matrix <TValue, DIMENSION> >::Type
-previousPosition(Matrix<TValue, DIMENSION> const & me,
+template <typename TValue, unsigned DIMENSION, typename THost, typename TPosition>
+inline typename Position<Matrix <TValue, DIMENSION, THost> >::Type
+previousPosition(Matrix<TValue, DIMENSION, THost> const & me,
                  TPosition position_,
                  unsigned int dimension_)
 {
@@ -542,9 +537,9 @@ previousPosition(Matrix<TValue, DIMENSION> const & me,
 
 //////////////////////////////////////////////////////////////////////////////
 
-template <typename TValue, unsigned DIMENSION, typename TPosition>
-inline typename Size< Matrix <TValue, DIMENSION> >::Type
-coordinate(Matrix<TValue, DIMENSION> const & me,
+template <typename TValue, unsigned DIMENSION, typename THost, typename TPosition>
+inline typename Size< Matrix <TValue, DIMENSION, THost> >::Type
+coordinate(Matrix<TValue, DIMENSION, THost> const & me,
            TPosition position_,
            unsigned int dimension_)
 {
@@ -562,51 +557,51 @@ coordinate(Matrix<TValue, DIMENSION> const & me,
 
 //////////////////////////////////////////////////////////////////////////////
 
-template <typename TValue, unsigned DIMENSION, typename TTag>
-inline typename Iterator<Matrix <TValue, DIMENSION>, Tag<TTag> const>::Type
-begin(Matrix<TValue, DIMENSION> & me,
+template <typename TValue, unsigned DIMENSION, typename THost, typename TTag>
+inline typename Iterator<Matrix <TValue, DIMENSION, THost>, Tag<TTag> const>::Type
+begin(Matrix<TValue, DIMENSION, THost> & me,
       Tag<TTag> const)
 {
-    return typename Iterator<Matrix <TValue, DIMENSION>, Tag<TTag> const >::Type(me, 0);
+    return typename Iterator<Matrix <TValue, DIMENSION, THost>, Tag<TTag> const >::Type(me, 0);
 }
-template <typename TValue, unsigned DIMENSION, typename TTag>
-inline typename Iterator<Matrix <TValue, DIMENSION> const, Tag<TTag> const>::Type
-begin(Matrix<TValue, DIMENSION> const & me,
+template <typename TValue, unsigned DIMENSION, typename THost, typename TTag>
+inline typename Iterator<Matrix <TValue, DIMENSION, THost> const, Tag<TTag> const>::Type
+begin(Matrix<TValue, DIMENSION, THost> const & me,
       Tag<TTag> const)
 {
-    return typename Iterator<Matrix <TValue, DIMENSION> const, Tag<TTag> const >::Type(me, 0);
+    return typename Iterator<Matrix <TValue, DIMENSION, THost> const, Tag<TTag> const >::Type(me, 0);
 }
 
 //////////////////////////////////////////////////////////////////////////////
 
-template <typename TValue, unsigned DIMENSION, typename TTag>
-inline typename Iterator<Matrix <TValue, DIMENSION>, Tag<TTag> const >::Type
-end(Matrix<TValue, DIMENSION> & me,
+template <typename TValue, unsigned DIMENSION, typename THost, typename TTag>
+inline typename Iterator<Matrix <TValue, DIMENSION, THost>, Tag<TTag> const >::Type
+end(Matrix<TValue, DIMENSION, THost> & me,
       Tag<TTag> const)
 {
-    return typename Iterator<Matrix <TValue, DIMENSION>, Tag<TTag> const >::Type(me, length(host(me)));
+    return typename Iterator<Matrix <TValue, DIMENSION, THost>, Tag<TTag> const >::Type(me, length(host(me)));
 }
-template <typename TValue, unsigned DIMENSION, typename TTag>
-inline typename Iterator<Matrix <TValue, DIMENSION> const, Tag<TTag> const >::Type
-end(Matrix<TValue, DIMENSION> const & me,
+template <typename TValue, unsigned DIMENSION, typename THost, typename TTag>
+inline typename Iterator<Matrix <TValue, DIMENSION, THost> const, Tag<TTag> const >::Type
+end(Matrix<TValue, DIMENSION, THost> const & me,
       Tag<TTag> const)
 {
-    return typename Iterator<Matrix <TValue, DIMENSION>, Tag<TTag> const >::Type(me, length(host(me)));
+    return typename Iterator<Matrix <TValue, DIMENSION, THost>, Tag<TTag> const >::Type(me, length(host(me)));
 }
 
 //////////////////////////////////////////////////////////////////////////////
 
-template <typename TValue, unsigned DIMENSION, typename TPosition>
-inline typename Reference<Matrix<TValue, DIMENSION> >::Type
-value(Matrix<TValue, DIMENSION> & me,
+template <typename TValue, unsigned DIMENSION, typename THost, typename TPosition>
+inline typename Reference<Matrix<TValue, DIMENSION, THost> >::Type
+value(Matrix<TValue, DIMENSION, THost> & me,
       TPosition position_)
 {
     return value(host(me), position_);
 }
 
-template <typename TValue, unsigned DIMENSION, typename TPosition>
-inline typename Reference<Matrix<TValue, DIMENSION> const>::Type
-value(Matrix<TValue, DIMENSION> const & me,
+template <typename TValue, unsigned DIMENSION, typename THost, typename TPosition>
+inline typename Reference<Matrix<TValue, DIMENSION, THost> const>::Type
+value(Matrix<TValue, DIMENSION, THost> const & me,
       TPosition position_)
 {
     return value(host(me), position_);
@@ -615,18 +610,18 @@ value(Matrix<TValue, DIMENSION> const & me,
 //____________________________________________________________________________
 
 //two dimensional value access
-template <typename TValue, unsigned DIMENSION, typename TOrdinate1, typename TOrdinate2>
-inline typename Reference<Matrix<TValue, DIMENSION> >::Type
-value(Matrix<TValue, DIMENSION> & me,
+template <typename TValue, unsigned DIMENSION, typename THost, typename TOrdinate1, typename TOrdinate2>
+inline typename Reference<Matrix<TValue, DIMENSION, THost> >::Type
+value(Matrix<TValue, DIMENSION, THost> & me,
       TOrdinate1 i1,
       TOrdinate2 i2)
 {
     return value(host(me), i1 + i2 * _dataFactors(me)[1]);
 }
 
-template <typename TValue, unsigned DIMENSION, typename TOrdinate1, typename TOrdinate2>
-inline typename Reference<Matrix<TValue, DIMENSION> const>::Type
-value(Matrix<TValue, DIMENSION> const & me,
+template <typename TValue, unsigned DIMENSION, typename THost, typename TOrdinate1, typename TOrdinate2>
+inline typename Reference<Matrix<TValue, DIMENSION, THost> const>::Type
+value(Matrix<TValue, DIMENSION, THost> const & me,
       TOrdinate1 i1,
       TOrdinate2 i2)
 {
@@ -637,9 +632,9 @@ value(Matrix<TValue, DIMENSION> const & me,
 
 //3 dimensional value access
 
-template <typename TValue, unsigned DIMENSION, typename TOrdinate1, typename TOrdinate2, typename TOrdinate3>
-inline typename Reference<Matrix<TValue, DIMENSION> >::Type
-value(Matrix<TValue, DIMENSION> & me,
+template <typename TValue, unsigned DIMENSION, typename THost, typename TOrdinate1, typename TOrdinate2, typename TOrdinate3>
+inline typename Reference<Matrix<TValue, DIMENSION, THost> >::Type
+value(Matrix<TValue, DIMENSION, THost> & me,
       TOrdinate1 i1,
       TOrdinate2 i2,
       TOrdinate3 i3)
@@ -651,9 +646,9 @@ value(Matrix<TValue, DIMENSION> & me,
 
 //4 dimensional value access
 
-template <typename TValue, unsigned DIMENSION, typename TOrdinate1, typename TOrdinate2, typename TOrdinate3, typename TOrdinate4>
-inline typename Reference<Matrix<TValue, DIMENSION> >::Type
-value(Matrix<TValue, DIMENSION> & me,
+template <typename TValue, unsigned DIMENSION, typename THost, typename TOrdinate1, typename TOrdinate2, typename TOrdinate3, typename TOrdinate4>
+inline typename Reference<Matrix<TValue, DIMENSION, THost> >::Type
+value(Matrix<TValue, DIMENSION, THost> & me,
       TOrdinate1 i1,
       TOrdinate2 i2,
       TOrdinate3 i3,
@@ -667,32 +662,32 @@ value(Matrix<TValue, DIMENSION> & me,
 // Iterator: goNext
 //////////////////////////////////////////////////////////////////////////////
 
-template <typename TValue, unsigned DIMENSION>
+template <typename TValue, unsigned DIMENSION, typename THost>
 inline void
-goNext(Iter<Matrix<TValue, DIMENSION>, PositionIterator> & me,
+goNext(Iter<Matrix<TValue, DIMENSION, THost>, PositionIterator> & me,
        unsigned int dimension_)
 {
     setPosition(me, nextPosition(container(me), position(me), dimension_));
 }
 
-template <typename TValue, unsigned DIMENSION>
+template <typename TValue, unsigned DIMENSION, typename THost>
 inline void
-goNext(Iter<Matrix<TValue, DIMENSION> const, PositionIterator> & me,
+goNext(Iter<Matrix<TValue, DIMENSION, THost> const, PositionIterator> & me,
        unsigned int dimension_)
 {
     setPosition(me, nextPosition(container(me), position(me), dimension_));
 }
 
-template <typename TValue, unsigned DIMENSION>
+template <typename TValue, unsigned DIMENSION, typename THost>
 inline void
-goNext(Iter<Matrix<TValue, DIMENSION>, PositionIterator> & me)
+goNext(Iter<Matrix<TValue, DIMENSION, THost>, PositionIterator> & me)
 {
     goNext(me, 0);
 }
 
-template <typename TValue, unsigned DIMENSION>
+template <typename TValue, unsigned DIMENSION, typename THost>
 inline void
-goNext(Iter<Matrix<TValue, DIMENSION> const, PositionIterator> & me)
+goNext(Iter<Matrix<TValue, DIMENSION, THost> const, PositionIterator> & me)
 {
     goNext(me, 0);
 }
@@ -701,32 +696,32 @@ goNext(Iter<Matrix<TValue, DIMENSION> const, PositionIterator> & me)
 // Iterator: goPrevious
 //////////////////////////////////////////////////////////////////////////////
 
-template <typename TValue, unsigned DIMENSION>
+template <typename TValue, unsigned DIMENSION, typename THost>
 inline void
-goPrevious(Iter< Matrix<TValue, DIMENSION>, PositionIterator > & me,
+goPrevious(Iter< Matrix<TValue, DIMENSION, THost>, PositionIterator > & me,
            unsigned int dimension_)
 {
     setPosition(me, previousPosition(container(me), position(me), dimension_));
 }
 
-template <typename TValue, unsigned DIMENSION>
+template <typename TValue, unsigned DIMENSION, typename THost>
 inline void
-goPrevious(Iter< Matrix<TValue, DIMENSION> const, PositionIterator > & me,
+goPrevious(Iter< Matrix<TValue, DIMENSION, THost> const, PositionIterator > & me,
            unsigned int dimension_)
 {
     setPosition(me, previousPosition(container(me), position(me), dimension_));
 }
 
-template <typename TValue, unsigned DIMENSION>
+template <typename TValue, unsigned DIMENSION, typename THost>
 inline void
-goPrevious(Iter< Matrix<TValue, DIMENSION>, PositionIterator > & me)
+goPrevious(Iter< Matrix<TValue, DIMENSION, THost>, PositionIterator > & me)
 {
     goPrevious(me, 0);
 }
 
-template <typename TValue, unsigned DIMENSION>
+template <typename TValue, unsigned DIMENSION, typename THost>
 inline void
-goPrevious(Iter< Matrix<TValue, DIMENSION> const, PositionIterator > & me)
+goPrevious(Iter< Matrix<TValue, DIMENSION, THost> const, PositionIterator > & me)
 {
     goPrevious(me, 0);
 }
@@ -735,33 +730,33 @@ goPrevious(Iter< Matrix<TValue, DIMENSION> const, PositionIterator > & me)
 // goTo
 //////////////////////////////////////////////////////////////////////////////
 
-template <typename TValue, unsigned DIMENSION, typename TPosition0, typename TPosition1>
+template <typename TValue, unsigned DIMENSION, typename THost, typename TPosition0, typename TPosition1>
 inline void
-goTo(Iter<Matrix<TValue, DIMENSION>, PositionIterator> & me, TPosition0 pos0, TPosition1 pos1)
+goTo(Iter<Matrix<TValue, DIMENSION, THost>, PositionIterator> & me, TPosition0 pos0, TPosition1 pos1)
 {
     setPosition(me, pos0 + pos1 * _dataFactors(container(me))[1]);
 }
 
 
-template <typename TValue, unsigned DIMENSION, typename TPosition0, typename TPosition1>
+template <typename TValue, unsigned DIMENSION, typename THost, typename TPosition0, typename TPosition1>
 inline void
-goTo(Iter<Matrix<TValue, DIMENSION> const, PositionIterator> & me, TPosition0 pos0, TPosition1 pos1)
+goTo(Iter<Matrix<TValue, DIMENSION, THost> const, PositionIterator> & me, TPosition0 pos0, TPosition1 pos1)
 {
     setPosition(me, pos0 + pos1 * _dataFactors(container(me))[1]);
 }
 
 
-template <typename TValue, unsigned DIMENSION, typename TPosition0, typename TPosition1, typename TPosition2>
+template <typename TValue, unsigned DIMENSION, typename THost, typename TPosition0, typename TPosition1, typename TPosition2>
 inline void
-goTo(Iter<Matrix<TValue, DIMENSION>, PositionIterator> & me, TPosition0 pos0, TPosition1 pos1, TPosition2 pos2)
+goTo(Iter<Matrix<TValue, DIMENSION, THost>, PositionIterator> & me, TPosition0 pos0, TPosition1 pos1, TPosition2 pos2)
 {
     setPosition(me, pos0 + pos1 * _dataFactors(container(me))[1] + pos2 * _dataFactors(container(me))[2]);
 }
 
 
-template <typename TValue, unsigned DIMENSION, typename TPosition0, typename TPosition1, typename TPosition2>
+template <typename TValue, unsigned DIMENSION, typename THost, typename TPosition0, typename TPosition1, typename TPosition2>
 inline void
-goTo(Iter<Matrix<TValue, DIMENSION> const, PositionIterator> & me, TPosition0 pos0, TPosition1 pos1, TPosition2 pos2)
+goTo(Iter<Matrix<TValue, DIMENSION, THost> const, PositionIterator> & me, TPosition0 pos0, TPosition1 pos1, TPosition2 pos2)
 {
     setPosition(me, pos0 + pos1 * _dataFactors(container(me))[1] + pos2 * _dataFactors(container(me))[2]);
 }
@@ -769,17 +764,17 @@ goTo(Iter<Matrix<TValue, DIMENSION> const, PositionIterator> & me, TPosition0 po
 //////////////////////////////////////////////////////////////////////////////
 // Iterator: coordinate
 
-template <typename TValue, unsigned DIMENSION>
-inline typename Size< Matrix<TValue, DIMENSION> >::Type
-coordinate(Iter<Matrix<TValue, DIMENSION>, PositionIterator > & me,
+template <typename TValue, unsigned DIMENSION, typename THost>
+inline typename Size< Matrix<TValue, DIMENSION, THost> >::Type
+coordinate(Iter<Matrix<TValue, DIMENSION, THost>, PositionIterator > & me,
            unsigned int dimension_)
 {
     return coordinate(container(me), position(me), dimension_);
 }
 
-template <typename TValue, unsigned DIMENSION>
-inline typename Size< Matrix<TValue, DIMENSION> >::Type
-coordinate(Iter<Matrix<TValue, DIMENSION> const, PositionIterator > & me,
+template <typename TValue, unsigned DIMENSION, typename THost>
+inline typename Size< Matrix<TValue, DIMENSION, THost> >::Type
+coordinate(Iter<Matrix<TValue, DIMENSION, THost> const, PositionIterator > & me,
            unsigned int dimension_)
 {
     return coordinate(container(me), position(me), dimension_);
@@ -797,9 +792,9 @@ coordinate(Iter<Matrix<TValue, DIMENSION> const, PositionIterator > & me,
  * @return TMatrix The resulting matrix of same type as <tt>lhs</tt> and <tt>rhs</tt>.
  */
 
-template <typename TValue,unsigned DIMENSION>
+template <typename TValue,unsigned DIMENSION, typename THost1, typename THost2>
 Matrix<TValue,DIMENSION>
-operator + (Matrix<TValue,DIMENSION> const & matrix1,Matrix<TValue,DIMENSION> const & matrix2)
+operator + (Matrix<TValue,DIMENSION, THost1> const & matrix1, Matrix<TValue,DIMENSION, THost2> const & matrix2)
 {
     //the two matrices must have same dimension
     SEQAN_ASSERT(_dataLengths(matrix1) == _dataLengths(matrix2));
@@ -819,9 +814,9 @@ operator + (Matrix<TValue,DIMENSION> const & matrix1,Matrix<TValue,DIMENSION> co
     return result;
 }
 
-template <typename TValue,unsigned DIMENSION>
+template <typename TValue,unsigned DIMENSION, typename THost1, typename THost2>
 Matrix<TValue,DIMENSION>
-operator - (Matrix<TValue,DIMENSION> const & matrix1,Matrix<TValue,DIMENSION> const & matrix2)
+operator - (Matrix<TValue,DIMENSION, THost1> const & matrix1,Matrix<TValue,DIMENSION, THost2> const & matrix2)
 {
     //the two matrices must have same dimension
     SEQAN_ASSERT(_dataLengths(matrix1) == _dataLengths(matrix2));
@@ -841,9 +836,9 @@ operator - (Matrix<TValue,DIMENSION> const & matrix1,Matrix<TValue,DIMENSION> co
     return result;
 }
 
-template <typename TValue>
+template <typename TValue, typename THost1, typename THost2>
 Matrix<TValue, 2>
-operator * (Matrix<TValue, 2> const & matrix1, Matrix<TValue, 2> const & matrix2)
+operator * (Matrix<TValue, 2, THost1> const & matrix1, Matrix<TValue, 2, THost2> const & matrix2)
 {
     SEQAN_ASSERT_EQ(length(matrix1,1), length(matrix2,0));
 
@@ -871,9 +866,9 @@ operator * (Matrix<TValue, 2> const & matrix1, Matrix<TValue, 2> const & matrix2
 }
 
 
-template <typename TValue>
+template <typename TValue, typename THost>
 Matrix<TValue, 2>
-operator * (TValue const & scalar, Matrix<TValue, 2> const & matrix)
+operator * (TValue const & scalar, Matrix<TValue, 2, THost> const & matrix)
 {
     Matrix<TValue, 2> result;
     result= matrix;
@@ -886,9 +881,9 @@ operator * (TValue const & scalar, Matrix<TValue, 2> const & matrix)
     return result;
 }
 
-template <typename TValue>
+template <typename TValue, typename THost>
 Matrix<TValue, 2>
-operator * (Matrix<TValue, 2> const & matrix, TValue const & scalar)
+operator * (Matrix<TValue, 2, THost> const & matrix, TValue const & scalar)
 {
     Matrix<TValue, 2> result;
     result= matrix;
@@ -902,9 +897,9 @@ operator * (Matrix<TValue, 2> const & matrix, TValue const & scalar)
 }
 
 
-template <typename TValue, unsigned DIMENSION1, unsigned DIMENSION2>
+template <typename TValue, unsigned DIMENSION1, typename THost1, unsigned DIMENSION2, typename THost2>
 bool
-operator == (Matrix<TValue, DIMENSION1> const & matrix1, Matrix<TValue, DIMENSION2> const & matrix2)
+operator == (Matrix<TValue, DIMENSION1, THost1> const & matrix1, Matrix<TValue, DIMENSION2, THost2> const & matrix2)
 {
     bool result;
     result= (matrix1.data_lengths==matrix2.data_lengths)&&(matrix1.data_factors==matrix2.data_factors)&&(value(matrix1.data_host)==value(matrix2.data_host))&&(DIMENSION1==DIMENSION2);
@@ -1027,9 +1022,9 @@ matricialProduct(Matrix<TValue, 2> &matrix1,
  * @return TMatrix The resulting tranposed matrix.
  */
 
-template <typename TValue>
+template <typename TValue, typename THost>
 Matrix<TValue,2>
-transpose(Matrix<TValue,2> const & matrix)
+transpose(Matrix<TValue,2, THost> const & matrix)
 {
 
     unsigned int nrow=length(matrix,0);
@@ -1057,8 +1052,8 @@ transpose(Matrix<TValue,2> const & matrix)
 }
 
 
-template < typename TValue >
-std::ostream& operator<<(std::ostream &out, const Matrix<TValue,2> &matrix)
+template < typename TValue , typename THost>
+std::ostream& operator<<(std::ostream &out, const Matrix<TValue,2, THost> &matrix)
 {
     for(unsigned int i1 = 0;i1< matrix.data_lengths[0];++i1)
     {
diff --git a/include/seqan/align_extend.h b/include/seqan/align_extend.h
index dcc7111..89bef49 100644
--- a/include/seqan/align_extend.h
+++ b/include/seqan/align_extend.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/align_extend/align_extend.h b/include/seqan/align_extend/align_extend.h
index f5459fb..deb2cf8 100644
--- a/include/seqan/align_extend/align_extend.h
+++ b/include/seqan/align_extend/align_extend.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -254,7 +254,7 @@ _extendAlignmentImpl(Gaps<TSource0, TGapsSpec0> & row0,
     TPos newAlignLen = length(row0);
 
     // centerScore was set to "compute yourself" by interface function without score parameter
-    if (centerScore == minValue<TScoreValue>())
+    if (centerScore == std::numeric_limits<TScoreValue>::min())
     {
         centerScore = 0;
 
@@ -416,7 +416,7 @@ _extendAlignmentImpl(Align<TStringInfix, TAlignSpec> & align,
 {
     if (scoreGapOpen(scoreScheme) == scoreGapExtend(scoreScheme))
     {
-        typedef DPContext<TScoreValue, LinearGaps> TDPContext;
+        typedef DPContext<DPCell_<TScoreValue, LinearGaps>, typename TraceBitMap_<TScoreValue>::Type> TDPContext;
         typedef AliExtContext_<Gaps<TStringInfix, TAlignSpec>,
                                Gaps<TStringInfix, TAlignSpec>,
                                TDPContext> TAliExtContext_;
@@ -426,7 +426,7 @@ _extendAlignmentImpl(Align<TStringInfix, TAlignSpec> & align,
     }
     else
     {
-        typedef DPContext<TScoreValue, AffineGaps> TDPContext;
+        typedef DPContext<DPCell_<TScoreValue, AffineGaps>, typename TraceBitMap_<TScoreValue>::Type> TDPContext;
         typedef AliExtContext_<Gaps<TStringInfix, TAlignSpec>,
                                Gaps<TStringInfix, TAlignSpec>,
                                TDPContext> TAliExtContext_;
@@ -501,7 +501,7 @@ extendAlignment(Align<TStringInfix, TAlignSpec> & align,
                 ExtensionDirection const & direction,
                 Score<TScoreValue, TScoreSpec> const & scoreScheme)
 {
-    return _extendAlignmentImpl(align, minValue<TScoreValue>(), hSeq, vSeq, positions, direction, 0, 0, 0, scoreScheme,
+    return _extendAlignmentImpl(align, std::numeric_limits<TScoreValue>::min(), hSeq, vSeq, positions, direction, 0, 0, 0, scoreScheme,
                                 False(), False());
 }
 
@@ -533,7 +533,7 @@ extendAlignment(Align<TStringInfix, TAlignSpec> & align,
                 int const upperDiag,
                 Score<TScoreValue, TScoreSpec> const & scoreScheme)
 {
-    return _extendAlignmentImpl(align, minValue<TScoreValue>(), hSeq, vSeq, positions, direction, lowerDiag, upperDiag,
+    return _extendAlignmentImpl(align, std::numeric_limits<TScoreValue>::min(), hSeq, vSeq, positions, direction, lowerDiag, upperDiag,
                                 0, scoreScheme, True(), False());
 }
 
@@ -566,7 +566,7 @@ extendAlignment(Align<TStringInfix, TAlignSpec> & align,
                 TScoreValue const & xDrop,
                 Score<TScoreValue, TScoreSpec> const & scoreScheme)
 {
-    return _extendAlignmentImpl(align, minValue<TScoreValue>(), hSeq, vSeq, positions, direction, 0, 0, xDrop,
+    return _extendAlignmentImpl(align, std::numeric_limits<TScoreValue>::min(), hSeq, vSeq, positions, direction, 0, 0, xDrop,
                                 scoreScheme, False(), True());
 }
 
@@ -600,7 +600,7 @@ extendAlignment(Align<TStringInfix, TAlignSpec> & align,
                 TScoreValue const & xDrop,
                 Score<TScoreValue, TScoreSpec> const & scoreScheme)
 {
-    return _extendAlignmentImpl(align, minValue<TScoreValue>(), hSeq, vSeq, positions, direction, lowerDiag, upperDiag,
+    return _extendAlignmentImpl(align, std::numeric_limits<TScoreValue>::min(), hSeq, vSeq, positions, direction, lowerDiag, upperDiag,
                                 xDrop, scoreScheme, True(), True());
 }
 
diff --git a/include/seqan/align_extend/align_extend_base.h b/include/seqan/align_extend/align_extend_base.h
index 336daed..9823829 100644
--- a/include/seqan/align_extend/align_extend_base.h
+++ b/include/seqan/align_extend/align_extend_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -86,10 +86,10 @@ struct IsFreeEndGap_<AlignExtend_<TSpec>, DPLastColumn> : True
 // Class DPMetaColumn_                                             [FullColumn]
 // ----------------------------------------------------------------------------
 
-template <typename TSpec, typename TGapCosts, typename TTraceback,
+template <typename TSpec, typename TGapCosts, typename TTraceback, typename TExecPolicy,
           typename TColumnType>
 struct DPMetaColumn_<DPProfile_<AlignExtend_<TSpec>, TGapCosts,
-                                TTraceback>,
+                                TTraceback, TExecPolicy>,
                      MetaColumnDescriptor<TColumnType, FullColumn> >
 {
 
@@ -116,10 +116,10 @@ struct DPMetaColumn_<DPProfile_<AlignExtend_<TSpec>, TGapCosts,
 // Class DPMetaColumn_                                       [PartialColumnTop]
 // ----------------------------------------------------------------------------
 
-template <typename TSpec, typename TGapCosts, typename TTraceback,
+template <typename TSpec, typename TGapCosts, typename TTraceback, typename TExecPolicy,
           typename TColumnType>
 struct DPMetaColumn_<DPProfile_<AlignExtend_<TSpec>, TGapCosts,
-                                TTraceback>,
+                                TTraceback, TExecPolicy>,
                      MetaColumnDescriptor<TColumnType, PartialColumnTop> >
 {
 
@@ -145,10 +145,10 @@ struct DPMetaColumn_<DPProfile_<AlignExtend_<TSpec>, TGapCosts,
 // Class DPMetaColumn_                                    [PartialColumnMiddle]
 // ----------------------------------------------------------------------------
 
-template <typename TSpec, typename TGapCosts, typename TTraceback,
+template <typename TSpec, typename TGapCosts, typename TTraceback, typename TExecPolicy,
           typename TColumnType>
 struct DPMetaColumn_<DPProfile_<AlignExtend_<TSpec>, TGapCosts,
-                                TTraceback>,
+                                TTraceback, TExecPolicy>,
                      MetaColumnDescriptor<TColumnType, PartialColumnMiddle> >
 {
     typedef typename If<IsSameType<TColumnType,
@@ -173,10 +173,10 @@ struct DPMetaColumn_<DPProfile_<AlignExtend_<TSpec>, TGapCosts,
 // Class DPMetaColumn_                                    [PartialColumnBottom]
 // ----------------------------------------------------------------------------
 
-template <typename TSpec, typename TGapCosts, typename TTraceback,
+template <typename TSpec, typename TGapCosts, typename TTraceback, typename TExecPolicy,
           typename TColumnType>
 struct DPMetaColumn_<DPProfile_<AlignExtend_<TSpec>, TGapCosts,
-                                TTraceback>,
+                                TTraceback, TExecPolicy>,
                      MetaColumnDescriptor<TColumnType, PartialColumnBottom> >
 {
     typedef typename If<IsSameType<TColumnType,
diff --git a/include/seqan/align_extend/dp_scout_xdrop.h b/include/seqan/align_extend/dp_scout_xdrop.h
index 8331f22..a18ea74 100644
--- a/include/seqan/align_extend/dp_scout_xdrop.h
+++ b/include/seqan/align_extend/dp_scout_xdrop.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -68,14 +68,14 @@ public:
     TScoreValue columnMax;
 
     DPScoutState_() :
-        terminationThreshold(MaxValue<TScoreValue>::VALUE),
-        columnMax(MinValue<TScoreValue>::VALUE)
+        terminationThreshold(std::numeric_limits<TScoreValue>::max()),
+        columnMax(std::numeric_limits<TScoreValue>::min())
     {
     }
 
     DPScoutState_(TScoreValue const & _terminationThreshold) :
         terminationThreshold(_terminationThreshold),
-        columnMax(MinValue<TScoreValue>::VALUE)
+        columnMax(std::numeric_limits<TScoreValue>::min())
     {
     }
 };
@@ -131,7 +131,7 @@ _scoutBestScore(DPScout_<TDPCell, Terminator_<XDrop_<TDPCellValue> > > & dpScout
     typedef typename Value<TDPCell>::Type TScoreValue;
     typedef XDrop_<TScoreValue> TXDrop;
     typedef DPScout_<TDPCell, Terminator_<TXDrop> > TDPScout;
-    typedef typename TDPScout::TParent TParent;
+    typedef typename TDPScout::TBase TParent;
 
     // global maximum
     _scoutBestScore(static_cast<TParent &>( dpScout ), activeCell, navigator);
@@ -156,7 +156,7 @@ _scoutBestScore(DPScout_<TDPCell, Terminator_<XDrop_<TDPCellValue> > > & dpScout
     if (_scoreOfCell(dpScout._maxScore) - dpScout.state->columnMax >= dpScout.state->terminationThreshold)
         terminateScout(dpScout);
     else // reset columMax at end of column
-        dpScout.state->columnMax = MinValue<TScoreValue>::VALUE;
+        dpScout.state->columnMax = std::numeric_limits<TScoreValue>::min();
 }
 
 // ----------------------------------------------------------------------------
@@ -164,16 +164,18 @@ _scoutBestScore(DPScout_<TDPCell, Terminator_<XDrop_<TDPCellValue> > > & dpScout
 // ----------------------------------------------------------------------------
 
 // Computes the score and tracks it if enabled.
-template <typename TDPScout, typename TTraceMatrixNavigator, typename TScoreValue, typename TGapCosts,
+template <typename TDPScout, typename TTraceMatrixNavigator,
+          typename TDPCell,
+          typename TScoreValue, typename TGapCosts,
           typename TSequenceHValue, typename TSequenceVValue, typename TScoringScheme, typename TColumnDescriptor,
           typename TCellDescriptor, typename TTraceback>
 inline void
 _computeCell(TDPScout & scout,
              TTraceMatrixNavigator & traceMatrixNavigator,
-             DPCell_<TScoreValue, TGapCosts> & activeCell,
-             DPCell_<TScoreValue, TGapCosts> const & previousDiagonal,
-             DPCell_<TScoreValue, TGapCosts> const & previousHorizontal,
-             DPCell_<TScoreValue, TGapCosts> const & previousVertical,
+             TDPCell & current,
+             TDPCell & diagonal,
+             TDPCell const & horizontal,
+             TDPCell & vertical,
              TSequenceHValue const & seqHVal,
              TSequenceVValue const & seqVVal,
              TScoringScheme const & scoringScheme,
@@ -185,7 +187,7 @@ _computeCell(TDPScout & scout,
     typedef DPProfile_<AlignExtend_<XDrop_<TScoreValue> >, TGapCosts, TTraceback> TDPProfile;
     typedef DPMetaColumn_<TDPProfile, TColumnDescriptor> TMetaColumn;
 
-    assignValue(traceMatrixNavigator, _computeScore(activeCell, previousDiagonal, previousHorizontal, previousVertical,
+    assignValue(traceMatrixNavigator, _computeScore(current, diagonal, horizontal, vertical,
                                                     seqHVal, seqVVal, scoringScheme,
                                                     typename RecursionDirection_<TMetaColumn, TCellDescriptor>::Type(),
                                                     TDPProfile()));
@@ -196,8 +198,9 @@ _computeCell(TDPScout & scout,
         // the following is the only change to the regular _computeCell:
         // for the evaluation of the termination criterium we treat
         // all lastCells as lastRows
+        _setVerticalScoreOfCell(current, _verticalScoreOfCell(vertical));
         typedef typename IsSameType<TCellDescriptor, LastCell>::Type TIsLastRow;
-        _scoutBestScore(scout, activeCell, traceMatrixNavigator, TIsLastColumn(), TIsLastRow());
+        _scoutBestScore(scout, current, traceMatrixNavigator, TIsLastColumn(), TIsLastRow());
     }
 }
 
diff --git a/include/seqan/bam_io.h b/include/seqan/align_parallel.h
similarity index 58%
copy from include/seqan/bam_io.h
copy to include/seqan/align_parallel.h
index f9f9842..8fd72b4 100644
--- a/include/seqan/bam_io.h
+++ b/include/seqan/align_parallel.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -29,68 +29,74 @@
 // DAMAGE.
 //
 // ==========================================================================
-// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
-// Author: David Weese <david.weese at fu-berlin.de>
-// ==========================================================================
-// Facade header for module bam_io.
+// Author: Rene Rahn <rene.rahn at fu-berlin.de>
 // ==========================================================================
 
-#ifndef INCLUDE_SEQAN_BAM_IO_H_
-#define INCLUDE_SEQAN_BAM_IO_H_
+#ifndef INCLUDE_SEQAN_ALIGN_PARALLEL_H_
+#define INCLUDE_SEQAN_ALIGN_PARALLEL_H_
 
-// ===========================================================================
-// Prerequisites.
-// ===========================================================================
+// ============================================================================
+// STD Prerequisites
+// ============================================================================
 
-#include <seqan/basic.h>
-#include <seqan/file.h>
-#include <seqan/sequence.h>
-#include <seqan/stream.h>
-#include <seqan/align.h>
-#include <seqan/misc/name_store_cache.h>
+#if SEQAN_DEBUG_ENABLED
+#include <typeinfo>
+#include <cxxabi.h>
+#include <stdlib.h>
+#endif
 
-// ===========================================================================
-// Data Structures & Conversion.
-// ===========================================================================
+#include <type_traits>
+#include <utility>
+#include <vector>
 
-#include <seqan/bam_io/bam_io_context.h>
-#include <seqan/bam_io/cigar.h>
-#include <seqan/bam_io/bam_alignment_record.h>
-#include <seqan/bam_io/bam_header_record.h>
-#include <seqan/bam_io/bam_sam_conversion.h>
-#include <seqan/bam_io/bam_tags_dict.h>
+// ============================================================================
+// SeqAn Prerequisites
+// ============================================================================
 
-// ===========================================================================
-// Actual I/O Code.
-// ===========================================================================
+#include <seqan/basic.h>
+#include <seqan/simd.h>
+#include <seqan/align.h>
+#include <seqan/parallel.h>
 
-#include <seqan/bam_io/read_sam.h>
-#include <seqan/bam_io/write_sam.h>
-#include <seqan/bam_io/read_bam.h>
-#include <seqan/bam_io/write_bam.h>
+// ============================================================================
+// Parallel DP Prerequisites and Adaptors
+// ============================================================================
 
-// ===========================================================================
-// Easy BAM / SAM I/O.
-// ===========================================================================
+#include <seqan/align_parallel/dp_parallel_execution_policies.h>
+#include <seqan/align_parallel/dp_traits.h>
+#include <seqan/align_parallel/dp_kernel_adaptor.h>
+#include <seqan/align_parallel/dp_settings.h>
+#include <seqan/align_parallel/dp_parallel_scout.h>
+#ifdef SEQAN_SIMD_ENABLED
+#include <seqan/align_parallel/dp_parallel_scout_simd.h>
+#endif
 
-#include <seqan/bam_io/bam_file.h>
+// ============================================================================
+// Wavefront  Task
+// ============================================================================
 
-// ===========================================================================
-// Utility Routines.
-// ===========================================================================
+#include <seqan/align_parallel/wavefront_task_scheduler.h>
+#include <seqan/align_parallel/wavefront_task_queue.h>
+#include <seqan/align_parallel/wavefront_task_event.h>
+#include <seqan/align_parallel/wavefront_task_util.h>
+#include <seqan/align_parallel/wavefront_task.h>
+#include <seqan/align_parallel/wavefront_task_executor.h>
 
-#include <seqan/bam_io/bam_alignment_record_util.h>
+// ============================================================================
+// Wavefront Alignment Tasks
+// ============================================================================
 
-// Not included by default, requires C++11
-//#include <seqan/bam_io/bam_scanner_cache.h>
+#include <seqan/align_parallel/wavefront_alignment_scheduler.h>
+#include <seqan/align_parallel/wavefront_alignment_result.h>     // TODO(rrahn): rename! refactor!
+#include <seqan/align_parallel/wavefront_alignment_thread_local_storage.h>
+#include <seqan/align_parallel/wavefront_alignment_executor.h>
+#include <seqan/align_parallel/wavefront_alignment_task.h>
 
-// ===========================================================================
-// BAM Index Related.
-// ===========================================================================
+// ============================================================================
+// Interfaces
+// ============================================================================
 
-// BAM indices are only available when ZLIB is available.
-#if SEQAN_HAS_ZLIB
-#include <seqan/bam_io/bam_index_bai.h>
-#endif  // #if SEQAN_HAS_ZLIB
+#include <seqan/align_parallel/async_wave_execution_interface.h>
+#include <seqan/align_parallel/parallel_align_interface.h>
 
-#endif  // INCLUDE_SEQAN_BAM_IO_H_
+#endif  // #ifndef INCLUDE_SEQAN_ALIGN_PARALLEL_H_
diff --git a/include/seqan/align_parallel/async_wave_execution_interface.h b/include/seqan/align_parallel/async_wave_execution_interface.h
new file mode 100644
index 0000000..3ebb98a
--- /dev/null
+++ b/include/seqan/align_parallel/async_wave_execution_interface.h
@@ -0,0 +1,252 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Rene Rahn <rene.rahn at fu-berlin.de>
+// ==========================================================================
+
+#ifndef INCLUDE_SEQAN_ALIGN_PARALLEL_ASYNC_WAVE_EXECUTION_INTERFACE_H_
+#define INCLUDE_SEQAN_ALIGN_PARALLEL_ASYNC_WAVE_EXECUTION_INTERFACE_H_
+
+namespace seqan
+{
+namespace impl
+{
+
+// ============================================================================
+// Forwards
+// ============================================================================
+
+// ============================================================================
+// Tags, Classes, Enums
+// ============================================================================
+
+/*
+ * @class AsyncWaveAlignExecutor
+ * @brief Executor of the wave-front alignment mode with no SIMD vectorization.
+ * @headerfile <seqan/align_parallel.h>
+ *
+ * Manges shared data for the wave-front execution before executing the alignments.
+ */
+template <typename TSeqH, typename TSeqV, typename TSettings>
+class AsyncWaveAlignExecutor
+{
+public:
+
+    using TAlignmentTask = WavefrontAlignmentTask<TSeqH, TSeqV, TSettings>;
+    using TThreadLocal   = typename WavefrontAlignmentTaskConfig<TSettings>::TThreadLocal;
+    using TStorage       = EnumerableThreadLocal<TThreadLocal, CountingThreadLocalManager>;
+    using TExecutor      = WavefrontAlignmentExecutor<WavefrontTaskScheduler, TStorage>;
+
+    TSettings                                   _settings;
+    // Initialize the alignment scheduler.
+    WavefrontAlignmentScheduler                 _alignScheduler;
+
+    TStorage                                    _threadLocalStorage{};
+    TExecutor                                   _executor{};
+    unsigned                                    _alignCounter{0};
+    unsigned                                    _blockSize{};
+
+    template <typename TSpec>
+    AsyncWaveAlignExecutor(TSettings settings,
+                           ExecutionPolicy<WavefrontAlignment<TSpec>, Serial> const & execPolicy) :
+        _settings(std::move(settings)),
+        _alignScheduler(parallelAlignments(execPolicy), numThreads(execPolicy)),
+        _threadLocalStorage(TThreadLocal{parallelAlignments(execPolicy)}),
+        _blockSize(blockSize(execPolicy))
+    {
+        _executor.ptrTaskScheduler = &taskScheduler(_alignScheduler);
+        _executor.ptrThreadLocal   = &_threadLocalStorage;
+        setCount(storageManager(_threadLocalStorage), numThreads(execPolicy));
+    }
+};
+
+/*
+ * @fn AsyncWaveAlignExecutor#submit
+ * @brief Submits a new alignment job asynchronosly.
+ */
+template <typename ...TArgs,
+          typename TSeqH,
+          typename TSeqV,
+          typename TCallable>
+inline void
+submit(AsyncWaveAlignExecutor<TArgs...> & me,
+       TSeqH const & seqH,
+       TSeqV const & seqV,
+       TCallable && callback)
+{
+    using TAlignTask = typename AsyncWaveAlignExecutor<TArgs...>::TAlignmentTask;
+
+    std::function<void(uint16_t)> f =
+        [&, func = TAlignTask{me._alignCounter++, seqH, seqV, me._settings, me._blockSize}](uint16_t id) mutable
+        {
+            func(id, me._executor, std::forward<TCallable>(callback));
+        };
+    scheduleTask(me._alignScheduler, f);
+}
+
+/*
+ * @fn AsyncWaveAlignExecutor#wait
+ * @brief Explicit barrier to wait for all submitted jobs to be finished.
+ */
+template <typename ...TArgs>
+inline void
+wait(AsyncWaveAlignExecutor<TArgs...> & me)
+{
+    notify(me._alignScheduler);
+    wait(me._alignScheduler);
+}
+
+/*
+ * @class AsyncWaveAlignExecutorSimd
+ * @brief Executor of the wave-front alignment mode with SIMD vectorization.
+ * @headerfile <seqan/align_parallel.h>
+ *
+ * Manges shared data for the wave-front execution before executing the alignments.
+ */
+#ifdef SEQAN_SIMD_ENABLED
+template <typename TSeqH, typename TSeqV, typename TSettings, typename TWaveSpec>
+class AsyncWaveAlignExecutorSimd
+{
+public:
+
+    // Translate dp settings into simd settings.
+    using TSimdSettings = SimdDPSettings<TSettings, TWaveSpec>;
+
+    using TAlignmentTask = WavefrontAlignmentTask<TSeqH, TSeqV, TSimdSettings,
+                                                  WavefrontAlignmentSimdTaskConfig<TSimdSettings>>;
+    using TWavefrontTask = WavefrontTask<typename TAlignmentTask::TTaskContext>;
+    using TSimdTaskQueue = WavefrontTaskQueue<TWavefrontTask, LENGTH<typename TSimdSettings::TScoreValueSimd>::VALUE>;
+
+    using TThreadLocal  = typename WavefrontAlignmentSimdTaskConfig<TSimdSettings>::TThreadLocal;
+    using TStorage      = EnumerableThreadLocal<TThreadLocal, CountingThreadLocalManager>;
+    using TExecutor     = WavefrontAlignmentExecutor<WavefrontTaskScheduler, TStorage>;
+
+
+    TSimdSettings                               _settings;
+    // Initialize the alignment scheduler.
+    WavefrontAlignmentScheduler                 _alignScheduler;
+
+    TStorage                                    _threadLocalStorage;
+    TExecutor                                   _executor{};
+    TSimdTaskQueue                              _simdTaskQueue{};
+    unsigned                                    _alignCounter{0};
+    unsigned                                    _blockSize{};
+
+    template <typename TSpec>
+    AsyncWaveAlignExecutorSimd(TSettings const & settings,
+                               ExecutionPolicy<WavefrontAlignment<TSpec>, Vectorial> const & execPolicy) :
+        _settings(settings.scoringScheme),
+        _alignScheduler(parallelAlignments(execPolicy), numThreads(execPolicy)),
+        _threadLocalStorage(TThreadLocal{parallelAlignments(execPolicy)}),
+        _blockSize(blockSize(execPolicy))
+    {
+        _executor.ptrTaskScheduler = &taskScheduler(_alignScheduler);
+        _executor.ptrThreadLocal   = &_threadLocalStorage;
+        setCount(storageManager(_threadLocalStorage), numThreads(execPolicy));
+    }
+};
+
+/*
+ * @fn AsyncWaveAlignExecutorSimd#submit
+ * @brief Submits a new alignment job asynchronosly.
+ */
+template <typename ...TArgs,
+          typename TSeqH,
+          typename TSeqV,
+          typename TCallable>
+inline void
+submit(AsyncWaveAlignExecutorSimd<TArgs...> & me,
+       TSeqH const & seqH,
+       TSeqV const & seqV,
+       TCallable && callback)
+{
+    using TAlignTask = typename AsyncWaveAlignExecutorSimd<TArgs...>::TAlignmentTask;
+
+    // Continuator for calling the alignment instance functor.
+    std::function<void(uint16_t)> f =
+        [&, func = TAlignTask{me._alignCounter++, seqH, seqV, me._settings, me._blockSize}](uint16_t id) mutable
+        {
+            func(id, me._executor, me._simdTaskQueue, std::forward<TCallable>(callback));
+        };
+    scheduleTask(me._alignScheduler, f);
+}
+
+/*
+ * @fn AsyncWaveAlignExecutorSimd#wait
+ * @brief Explicit barrier to wait for all submitted jobs to be finished.
+ */
+template <typename ...TArgs>
+inline void
+wait(AsyncWaveAlignExecutorSimd<TArgs...> & me)
+{
+    notify(me._alignScheduler);
+    wait2(me._alignScheduler, me._simdTaskQueue);
+}
+#endif // SEQAN_SIMD_ENABLED
+
+/*
+ * @fn alignExecBatch
+ * @brief Global interface for scheduling and running all alignment jobs with wave-front model.
+ */
+template <typename TSpec, typename TSimdSpec,
+          typename TSetH,
+          typename TSetV,
+          typename TSettings,
+          typename TCallable>
+inline void
+alignExecBatch(ExecutionPolicy<WavefrontAlignment<TSpec>, TSimdSpec> const & execPolicy,
+               TSetH const & setH,
+               TSetV const & setV,
+               TSettings const & settings,
+               TCallable && callback)
+{
+    using TSeqH = typename Value<TSetH const>::Type;
+    using TSeqV = typename Value<TSetV const>::Type;
+
+#ifdef SEQAN_SIMD_ENABLED
+    using TExecutor = std::conditional_t<std::is_same<TSimdSpec, Vectorial>::value,
+                                         AsyncWaveAlignExecutorSimd<TSeqH, TSeqV, TSettings, TSpec>,
+                                         AsyncWaveAlignExecutor<TSeqH, TSeqV, TSettings>>;
+#else
+    using TExecutor = AsyncWaveAlignExecutor<TSeqH, TSeqV, TSettings>;
+#endif
+    TExecutor executor(settings, execPolicy);
+
+    for (size_t i = 0u; i < length(setH); ++i)
+    {
+        submit(executor, setH[i], setV[i], std::forward<TCallable>(callback));
+    }
+    wait(executor);
+}
+
+}  // namespace impl
+}  // namespace seqan
+#endif  // INCLUDE_SEQAN_ALIGN_PARALLEL_ASYNC_WAVE_EXECUTION_INTERFACE_H_
diff --git a/include/seqan/align_parallel/dp_kernel_adaptor.h b/include/seqan/align_parallel/dp_kernel_adaptor.h
new file mode 100644
index 0000000..e4a3eb8
--- /dev/null
+++ b/include/seqan/align_parallel/dp_kernel_adaptor.h
@@ -0,0 +1,343 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Rene Rahn <rene.rahn at fu-berlin.de>
+// ==========================================================================
+
+#ifndef INCLUDE_SEQAN_ALIGN_PARALLEL_DP_KERNEL_ADAPTOR_H_
+#define INCLUDE_SEQAN_ALIGN_PARALLEL_DP_KERNEL_ADAPTOR_H_
+
+namespace seqan
+{
+
+// ============================================================================
+// Forwards
+// ============================================================================
+
+// ============================================================================
+// Tags, Classes, Enums
+// ============================================================================
+
+// ============================================================================
+// Metafunctions
+// ============================================================================
+
+template <typename TCond1, typename TCond2>
+struct CorrectLastColumn_ : False
+{};
+
+template <>
+struct CorrectLastColumn_<True, True> : True
+{};
+
+template <typename TCond1, typename TCond2>
+struct CorrectLastRow_ : False
+{};
+
+template <>
+struct CorrectLastRow_<True, True> : True
+{};
+
+// ============================================================================
+// Functions
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// Function _computeCell(); InitialCol;
+// ----------------------------------------------------------------------------
+
+// The _computeCell function is the basic interface that is called to comute
+// the score for each cell and to store the corresponding traceback.
+// The MetaColumnDescriptor and the CellDescriptor describe which cell in the dp matrix
+// is computed. We use this information to overload the functions in order
+// to initialize from the passed buffer and to store the last row/column in the buffer.
+
+// Vertical initialization values are copied from buffer.
+template <typename TDPScout,
+          typename TTraceMatrixNavigator,
+          typename TDPCell,
+          typename TSequenceHValue,
+          typename TSequenceVValue,
+          typename TScoringScheme,
+          typename TCellDescriptor,
+          typename TAlgo, typename TGapCosts, typename TTraceConfig>
+inline void
+_computeCell(TDPScout & scout,
+             TTraceMatrixNavigator & traceMatrixNavigator,
+             TDPCell & current,
+             TDPCell & /*cacheDiag*/,
+             TDPCell const & /*cacheHori*/,
+             TDPCell & /*cacheVert*/,
+             TSequenceHValue const & /*seqHVal*/,
+             TSequenceVValue const & /*seqVVal*/,
+             TScoringScheme const & /*scoringScheme*/,
+             MetaColumnDescriptor<DPInitialColumn, FullColumn> const &,
+             TCellDescriptor const &,   // One of FirstCell, InnerCell or LastCell.
+             DPProfile_<TAlgo, TGapCosts, TTraceConfig, Parallel> const &)
+{
+    typedef DPProfile_<TAlgo, TGapCosts, TTraceConfig, Parallel>                            TDPProfile;
+    typedef DPMetaColumn_<TDPProfile, MetaColumnDescriptor<DPInitialColumn, FullColumn> >   TMetaColumn;
+
+    current = (*scout.state.ptrVerBuffer)[scout.verticalPos].i1;
+    assignValue(traceMatrixNavigator, (*scout.state.ptrVerBuffer)[scout.verticalPos].i2);
+
+    if (TrackingEnabled_<TMetaColumn, TCellDescriptor>::VALUE)
+    {
+        _scoutBestScore(scout, current, traceMatrixNavigator, False(), False());
+    }
+}
+
+// ----------------------------------------------------------------------------
+// Function _computeCell(); InnerCol; FirstCell
+// ----------------------------------------------------------------------------
+
+// Horizontal initialization values are copied from buffer for all first cells.
+template <typename TDPScout,
+          typename TTraceMatrixNavigator,
+          typename TDPCell,
+          typename TSequenceHValue,
+          typename TSequenceVValue,
+          typename TScoringScheme,
+          typename TAlgo, typename TGapCosts, typename TTraceConfig>
+inline void
+_computeCell(TDPScout & scout,
+             TTraceMatrixNavigator & traceMatrixNavigator,
+             TDPCell & current,
+             TDPCell & cacheDiag,
+             TDPCell const & cacheHori,
+             TDPCell & cacheVert,
+             TSequenceHValue const & /*seqHVal*/,
+             TSequenceVValue const & /*seqVVal*/,
+             TScoringScheme const & /*scoringScheme*/,
+             MetaColumnDescriptor<DPInnerColumn, FullColumn> const &,
+             FirstCell const &,   // One of FirstCell, InnerCell or LastCell.
+             DPProfile_<TAlgo, TGapCosts, TTraceConfig, Parallel> const &)
+{
+    _scoreOfCell(cacheDiag) = _scoreOfCell(cacheHori);
+    current = (*scout.state.ptrHorBuffer)[scout.horizontalPos - 1].i1;
+    cacheVert = current;
+    assignValue(traceMatrixNavigator, (*scout.state.ptrHorBuffer)[scout.horizontalPos - 1].i2);
+}
+
+// ----------------------------------------------------------------------------
+// Function _computeCell(); InnerCol; LastCell
+// ----------------------------------------------------------------------------
+
+// Values of last call are copied into the horizontal buffer for initializing next tile below.
+template <typename TDPScout,
+          typename TTraceMatrixNavigator,
+          typename TDPCell,
+          typename TSequenceHValue,
+          typename TSequenceVValue,
+          typename TScoringScheme,
+          typename TAlgo, typename TGapCosts, typename TTraceConfig>
+inline void
+_computeCell(TDPScout & scout,
+             TTraceMatrixNavigator & traceMatrixNavigator,
+             TDPCell & current,
+             TDPCell & cacheDiag,
+             TDPCell const & cacheHori,
+             TDPCell & cacheVert,
+             TSequenceHValue const & seqHVal,
+             TSequenceVValue const & seqVVal,
+             TScoringScheme const & scoringScheme,
+             MetaColumnDescriptor<DPInnerColumn, FullColumn> const &,
+             LastCell const & /*cellDescriptor*/,
+             DPProfile_<TAlgo, TGapCosts, TTraceConfig, Parallel> const &)
+{
+    typedef DPProfile_<TAlgo, TGapCosts, TTraceConfig, Parallel>                            TDPProfile;
+    typedef DPMetaColumn_<TDPProfile, MetaColumnDescriptor<DPInnerColumn, FullColumn> >     TMetaColumn;
+
+    assignValue(traceMatrixNavigator,
+                _computeScore(current, cacheDiag, cacheHori, cacheVert, seqHVal, seqVVal,
+                              scoringScheme, typename RecursionDirection_<TMetaColumn, LastCell>::Type(),
+                              TDPProfile()));
+    // Copy values into horizontal buffer for the tile below this tile in vertical direction.
+    // TODO(rrahn): We need to do this only for affine gaps?
+    _setVerticalScoreOfCell(current, _verticalScoreOfCell(cacheVert));
+    (*scout.state.ptrHorBuffer)[scout.horizontalPos - 1].i1 = current;
+    if (IsTracebackEnabled_<TTraceConfig>::VALUE)
+    {
+        (*scout.state.ptrHorBuffer)[scout.horizontalPos - 1].i2 = value(traceMatrixNavigator);
+    }
+
+    if (TrackingEnabled_<TMetaColumn, LastCell>::VALUE)
+    {
+        _scoutBestScore(scout, current, traceMatrixNavigator, False(), True());
+    }
+}
+
+
+// ----------------------------------------------------------------------------
+// Function _computeCell(); FinalCol; FirstCell
+// ----------------------------------------------------------------------------
+
+// Horizontal initialization values are copied from buffer for all first cells.
+// Vertical buffer is filled with value.
+template <typename TDPScout,
+          typename TTraceMatrixNavigator,
+          typename TDPCell,
+          typename TSequenceHValue,
+          typename TSequenceVValue,
+          typename TScoringScheme,
+          typename TAlgo, typename TGapCosts, typename TTraceConfig>
+inline void
+_computeCell(TDPScout & scout,
+             TTraceMatrixNavigator & traceMatrixNavigator,
+             TDPCell & current,
+             TDPCell & cacheDiag,
+             TDPCell const & cacheHori,
+             TDPCell & cacheVert,
+             TSequenceHValue const & /*seqHVal*/,
+             TSequenceVValue const & /*seqVVal*/,
+             TScoringScheme const & /*scoringScheme*/,
+             MetaColumnDescriptor<DPFinalColumn, FullColumn> const &,
+             FirstCell const &,   // One of FirstCell, InnerCell or LastCell.
+             DPProfile_<TAlgo, TGapCosts, TTraceConfig, Parallel> const &)
+{
+    typedef DPProfile_<TAlgo, TGapCosts, TTraceConfig, Parallel>                            TDPProfile;
+    typedef DPMetaColumn_<TDPProfile, MetaColumnDescriptor<DPFinalColumn, FullColumn> >     TMetaColumn;
+
+    // cache previous diagonal.
+    _scoreOfCell(cacheDiag) = _scoreOfCell(cacheHori);
+    current =
+        front(*scout.state.ptrVerBuffer).i1 = (*scout.state.ptrHorBuffer)[scout.horizontalPos - 1].i1;  // Copy horizontal buffer value in active cell and in
+    assignValue(traceMatrixNavigator, (*scout.state.ptrHorBuffer)[scout.horizontalPos - 1].i2);
+    cacheVert = current;
+    if (IsTracebackEnabled_<TTraceConfig>::VALUE)
+    {
+        front(*scout.state.ptrVerBuffer).i2 = value(traceMatrixNavigator);   // Store trace value in vertical buffer.
+    }
+
+    if (TrackingEnabled_<TMetaColumn, FirstCell>::VALUE)
+    {
+        _scoutBestScore(scout, current, traceMatrixNavigator, True(), False());
+    }
+}
+
+// ----------------------------------------------------------------------------
+// Function _computeCell(); FinalCol, InnerCell;
+// ----------------------------------------------------------------------------
+
+// Stores computed values in vertical buffer for initializing next tile right of the current.
+template <typename TDPScout,
+          typename TTraceMatrixNavigator,
+          typename TDPCell,
+          typename TSequenceHValue,
+          typename TSequenceVValue,
+          typename TScoringScheme,
+          typename TAlgo, typename TGapCosts, typename TTraceConfig>
+inline void
+_computeCell(TDPScout & scout,
+             TTraceMatrixNavigator & traceMatrixNavigator,
+             TDPCell & current,
+             TDPCell & cacheDiag,
+             TDPCell const & cacheHori,
+             TDPCell & cacheVert,
+             TSequenceHValue const & seqHVal,
+             TSequenceVValue const & seqVVal,
+             TScoringScheme const & scoringScheme,
+             MetaColumnDescriptor<DPFinalColumn, FullColumn> const &,
+             InnerCell const &,
+             DPProfile_<TAlgo, TGapCosts, TTraceConfig, Parallel> const &)
+{
+    typedef DPProfile_<TAlgo, TGapCosts, TTraceConfig, Parallel>                            TDPProfile;
+    typedef DPMetaColumn_<TDPProfile, MetaColumnDescriptor<DPFinalColumn, FullColumn> >     TMetaColumn;
+
+    assignValue(traceMatrixNavigator,
+                _computeScore(current, cacheDiag, cacheHori, cacheVert, seqHVal, seqVVal,
+                              scoringScheme, typename RecursionDirection_<TMetaColumn, InnerCell>::Type(),
+                              TDPProfile()));
+    // Store values in vertical buffer.
+    _setVerticalScoreOfCell(current, _verticalScoreOfCell(cacheVert));
+    (*scout.state.ptrVerBuffer)[scout.verticalPos].i1 = current;
+    if (IsTracebackEnabled_<TTraceConfig>::VALUE)
+    {
+        (*scout.state.ptrVerBuffer)[scout.verticalPos].i2 = value(traceMatrixNavigator);
+    }
+
+    if (TrackingEnabled_<TMetaColumn, InnerCell>::VALUE)
+    {
+        _scoutBestScore(scout, current, traceMatrixNavigator, True(), False());
+    }
+}
+
+// ----------------------------------------------------------------------------
+// Function _computeCell(); FinalCol, LastCell;
+// ----------------------------------------------------------------------------
+
+// Stores computed values in vertical buffer for initializing next tile right of the current.
+// Stores computed values in horizontal buffer for initializing next tile below.
+template <typename TDPScout,
+          typename TTraceMatrixNavigator,
+          typename TDPCell,
+          typename TSequenceHValue,
+          typename TSequenceVValue,
+          typename TScoringScheme,
+          typename TAlgo, typename TGapCosts, typename TTraceConfig>
+inline void
+_computeCell(TDPScout & scout,
+             TTraceMatrixNavigator & traceMatrixNavigator,
+             TDPCell & current,
+             TDPCell & cacheDiag,
+             TDPCell const & cacheHori,
+             TDPCell & cacheVert,
+             TSequenceHValue const & seqHVal,
+             TSequenceVValue const & seqVVal,
+             TScoringScheme const & scoringScheme,
+             MetaColumnDescriptor<DPFinalColumn, FullColumn> const &,
+             LastCell const &,
+             DPProfile_<TAlgo, TGapCosts, TTraceConfig, Parallel> const &)
+{
+    typedef DPProfile_<TAlgo, TGapCosts, TTraceConfig, Parallel>                            TDPProfile;
+    typedef DPMetaColumn_<TDPProfile, MetaColumnDescriptor<DPFinalColumn, FullColumn> >     TMetaColumn;
+
+    assignValue(traceMatrixNavigator,
+                _computeScore(current, cacheDiag, cacheHori, cacheVert, seqHVal, seqVVal,
+                              scoringScheme, typename RecursionDirection_<TMetaColumn, LastCell>::Type(),
+                              TDPProfile()));
+    // Store values in vertical and horizontal buffer
+    _setVerticalScoreOfCell(current, _verticalScoreOfCell(cacheVert));
+    (*scout.state.ptrHorBuffer)[scout.horizontalPos - 1].i1 = (*scout.state.ptrVerBuffer)[scout.verticalPos].i1 = current;
+    if (IsTracebackEnabled_<TTraceConfig>::VALUE)
+    {
+        (*scout.state.ptrHorBuffer)[scout.horizontalPos - 1].i2 =
+            (*scout.state.ptrVerBuffer)[scout.verticalPos].i2 = value(traceMatrixNavigator);
+    }
+    if (TrackingEnabled_<TMetaColumn, LastCell>::VALUE)
+    {
+        _scoutBestScore(scout, current, traceMatrixNavigator, True(), True());
+    }
+}
+
+}  // namespace seqan
+
+#endif  // #ifndef INCLUDE_SEQAN_ALIGN_PARALLEL_DP_KERNEL_ADAPTOR_H_
diff --git a/include/seqan/align_parallel/dp_parallel_execution_policies.h b/include/seqan/align_parallel/dp_parallel_execution_policies.h
new file mode 100644
index 0000000..a2885ec
--- /dev/null
+++ b/include/seqan/align_parallel/dp_parallel_execution_policies.h
@@ -0,0 +1,174 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Rene Rahn <rene.rahn at fu-berlin.de>
+// ==========================================================================
+// Policies used for parallel alignment computation.
+// ==========================================================================
+
+#ifndef INCLUDE_SEQAN_ALIGN_PARALLEL_DP_PARALLEL_EXECUTION_PLOCIES_H_
+#define INCLUDE_SEQAN_ALIGN_PARALLEL_DP_PARALLEL_EXECUTION_PLOCIES_H_
+
+namespace seqan
+{
+// ============================================================================
+// Forwards
+// ============================================================================
+
+// ============================================================================
+// Tags, Classes, Enums
+// ============================================================================
+
+/*!
+ * @tag BlockOffsetOptimization
+ * @brief Optimization for vectorized wave-front execution model.
+ * @headerfile <seqan/align_parallel.h>
+ * @see WavefrontExecutionPolicy
+ */
+struct BlockOffsetOptimization_;
+using BlockOffsetOptimization = Tag<BlockOffsetOptimization_>;
+
+/*!
+ * @class WavefrontExecutionPolicy
+ * @headerfile <seqan/align_parallel.h>
+ * @extends ExecutionPolicy
+ * @brief Policy to select runtime execution mode for algorithms.
+ * @signature template<typename TWaveSpec, typename TVectorizationMode>
+ *            struct ExecutionPolicy<WavefrontAlignment<TWaveSpec>, TVectorizationMode>;
+ * @tparam TWaveSpec Type specializing the wave-front threading model.
+ *         Can be <tt>void</tt> (default) or @link BlockOffsetOptimization @endlink.
+ * @tparam TVectorizationMode Type specifying the vectorization model.
+ *         Can be @link ParallelismTags#Vectorial @endlink or @link ParallelismTags#Serial @endlink (default).
+ *
+ * Special execution policy for computing sequence alignments with wave-front parallelization strategy.
+ * In the wave-front execution the DP matrix is partitioned into blocks which can be executed
+ * in parallel along the minor diagonal of the DP matrix.
+ * The execution policy can be further specialized if used in combination with the @link ParallelismTags#Vectorial @endlink
+ * execution mode (see @link WavefrontExecutionPolicy @endlink).
+ *
+ * @section Vectorization
+ *
+ * In the vectorization mode, the blocks are gathered into SIMD registers.
+ * The @link BlockOffsetOptimization @endlink can be used to always ensure that <tt>sizeof(SIMD) / 2</tt> many blocks
+ * can be packed into one SIMD register.
+ * This requires, that the available instruction set supports 16 bit packed SIMD operations (e.g. SSE4, AVX2)
+ * and the score value type (@link Score @endlink) is bigger then 16 bit.
+ * In the default mode, the optimization is disabled and the number of packed alignment blocks is solely determined by
+ * the score value type passed to the algorithm as a parameter (e.g. see @link globalAlignmentScore @endlink).
+ */
+ template <typename TSpec = void>
+ struct WavefrontAlignment;
+
+template <typename TSpec, typename TVectorizationSpec>
+struct ExecutionPolicy<WavefrontAlignment<TSpec>, TVectorizationSpec> :
+    public ExecutionPolicy<Parallel, TVectorizationSpec>
+{
+    /*!
+     *@var size_t WavefrontExecutionPolicy::blockSize
+     * @brief The size of the blocks to use. Defaults to 100.
+     */
+    size_t blockSize{100};
+    /*!
+     * @var size_t WavefrontExecutionPolicy::parallelAlignments
+     * @brief Number of alignments scheduled concurrently. Defaults to <tt>std::thread::hardware_concurrency()</tt>.
+     */
+    size_t parallelAlignments{std::thread::hardware_concurrency()};
+};
+
+// ============================================================================
+// Metafunctions
+// ============================================================================
+
+// ============================================================================
+// Functions
+// ============================================================================
+
+/*!
+ * @fn WavefrontExecutionPolicy#blockSize
+ * @brief Getter for the current block size.
+ * @signature size_t blockSize(exec);
+ * @param[in] exec The wave-front execution policy to query.
+ */
+template <typename TSpec, typename TVectorizationSpec>
+inline auto
+blockSize(ExecutionPolicy<WavefrontAlignment<TSpec>, TVectorizationSpec> const & p)
+{
+    return p.blockSize;
+}
+
+/*!
+ * @fn WavefrontExecutionPolicy#setBlockSize
+ * @brief Setter for the current block size.
+ * @signature void setBlockSize(exec, bs);
+ * @param[in,out] exec The wave-front execution policy to update.
+ * @param[in] bs The new block size to set. Must be a positive integral number greater or equal than 5.
+ */
+template <typename TSpec, typename TVectorizationSpec>
+inline void
+setBlockSize(ExecutionPolicy<WavefrontAlignment<TSpec>, TVectorizationSpec> & p,
+             size_t const bs)
+{
+    SEQAN_ASSERT_GEQ(bs, static_cast<size_t>(5));
+    p.blockSize = bs;
+}
+
+/*!
+ * @fn WavefrontExecutionPolicy#parallelAlignments
+ * @brief Getter for the current number of alignments executed in parallel.
+ * @signature void parallelAlignments(exec);
+ * @param[in] exec The wave-front execution policy to update.
+ */
+template <typename TSpec, typename TVectorizationSpec>
+inline auto
+parallelAlignments(ExecutionPolicy<WavefrontAlignment<TSpec>, TVectorizationSpec> const & p)
+{
+    return p.parallelAlignments;
+}
+
+/*!
+ * @fn WavefrontExecutionPolicy#setParallelAlignments
+ * @brief Setter for the current number of alignments executed in parallel.
+ * @signature void setParallelAlignments(exec, pa);
+ * @param[in,out] exec The wave-front execution policy to update.
+ * @param[in] pa The number of alignments to execute in parallel. Must be a positive integral number greater than 0.
+ */
+template <typename TSpec, typename TVectorizationSpec>
+inline void
+setParallelAlignments(ExecutionPolicy<WavefrontAlignment<TSpec>, TVectorizationSpec> & p,
+                      size_t const pi)
+{
+    SEQAN_ASSERT_GT(pi, static_cast<size_t>(0));
+    p.parallelAlignments = pi;
+}
+
+}  // namespace seqan
+
+#endif  // INCLUDE_SEQAN_ALIGN_PARALLEL_DP_PARALLEL_EXECUTION_PLOCIES_H_
diff --git a/include/seqan/align_parallel/dp_parallel_scout.h b/include/seqan/align_parallel/dp_parallel_scout.h
new file mode 100644
index 0000000..58a238d
--- /dev/null
+++ b/include/seqan/align_parallel/dp_parallel_scout.h
@@ -0,0 +1,263 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Rene Rahn <rene.rahn at fu-berlin.de>
+// ==========================================================================
+
+#ifndef INCLUDE_SEQAN_DP_PARALLEL_DP_PARALLEL_SCOUT_H_
+#define INCLUDE_SEQAN_DP_PARALLEL_DP_PARALLEL_SCOUT_H_
+
+namespace seqan
+{
+
+// ============================================================================
+// Forwards
+// ============================================================================
+
+// ============================================================================
+// Tags, Classes, Enums
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// Class DPTileBuffer
+// ----------------------------------------------------------------------------
+
+// The structure owning the horizontal/vertical buffer.
+template <typename TDPCellBuff, typename TBuffer = String<TDPCellBuff> >
+struct DPTileBuffer
+{
+    TBuffer horizontalBuffer;
+    TBuffer verticalBuffer;
+};
+
+// ----------------------------------------------------------------------------
+// Tag DPTiled<TBuffer>
+// ----------------------------------------------------------------------------
+
+// Tag used to subclass DPScoutState and DPScout.
+// T represents the buffer type.
+template <typename TBuffer, typename TThreadContext = Default, typename TSimdSpec = void>
+struct DPTiled;
+
+// ----------------------------------------------------------------------------
+// Class DPScoutState_; DPTiled
+// ----------------------------------------------------------------------------
+
+// The overloaded DPScoutState which simply stores the pointers to the corresponding buffer.
+template <typename TBuffer, typename TThreadContext>
+class DPScoutState_<DPTiled<TBuffer, TThreadContext, void> >
+{
+public:
+
+    using TDPCell = typename Value<typename Value<TBuffer>::Type, 1>::Type;
+
+    TBuffer* ptrHorBuffer = nullptr;
+    TBuffer* ptrVerBuffer = nullptr;
+    TThreadContext threadContext{};
+
+    DPScoutState_() = default;
+
+    DPScoutState_(TBuffer & horBuffer, TBuffer & verBuffer) :
+        ptrHorBuffer(&horBuffer),
+        ptrVerBuffer(&verBuffer)
+    {}
+
+    DPScoutState_(TBuffer & horBuffer, TBuffer & verBuffer, TThreadContext pThreadContext) :
+        ptrHorBuffer(&horBuffer),
+        ptrVerBuffer(&verBuffer),
+        threadContext(std::move(pThreadContext))
+    {}
+};
+
+// ----------------------------------------------------------------------------
+// Class DPScout_; DPTiled
+// ----------------------------------------------------------------------------
+
+// Overloaded DPScout to store the corresponding buffer for the current dp tile.
+template <typename TDPCell, typename TBuffer, typename TThreadContext>
+class DPScout_<TDPCell, DPTiled<TBuffer, TThreadContext, void> > :
+    public DPScout_<TDPCell, Default>
+{
+public:
+    using TBase = DPScout_<TDPCell, Default>;
+
+    DPScoutState_<DPTiled<TBuffer, TThreadContext, void> > state;
+
+    size_t   horizontalPos;
+    size_t   verticalPos;
+    bool     forceTracking;
+
+    DPScout_(DPScoutState_<DPTiled<TBuffer, TThreadContext, void> > state,
+             bool pForceTracking = false) :
+        TBase(),
+        state(state),
+        forceTracking(pForceTracking)
+    {}
+};
+
+// ============================================================================
+// Metafunctions
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// Metafunction ScoutSpecForSimdAlignment_
+// ----------------------------------------------------------------------------
+
+template<typename TAlignmentAlgorithm, typename TThreadContext, typename TBuffer>
+struct ScoutSpecForAlignmentAlgorithm_<TAlignmentAlgorithm, DPScoutState_<DPTiled<TBuffer, TThreadContext, void> > >
+{
+    using Type = DPTiled<TBuffer, TThreadContext, void>;
+};
+
+// ============================================================================
+// Functions
+// ============================================================================
+
+template <typename TDPCell, typename TBuffer, typename TThreadContext, typename TSpec,
+          typename TIsLastColumn,
+          typename TIsLastRow>
+inline bool
+isTrackingEnabled(DPScout_<TDPCell, DPTiled<TBuffer, TThreadContext, TSpec> > const & /*dpScout*/,
+                  TIsLastColumn const & /*unused*/,
+                  TIsLastRow const & /*unused*/)
+{
+    return false;
+}
+
+template <typename TDPCell, typename TBuffer, typename TThreadContext>
+inline bool
+isTrackingEnabled(DPScout_<TDPCell, DPTiled<TBuffer, TThreadContext, void> > const & dpScout,
+                  True const & /*unused*/,
+                  True const & /*unused*/)
+{
+    return (dpScout.forceTracking || (dpScout.state.threadContext.task._lastHBlock &&
+                                       dpScout.state.threadContext.task._lastVBlock));
+}
+
+template <typename TDPCell, typename TBuffer, typename TThreadContext>
+inline bool
+isTrackingEnabled(DPScout_<TDPCell, DPTiled<TBuffer, TThreadContext, void> > const & dpScout,
+                  True const & /*unused*/,
+                  False const & /*unused*/)
+{
+    return (dpScout.forceTracking || dpScout.state.threadContext.task._lastHBlock);
+}
+
+template <typename TDPCell, typename TBuffer, typename TThreadContext>
+inline bool
+isTrackingEnabled(DPScout_<TDPCell, DPTiled<TBuffer, TThreadContext, void> > const & dpScout,
+                  False const & /*unused*/,
+                  True const & /*unused*/)
+{
+    return (dpScout.forceTracking || dpScout.state.threadContext.task._lastVBlock);
+}
+
+// ----------------------------------------------------------------------------
+// Function _scoutBestScore()
+// ----------------------------------------------------------------------------
+
+template <typename TDPCell, typename TBuffer,
+          typename TTraceMatrixNavigator,
+          typename TIsLastColumn,
+          typename TIsLastRow>
+inline void
+_scoutBestScore(DPScout_<TDPCell, DPTiled<TBuffer, Default, void> > & dpScout,
+                TDPCell const & activeCell,
+                TTraceMatrixNavigator const & navigator,
+                TIsLastColumn const & isLastColumn,
+                TIsLastRow const & isLastRow)
+{
+    using TBaseScout = typename DPScout_<TDPCell, DPTiled<TBuffer, Default, void> >::TBase;
+    _scoutBestScore(static_cast<TBaseScout&>(dpScout), activeCell, navigator, isLastColumn, isLastRow);
+}
+
+// Tracks the new score, if it is the new maximum.
+template <typename TDPCell, typename TBuffer, typename TThreadContext, typename TTraceMatrixNavigator,
+          typename TIsLastColumn, typename TIsLastRow>
+inline void
+_scoutBestScore(DPScout_<TDPCell, DPTiled<TBuffer, TThreadContext, void> > & dpScout,
+                TDPCell const & activeCell,
+                TTraceMatrixNavigator const & navigator,
+                TIsLastColumn const & isLastColumn,
+                TIsLastRow const & isLastRow)
+{
+    using TBaseScout = typename DPScout_<TDPCell, DPTiled<TBuffer, TThreadContext, void> >::TBase;
+    if (isTrackingEnabled(dpScout, isLastColumn, isLastRow))
+        _scoutBestScore(static_cast<TBaseScout&>(dpScout), activeCell, navigator, isLastColumn, isLastRow);
+}
+
+// ----------------------------------------------------------------------------
+// Function _preInitScoutHorizontal()
+// ----------------------------------------------------------------------------
+
+template <typename TDPCell, typename TBuffer, typename TThreadContext, typename TSpec>
+inline void
+_preInitScoutHorizontal(DPScout_<TDPCell, DPTiled<TBuffer, TThreadContext, TSpec> > & scout)
+{
+    scout.horizontalPos = 0;
+}
+
+// ----------------------------------------------------------------------------
+// Function _preInitScoutVertical()
+// ----------------------------------------------------------------------------
+
+template <typename TDPCell, typename TBuffer, typename TThreadContext, typename TSpec>
+inline void
+_preInitScoutVertical(DPScout_<TDPCell, DPTiled<TBuffer, TThreadContext, TSpec> > & scout)
+{
+    scout.verticalPos = 0;
+}
+
+// ----------------------------------------------------------------------------
+// Function _incHorizontalPos()
+// ----------------------------------------------------------------------------
+
+template <typename TDPCell, typename TBuffer, typename TThreadContext, typename TSpec>
+inline void
+_incHorizontalPos(DPScout_<TDPCell, DPTiled<TBuffer, TThreadContext, TSpec> > & scout)
+{
+    ++scout.horizontalPos;
+}
+
+// ----------------------------------------------------------------------------
+// Function _incVerticalPos()
+// ----------------------------------------------------------------------------
+
+template <typename TDPCell, typename TBuffer, typename TThreadContext, typename TSpec>
+inline void
+_incVerticalPos(DPScout_<TDPCell, DPTiled<TBuffer, TThreadContext, TSpec> > & scout)
+{
+    ++scout.verticalPos;
+}
+
+}  // namespace seqan
+
+#endif  // #ifndef INCLUDE_SEQAN_DP_PARALLEL_DP_PARALLEL_SCOUT_H_
diff --git a/include/seqan/align_parallel/dp_parallel_scout_simd.h b/include/seqan/align_parallel/dp_parallel_scout_simd.h
new file mode 100644
index 0000000..4d977e1
--- /dev/null
+++ b/include/seqan/align_parallel/dp_parallel_scout_simd.h
@@ -0,0 +1,362 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Rene Rahn <rene.rahn at fu-berlin.de>
+// ==========================================================================
+
+#ifndef INCLUDE_SEQAN_DP_PARALLEL_DP_PARALLEL_SCOUT_SIMD_H_
+#define INCLUDE_SEQAN_DP_PARALLEL_DP_PARALLEL_SCOUT_SIMD_H_
+
+namespace seqan
+{
+
+// ============================================================================
+// Forwards
+// ============================================================================
+
+// ============================================================================
+// Tags, Classes, Enums
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// Class DPScoutState_; DPTiled
+// ----------------------------------------------------------------------------
+
+// The overloaded DPScoutState which simply stores the pointers to the corresponding buffer.
+template <typename TBuffer, typename TThreadContext, typename TSimdSpec>
+class DPScoutState_<DPTiled<TBuffer, TThreadContext, TSimdSpec> > :
+    public DPScoutState_<DPTiled<TBuffer, TThreadContext, void> >,
+    public DPScoutState_<TSimdSpec>
+{
+public:
+
+    DPScoutState_() = default;
+
+    DPScoutState_(TBuffer & horBuffer, TBuffer & verBuffer) :
+        DPScoutState_<DPTiled<TBuffer, TThreadContext, void> >(horBuffer, verBuffer),
+        DPScoutState_<TSimdSpec>()
+    {}
+
+    DPScoutState_(TBuffer & horBuffer, TBuffer & verBuffer, TThreadContext && pThreadContext) :
+        DPScoutState_<DPTiled<TBuffer, TThreadContext, void> >(horBuffer, verBuffer, std::move(pThreadContext)),
+        DPScoutState_<TSimdSpec>()
+    {}
+};
+
+// ----------------------------------------------------------------------------
+// Class DPScout_; DPTiled
+// ----------------------------------------------------------------------------
+
+// Overloaded DPScout to store the corresponding buffer for the current dp tile.
+template <typename TDPCell, typename TBuffer, typename TThreadContext, typename TSimdSpec>
+class DPScout_<TDPCell, DPTiled<TBuffer, TThreadContext, SimdAlignmentScout<TSimdSpec> > > :
+    public DPScout_<TDPCell, SimdAlignmentScout<TSimdSpec>>
+{
+public:
+    using TBase = DPScout_<TDPCell, SimdAlignmentScout<TSimdSpec> >;
+
+    DPScoutState_<DPTiled<TBuffer, TThreadContext, TSimdSpec> > state;
+    size_t   horizontalPos;
+    size_t   verticalPos;
+    bool  forceTracking;
+
+    DPScout_(DPScoutState_<DPTiled<TBuffer, TThreadContext, TSimdSpec> > & state,
+             bool const pForceTracking) :
+        TBase(static_cast<DPScoutState_<TSimdSpec>&>(state)),
+        state(state),
+        forceTracking(pForceTracking)
+    {}
+
+    DPScout_(DPScoutState_<DPTiled<TBuffer, TThreadContext, TSimdSpec> > & state) : DPScout_(state, false)
+    {}
+};
+
+// ============================================================================
+// Metafunctions
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// Metafunction ScoutSpecForSimdAlignment_
+// ----------------------------------------------------------------------------
+
+template<typename TAlignmentAlgorithm, typename TBuffer, typename TThreadContext>
+struct ScoutSpecForAlignmentAlgorithm_<TAlignmentAlgorithm,
+                                       DPScoutState_<DPTiled<TBuffer, TThreadContext, SimdAlignEqualLength> > >
+{
+    using Type = DPTiled<TBuffer, TThreadContext, SimdAlignmentScout<SimdAlignEqualLength> >;
+};
+
+template<typename TAlignmentAlgorithm, typename TBuffer, typename TThreadContext, typename TTraits>
+struct ScoutSpecForAlignmentAlgorithm_<TAlignmentAlgorithm,
+                                       DPScoutState_<DPTiled<TBuffer,
+                                                             TThreadContext,
+                                                             SimdAlignVariableLength<TTraits> > > >
+{
+    using Type = DPTiled<TBuffer, TThreadContext, SimdAlignmentScout<SimdAlignVariableLength<TTraits> > >;
+};
+
+// ============================================================================
+// Functions
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// Function isTrackingEnabled()
+// ----------------------------------------------------------------------------
+
+template <typename TDPCell, typename TBuffer, typename TThreadContext, typename TSimdSpec>
+inline bool
+isTrackingEnabled(DPScout_<TDPCell, DPTiled<TBuffer, TThreadContext, SimdAlignmentScout<TSimdSpec> > > const & dpScout,
+                  True const & /*unused*/,
+                  True const & /*unused*/)
+{
+    // TODO(rrahn): Implement me!
+    return (dpScout.forceTracking);
+}
+
+template <typename TDPCell, typename TBuffer, typename TThreadContext, typename TSimdSpec>
+inline bool
+isTrackingEnabled(DPScout_<TDPCell, DPTiled<TBuffer, TThreadContext, SimdAlignmentScout<TSimdSpec> > > const & dpScout,
+                  True const & /*unused*/,
+                  False const & /*unused*/)
+{
+    // TODO(rrahn): Implement me!
+    return (dpScout.forceTracking);
+}
+
+template <typename TDPCell, typename TBuffer, typename TThreadContext, typename TSimdSpec>
+inline bool
+isTrackingEnabled(DPScout_<TDPCell, DPTiled<TBuffer, TThreadContext, SimdAlignmentScout<TSimdSpec> > > const & dpScout,
+                  False const & /*unused*/,
+                  True const & /*unused*/)
+{
+    // TODO(rrahn): Implement me!
+    return (dpScout.forceTracking);
+}
+
+// ----------------------------------------------------------------------------
+// Function _scoutBestScore()
+// ----------------------------------------------------------------------------
+
+template <typename TDPCell, typename TBuffer, typename TThreadContext, typename TSimdSpec,
+          typename TTraceMatrixNavigator,
+          typename TIsLastColumn,
+          typename TIsLastRow>
+inline void
+_scoutBestScore(DPScout_<TDPCell, DPTiled<TBuffer, TThreadContext, SimdAlignmentScout<TSimdSpec> > > & dpScout,
+                TDPCell const & activeCell,
+                TTraceMatrixNavigator const & navigator,
+                TIsLastColumn const & isLastColumn,
+                TIsLastRow const & isLastRow)
+{
+    using TScoutBase = typename DPScout_<TDPCell,
+                                         DPTiled<TBuffer, TThreadContext, SimdAlignmentScout<TSimdSpec>>>::TBase;
+    _scoutBestScore(static_cast<TScoutBase&>(dpScout), activeCell, navigator, isLastColumn, isLastRow);
+}
+
+// ----------------------------------------------------------------------------
+// Function maxHostCoordinate()
+// ----------------------------------------------------------------------------
+
+template <typename TDPCell, typename TBuffer, typename TThreadContext, typename TSimdSpec,
+typename TDimension>
+inline auto
+maxHostCoordinate(DPScout_<TDPCell, DPTiled<TBuffer, TThreadContext, SimdAlignmentScout<TSimdSpec> > > const & dpScout,
+                  TDimension const dimension)
+{
+    using TScoutBase = typename DPScout_<TDPCell,
+                                         DPTiled<TBuffer, TThreadContext, SimdAlignmentScout<TSimdSpec> > >::TBase;
+    return maxHostCoordinate(static_cast<TScoutBase const &>(dpScout), dimension);
+}
+
+// ----------------------------------------------------------------------------
+// Function _setSimdLane()
+// ----------------------------------------------------------------------------
+
+template <typename TDPCell, typename TBuffer, typename TThreadContext, typename TSimdSpec,
+typename TPosition>
+inline void
+_setSimdLane(DPScout_<TDPCell, DPTiled<TBuffer, TThreadContext, SimdAlignmentScout<TSimdSpec> > > & dpScout,
+             TPosition const pos)
+{
+    using TScoutBase = typename DPScout_<TDPCell, DPTiled<TBuffer, TThreadContext, SimdAlignmentScout<TSimdSpec> > >::TBase;
+    _setSimdLane(static_cast<TScoutBase&>(dpScout), pos);
+}
+
+// ----------------------------------------------------------------------------
+// Function _preInitScoutHorizontal()
+// ----------------------------------------------------------------------------
+
+template <typename TDPCell, typename TBuffer, typename TThreadContext, typename TTraits>
+inline void
+_preInitScoutHorizontal(DPScout_<TDPCell, DPTiled<TBuffer, TThreadContext, SimdAlignmentScout<SimdAlignVariableLength<TTraits> > > > & scout)
+{
+    using TScoutBase = typename DPScout_<TDPCell,
+                                         DPTiled<TBuffer,
+                                                 TThreadContext,
+                                                 SimdAlignmentScout<SimdAlignVariableLength<TTraits>>>>::TBase;
+    _preInitScoutHorizontal(static_cast<TScoutBase&>(scout));
+    scout.horizontalPos = 0;
+}
+
+// ----------------------------------------------------------------------------
+// Function _preInitScoutVertical()
+// ----------------------------------------------------------------------------
+
+template <typename TDPCell, typename TBuffer, typename TThreadContext, typename TTraits>
+inline void
+_preInitScoutVertical(DPScout_<TDPCell,
+                               DPTiled<TBuffer,
+                                       TThreadContext,
+                                       SimdAlignmentScout<SimdAlignVariableLength<TTraits>>>> & scout)
+{
+    using TScoutBase = typename DPScout_<TDPCell,
+                                         DPTiled<TBuffer,
+                                                 TThreadContext,
+                                                 SimdAlignmentScout<SimdAlignVariableLength<TTraits>>>>::TBase;
+    _preInitScoutVertical(static_cast<TScoutBase&>(scout));
+    scout.verticalPos = 0;
+}
+
+// ----------------------------------------------------------------------------
+// Function _reachedHorizontalEndPoint()
+// ----------------------------------------------------------------------------
+
+template <typename TDPCell, typename TBuffer, typename TThreadContext, typename TTraits, typename TIter>
+inline bool
+_reachedHorizontalEndPoint(DPScout_<TDPCell,
+                                    DPTiled<TBuffer,
+                                            TThreadContext,
+                                            SimdAlignmentScout<SimdAlignVariableLength<TTraits>>>> & scout,
+                           TIter const & hIt)
+{
+    using TScoutBase = typename DPScout_<TDPCell,
+                                         DPTiled<TBuffer,
+                                                 TThreadContext,
+                                                 SimdAlignmentScout<SimdAlignVariableLength<TTraits>>>>::TBase;
+    return _reachedHorizontalEndPoint(static_cast<TScoutBase&>(scout), hIt);
+}
+
+// ----------------------------------------------------------------------------
+// Function _reachedVerticalEndPoint()
+// ----------------------------------------------------------------------------
+
+template <typename TDPCell, typename TBuffer, typename TThreadContext, typename TTraits, typename TIter>
+inline bool
+_reachedVerticalEndPoint(DPScout_<TDPCell,
+                                  DPTiled<TBuffer,
+                                          TThreadContext,
+                                          SimdAlignmentScout<SimdAlignVariableLength<TTraits> > > > & scout,
+                         TIter const & vIt)
+{
+    using TScoutBase = typename DPScout_<TDPCell,
+                                         DPTiled<TBuffer,
+                                                 TThreadContext,
+                                                 SimdAlignmentScout<SimdAlignVariableLength<TTraits> > > >::TBase;
+    return _reachedVerticalEndPoint(static_cast<TScoutBase&>(scout), vIt);
+}
+
+// ----------------------------------------------------------------------------
+// Function _nextHorizontalEndPos()
+// ----------------------------------------------------------------------------
+
+template <typename TDPCell, typename TBuffer, typename TThreadContext, typename TTraits>
+inline void
+_nextHorizontalEndPos(DPScout_<TDPCell,
+                               DPTiled<TBuffer,
+                                       TThreadContext,
+                                       SimdAlignmentScout<SimdAlignVariableLength<TTraits> > > > & scout)
+{
+    using TScoutBase = typename DPScout_<TDPCell,
+                                         DPTiled<TBuffer,
+                                                 TThreadContext,
+                                                 SimdAlignmentScout<SimdAlignVariableLength<TTraits> > > >::TBase;
+    _nextHorizontalEndPos(static_cast<TScoutBase&>(scout));
+}
+
+// ----------------------------------------------------------------------------
+// Function _nextVerticalEndPos()
+// ----------------------------------------------------------------------------
+
+template <typename TDPCell, typename TBuffer, typename TThreadContext, typename TTraits>
+inline void
+_nextVerticalEndPos(DPScout_<TDPCell,
+                             DPTiled<TBuffer,
+                                     TThreadContext,
+                                     SimdAlignmentScout<SimdAlignVariableLength<TTraits> > > > & scout)
+{
+    using TScoutBase = typename DPScout_<TDPCell,
+                                         DPTiled<TBuffer,
+                                                 TThreadContext,
+                                                 SimdAlignmentScout<SimdAlignVariableLength<TTraits> > > >::TBase;
+    _nextVerticalEndPos(static_cast<TScoutBase&>(scout));
+}
+
+// ----------------------------------------------------------------------------
+// Function _incHorizontalPos()
+// ----------------------------------------------------------------------------
+
+template <typename TDPCell, typename TBuffer, typename TThreadContext, typename TTraits>
+inline void
+_incHorizontalPos(DPScout_<TDPCell,
+                           DPTiled<TBuffer,
+                                   TThreadContext,
+                                   SimdAlignmentScout<SimdAlignVariableLength<TTraits> > > > & scout)
+{
+    using TScoutBase = typename DPScout_<TDPCell,
+                                         DPTiled<TBuffer,
+                                                 TThreadContext,
+                                                 SimdAlignmentScout<SimdAlignVariableLength<TTraits> > > >::TBase;
+    _incHorizontalPos(static_cast<TScoutBase&>(scout));
+    ++scout.horizontalPos;
+}
+
+// ----------------------------------------------------------------------------
+// Function _incVerticalPos()
+// ----------------------------------------------------------------------------
+
+template <typename TDPCell, typename TBuffer, typename TThreadContext, typename TTraits>
+inline void
+_incVerticalPos(DPScout_<TDPCell,
+                         DPTiled<TBuffer,
+                                 TThreadContext,
+                                 SimdAlignmentScout<SimdAlignVariableLength<TTraits> > > > & scout)
+{
+    using TScoutBase = typename DPScout_<TDPCell,
+                                         DPTiled<TBuffer,
+                                                 TThreadContext,
+                                                 SimdAlignmentScout<SimdAlignVariableLength<TTraits> > > >::TBase;
+    _incVerticalPos(static_cast<TScoutBase&>(scout));
+    ++scout.verticalPos;
+}
+
+}  // namespace seqan
+
+#endif  // #ifndef INCLUDE_SEQAN_DP_PARALLEL_DP_PARALLEL_SCOUT_SIMD_H_
diff --git a/include/seqan/journaled_string_tree/jst_extension_horspool.h b/include/seqan/align_parallel/dp_settings.h
similarity index 58%
copy from include/seqan/journaled_string_tree/jst_extension_horspool.h
copy to include/seqan/align_parallel/dp_settings.h
index d5c2a9f..6695391 100644
--- a/include/seqan/journaled_string_tree/jst_extension_horspool.h
+++ b/include/seqan/align_parallel/dp_settings.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -32,8 +32,8 @@
 // Author: Rene Rahn <rene.rahn at fu-berlin.de>
 // ==========================================================================
 
-#ifndef INCLUDE_SEQAN_JOURNALED_STRING_TREE_JST_EXTENSION_HORSPOOL_H_
-#define INCLUDE_SEQAN_JOURNALED_STRING_TREE_JST_EXTENSION_HORSPOOL_H_
+#ifndef INCLUDE_SEQAN_ALIGN_PARALLEL_DP_SETTINGS_H_
+#define INCLUDE_SEQAN_ALIGN_PARALLEL_DP_SETTINGS_H_
 
 namespace seqan
 {
@@ -46,24 +46,56 @@ namespace seqan
 // Tags, Classes, Enums
 // ============================================================================
 
-// ----------------------------------------------------------------------------
-// Class JstExtension; Horspool
-// ----------------------------------------------------------------------------
-
-template <typename TNeedle>
-class JstExtension<Pattern<TNeedle, Horspool> > :
-    public JstExtensionBase<JstExtension<Pattern<TNeedle, Horspool> >, ContextRange>
+// Translates global function interface into setting struct.
+template <typename TScoringScheme_, typename TDPTraits = DPTraits::GlobalLinear>
+struct DPSettings
 {
-public:
-    typedef typename Size<TNeedle>::Type TSize;
-    typedef JstExtensionBase<JstExtension<Pattern<TNeedle, Horspool> >, ContextRange> TBase;
+    using TTraits        = TDPTraits;
+    using TScoringScheme = TScoringScheme_;
+    using TBandConfig    = DPBandConfig<typename TDPTraits::TBandType>;
+
+    TScoringScheme  scoringScheme;
+    TBandConfig     bandScheme;
 
-    Pattern<TNeedle, Horspool>& _pattern;
+    DPSettings() = default;
 
-    JstExtension(Pattern<TNeedle, Horspool> & pattern) : TBase(*this), _pattern(pattern)
+    explicit DPSettings(TScoringScheme score) : scoringScheme(std::move(score))
     {}
 };
 
+#ifdef SEQAN_SIMD_ENABLED
+// Simd version of DP settings.
+template <typename TDPSettings, typename TOffsetSpec = False>
+struct SimdDPSettings : public TDPSettings
+{
+    //-------------------------------------------------------------------------
+    // Member Types.
+
+    using TTraits = typename TDPSettings::TTraits;
+    using TScoringScheme = typename TDPSettings::TScoringScheme;
+    using TScoreValue = typename Value<TScoringScheme>::Type;
+    using TScoreValueSimd = typename SimdVector<
+                                        std::conditional_t<std::is_same<TOffsetSpec, BlockOffsetOptimization>::value,
+                                                           int16_t,
+                                                           TScoreValue>>::Type;
+    using TSimdScoringScheme = Score<TScoreValueSimd, ScoreSimdWrapper<TScoringScheme>>;
+
+    //-------------------------------------------------------------------------
+    // Members.
+
+    TSimdScoringScheme  simdScoringScheme;
+
+    //-------------------------------------------------------------------------
+    // Constructor.
+
+    SimdDPSettings() = default;
+
+    explicit SimdDPSettings(TScoringScheme score) :
+        TDPSettings(std::move(score)),
+        simdScoringScheme(score)
+    {}
+};
+#endif  // SEQAN_SIMD_ENABLED
 // ============================================================================
 // Metafunctions
 // ============================================================================
@@ -72,34 +104,6 @@ public:
 // Functions
 // ============================================================================
 
-// ----------------------------------------------------------------------------
-// Function run()
-// ----------------------------------------------------------------------------
-
-template <typename TNeedle, typename TIterator>
-inline std::pair<size_t, bool>
-run(JstExtension<Pattern<TNeedle, Horspool> > const & me,
-    TIterator hystkBegin,
-    TIterator hystkEnd)
-{
-    using TDiff = typename Difference<TIterator>::Type;
-    SEQAN_ASSERT(!empty(needle(me._pattern)));
-
-    // Sanity check: Range must have same size as needle!
-    if (hystkEnd - hystkBegin != static_cast<TDiff>(length(needle(me._pattern)) - 1))
-        return std::pair<size_t, bool>(me._pattern.data_map[ordValue(getValue(hystkEnd))], false);
-
-    auto ndlIt = end(needle(me._pattern), Standard()) - 1;
-    TIterator hstkIt = hystkEnd;
-    while (hstkIt != hystkBegin && getValue(ndlIt) == getValue(hstkIt))
-    {
-        --ndlIt; --hstkIt;
-    }
-
-    return std::pair<size_t, bool>(me._pattern.data_map[ordValue(getValue(hystkEnd))],
-                                   hstkIt == hystkBegin && getValue(ndlIt) == getValue(hstkIt));
-}
-
 }  // namespace seqan
 
-#endif  // #ifndef INCLUDE_SEQAN_JOURNALED_STRING_TREE_JST_EXTENSION_HORSPOOL_H_
+#endif  // INCLUDE_SEQAN_ALIGN_PARALLEL_DP_SETTINGS_H_
diff --git a/include/seqan/journaled_string_tree/jst_extension_horspool.h b/include/seqan/align_parallel/dp_traits.h
similarity index 57%
copy from include/seqan/journaled_string_tree/jst_extension_horspool.h
copy to include/seqan/align_parallel/dp_traits.h
index d5c2a9f..2606408 100644
--- a/include/seqan/journaled_string_tree/jst_extension_horspool.h
+++ b/include/seqan/align_parallel/dp_traits.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -32,8 +32,8 @@
 // Author: Rene Rahn <rene.rahn at fu-berlin.de>
 // ==========================================================================
 
-#ifndef INCLUDE_SEQAN_JOURNALED_STRING_TREE_JST_EXTENSION_HORSPOOL_H_
-#define INCLUDE_SEQAN_JOURNALED_STRING_TREE_JST_EXTENSION_HORSPOOL_H_
+#ifndef INCLUDE_SEQAN_ALIGN_PARALLEL_DP_TRAITS_H_
+#define INCLUDE_SEQAN_ALIGN_PARALLEL_DP_TRAITS_H_
 
 namespace seqan
 {
@@ -46,22 +46,65 @@ namespace seqan
 // Tags, Classes, Enums
 // ============================================================================
 
-// ----------------------------------------------------------------------------
-// Class JstExtension; Horspool
-// ----------------------------------------------------------------------------
-
-template <typename TNeedle>
-class JstExtension<Pattern<TNeedle, Horspool> > :
-    public JstExtensionBase<JstExtension<Pattern<TNeedle, Horspool> >, ContextRange>
+// Traits for DP configuration. Currently used only internally.
+struct DPTraits
 {
-public:
-    typedef typename Size<TNeedle>::Type TSize;
-    typedef JstExtensionBase<JstExtension<Pattern<TNeedle, Horspool> >, ContextRange> TBase;
+    // Gocal alignment with linear gap costs.
+    struct GlobalLinear
+    {
+        // The algorithm to choose.
+        using TAlgorithmType    = GlobalAlignment_<>;
+        // The Gaps to choos
+        using TGapType          = LinearGaps;
+        // The Band to choose.
+        using TBandType         = BandOff;
+        // The traceback.
+        using TTracebackType    = TracebackOn<TracebackConfig_<SingleTrace, GapsLeft>>;
+        // The output to choose.
+        using TFormat           = ArrayGaps;
+    };
+
+    // Global alignment with affine gap costs.
+    struct GlobalAffine : public GlobalLinear
+    {
+        using TGapType          = AffineGaps;
+    };
+
+    // Global alignment with affine gap costs.
+    struct SemiGlobalLinear : public GlobalLinear
+    {
+        using TAlgorithmType = GlobalAlignment_<FreeEndGaps_<True, False, True, False>>;
+    };
+
+    // Global alignment with affine gap costs.
+    struct SemiGlobalAffine : public GlobalAffine
+    {
+        using TAlgorithmType = GlobalAlignment_<FreeEndGaps_<True, False, True, False>>;
+    };
+
+    // Banded global alignment with linear gap costs.
+    struct BandedGlobalLinear : public GlobalLinear
+    {
+        using TBandType         = BandOn;
+    };
+
+    // Banded global alignment with affine gap costs.
+    struct BandedGlobalAffine : public BandedGlobalLinear
+    {
+        using TGapType          = AffineGaps;
+    };
 
-    Pattern<TNeedle, Horspool>& _pattern;
+    // Local alignment with linear gap costs.
+    struct LocalLinear : public GlobalLinear
+    {
+        using TAlgorithmType    = LocalAlignment_<>;
+    };
 
-    JstExtension(Pattern<TNeedle, Horspool> & pattern) : TBase(*this), _pattern(pattern)
-    {}
+    // Local alignment with affine gap costs.
+    struct LocalAffine : public LocalLinear
+    {
+        using TGapType          = AffineGaps;
+    };
 };
 
 // ============================================================================
@@ -72,34 +115,6 @@ public:
 // Functions
 // ============================================================================
 
-// ----------------------------------------------------------------------------
-// Function run()
-// ----------------------------------------------------------------------------
-
-template <typename TNeedle, typename TIterator>
-inline std::pair<size_t, bool>
-run(JstExtension<Pattern<TNeedle, Horspool> > const & me,
-    TIterator hystkBegin,
-    TIterator hystkEnd)
-{
-    using TDiff = typename Difference<TIterator>::Type;
-    SEQAN_ASSERT(!empty(needle(me._pattern)));
-
-    // Sanity check: Range must have same size as needle!
-    if (hystkEnd - hystkBegin != static_cast<TDiff>(length(needle(me._pattern)) - 1))
-        return std::pair<size_t, bool>(me._pattern.data_map[ordValue(getValue(hystkEnd))], false);
-
-    auto ndlIt = end(needle(me._pattern), Standard()) - 1;
-    TIterator hstkIt = hystkEnd;
-    while (hstkIt != hystkBegin && getValue(ndlIt) == getValue(hstkIt))
-    {
-        --ndlIt; --hstkIt;
-    }
-
-    return std::pair<size_t, bool>(me._pattern.data_map[ordValue(getValue(hystkEnd))],
-                                   hstkIt == hystkBegin && getValue(ndlIt) == getValue(hstkIt));
-}
-
 }  // namespace seqan
 
-#endif  // #ifndef INCLUDE_SEQAN_JOURNALED_STRING_TREE_JST_EXTENSION_HORSPOOL_H_
+#endif  // INCLUDE_SEQAN_ALIGN_PARALLEL_DP_TRAITS_H_
diff --git a/include/seqan/align_parallel/parallel_align_interface.h b/include/seqan/align_parallel/parallel_align_interface.h
new file mode 100644
index 0000000..764aa2a
--- /dev/null
+++ b/include/seqan/align_parallel/parallel_align_interface.h
@@ -0,0 +1,366 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Rene Rahn <rene.rahn at fu-berlin.de>
+// ==========================================================================
+
+#ifndef INCLUDE_SEQAN_ALIGN_PARALLEL_ALIGN_INTERFACE_H_
+#define INCLUDE_SEQAN_ALIGN_PARALLEL_ALIGN_INTERFACE_H_
+
+namespace seqan
+{
+
+// ============================================================================
+// Forwards
+// ============================================================================
+
+// ============================================================================
+// Tags, Classes, Enums
+// ============================================================================
+
+namespace impl
+{
+
+/*
+ * Executor class that implements the correct execution mode.
+ */
+struct ParallelAlignmentExecutor
+{
+    template <typename TKernel,
+              typename TSetH,
+              typename TSetV,
+              typename ...TArgs>
+    auto operator()(Sequential const & /*execPolicy*/,
+                    TKernel && kernel,
+                    TSetH const & setH,
+                    TSetV const & setV,
+                    TArgs && ...args)
+    {
+        SEQAN_ASSERT_EQ(length(setH), length(setV));
+
+        using TResult = decltype(kernel(setH, setV, std::forward<TArgs>(args)...));
+
+        TResult superSet;
+        resize(superSet, length(setH));
+
+        auto zipCont = makeZipView(setH, setV, superSet);
+#ifdef DP_PARALLEL_SHOW_PROGRESS
+        ::impl::dp_parallel_progress::show_progress(length(setH));
+#endif  // DP_PARALLEL_SHOW_PROGRESS
+        for (auto && pwInst : zipCont)
+        {
+            std::get<2>(pwInst) = kernel(std::get<0>(pwInst), std::get<1>(pwInst), std::forward<TArgs>(args)...);
+        }
+        return superSet;
+    }
+
+    template <typename TKernel,
+              typename TSetH,
+              typename ...TArgs>
+    auto operator()(ExecutionPolicy<Serial, Vectorial> const & /*execPolicy*/,
+                    TKernel && kernel,
+                    TSetH const & setH,
+                    TArgs && ...args)
+    {
+#ifdef DP_PARALLEL_SHOW_PROGRESS
+        ::impl::dp_parallel_progress::show_progress(length(setH));
+#endif  // DP_PARALLEL_SHOW_PROGRESS
+        // Automaically chooses vectorized code, or falls back to sequential code.
+        return kernel(setH, std::forward<TArgs>(args)...);
+    }
+
+    template <typename TKernel,
+              typename TSetH,
+              typename TSetV,
+              typename ...TArgs>
+    auto operator()(SEQAN_UNUSED ExecutionPolicy<Parallel, Vectorial> const & execPolicy,  // maybe unused due to missing OMP support in clang.
+                    TKernel && kernel,
+                    TSetH const & setH,
+                    TSetV const & setV,
+                    TArgs && ...args)
+
+    {
+        SEQAN_ASSERT_EQ(length(setH), length(setV));
+
+        using TPos = std::make_signed_t<decltype(length(setH))>;
+        using TResult = decltype(kernel(setH, setV, std::forward<TArgs>(args)...));
+
+        TPos chunkSize = _min(static_cast<TPos>(length(setH)), static_cast<TPos>(256));
+        String<TPos> splitter;
+        computeSplitters(splitter, length(setH), static_cast<TPos>(length(setH)/chunkSize));
+
+        std::vector<TResult> superSet;
+        superSet.resize(length(splitter));
+
+#ifdef DP_PARALLEL_SHOW_PROGRESS
+        ::impl::dp_parallel_progress::show_progress(length(setH));
+#endif  // DP_PARALLEL_SHOW_PROGRESS
+
+        SEQAN_OMP_PRAGMA(parallel for num_threads(numThreads(execPolicy)) schedule(guided))
+        for (TPos job = 0; job < static_cast<TPos>(length(splitter)) - 1; ++job)  // TODO(rrahn): Why -1; Is there a bug in computeSplitters?
+        {
+            auto infSetH = infix(setH, splitter[job], splitter[job + 1]);
+            auto infSetV = infix(setV, splitter[job], splitter[job + 1]);
+
+            superSet[job] = kernel(infSetH, infSetV, std::forward<TArgs>(args)...);
+        }
+        // Reduce the result.
+        TResult res;
+        resize(res, length(setH));
+        auto it = begin(res, Standard());
+        for (auto && set : superSet)
+        {
+            arrayMoveForward(begin(set, Standard()), end(set, Standard()), it);
+            it += length(set);
+        }
+        return res;
+    }
+
+    template <typename TKernel,
+              typename TSetH,
+              typename TSetV,
+              typename ...TArgs>
+    auto operator()(ExecutionPolicy<Parallel, Serial> const & execPolicy,
+                    TKernel && kernel,
+                    TSetH const & setH,
+                    TSetV const & setV,
+                    TArgs && ...args)
+
+    {
+        SEQAN_ASSERT_EQ(length(setH), length(setV));
+
+        using TPos = std::make_signed_t<decltype(length(setH))>;
+        using TResult = decltype(kernel(setH, setV, std::forward<TArgs>(args)...));
+
+        Splitter<TPos> splitter(0, length(setH), numThreads(execPolicy));
+
+        TResult superSet;
+        resize(superSet, length(setH));
+
+        auto zipCont = makeZipView(setH, setV, superSet);
+
+#ifdef DP_PARALLEL_SHOW_PROGRESS
+        ::impl::dp_parallel_progress::show_progress(length(setH));
+#endif  // DP_PARALLEL_SHOW_PROGRESS
+
+        SEQAN_OMP_PRAGMA(parallel for num_threads(length(splitter)))
+        for (TPos job = 0; job < static_cast<TPos>(length(splitter)); ++job)
+        {
+            auto it = begin(zipCont, Standard()) + splitter[job];
+            auto itEnd = begin(zipCont, Standard()) + splitter[job + 1];
+
+            // NOTE(marehr): auto && seqPair does not work, thus declaring the
+            // type explicitly, s.t. <=icpc 18.0.1 can compile the code (ticket
+            // #03204483)
+            using TSeqPair = decltype(*it);
+            std::for_each(it, itEnd, [&](TSeqPair && seqPair)
+            {
+                std::get<2>(seqPair) = kernel(std::get<0>(seqPair), std::get<1>(seqPair), std::forward<TArgs>(args)...);
+            });
+        }
+        return superSet;
+    }
+};
+
+template <typename TWaveSpec, typename TVectorizationPolicy,
+          typename TAlgorithmSpec,
+          typename TSetH,
+          typename TSetV,
+          typename TScore,
+          typename ...TArgs,
+          std::enable_if_t<!std::is_same<WavefrontAlignment<TWaveSpec>, Serial>::value &&
+                           !std::is_same<WavefrontAlignment<TWaveSpec>, Parallel>::value,
+                           int> = 0>
+inline auto
+doWaveAlignment(ExecutionPolicy<WavefrontAlignment<TWaveSpec>, TVectorizationPolicy> const & execPolicy,
+                TAlgorithmSpec const & /*tag*/,
+                TSetH const & setH,
+                TSetV const & setV,
+                TScore const & scoringScheme,
+                TArgs && .../*args*/)
+{
+    using TScoreValue = typename Value<TScore>::Type;
+
+    // The vector containing the scores.
+    std::vector<TScoreValue> res;
+    res.resize(length(setH));
+
+    auto dispatcher = [&res](auto && ...args)
+    {
+        alignExecBatch(std::forward<decltype(args)>(args)...,
+                             [&res](auto const id, auto const score)
+                             {
+                                 res[id] = score;
+                             });
+    };
+
+    // Differentiate between affine and linear gap costs.
+    // TODO(rrahn): Setup configuration cascade.
+    if (scoreGapOpen(scoringScheme) == scoreGapExtend(scoringScheme))
+    {
+        struct DPConfigTraits
+        {
+            using TAlgorithmType SEQAN_UNUSED = TAlgorithmSpec;
+            using TGapType       SEQAN_UNUSED = LinearGaps;
+            using TBandType      SEQAN_UNUSED = BandOff;
+            using TTracebackType SEQAN_UNUSED = TracebackOff;
+            using TFormat        SEQAN_UNUSED = ArrayGaps;
+        };
+
+        using TDPSettings = seqan::DPSettings<TScore, DPConfigTraits>;
+
+        TDPSettings settings;
+        settings.scoringScheme = scoringScheme;
+        dispatcher(execPolicy, setH, setV, settings);
+    }
+    else
+    {
+        struct DPConfigTraits
+        {
+            using TAlgorithmType SEQAN_UNUSED = TAlgorithmSpec;
+            using TGapType       SEQAN_UNUSED = AffineGaps;
+            using TBandType      SEQAN_UNUSED = BandOff;
+            using TTracebackType SEQAN_UNUSED = TracebackOff;
+            using TFormat        SEQAN_UNUSED = ArrayGaps;
+        };
+
+        using TDPSettings = seqan::DPSettings<TScore, DPConfigTraits>;
+
+        TDPSettings settings;
+        settings.scoringScheme = scoringScheme;
+        dispatcher(execPolicy, setH, setV, settings);
+    }
+    return res;
+}
+
+} // namespace impl
+
+// ============================================================================
+// Metafunctions
+// ============================================================================
+
+// ============================================================================
+// Functions
+// ============================================================================
+
+/*
+ * Wrapper functions for calling globalAlignmentScore and localAlignmentScore with an ExecutionPolicy.
+ * Note the parallel interfaces are documented as part of the standard documentation in seqan/align module.
+ */
+template <typename TParallelPolicy, typename TVectorizationPolicy,
+          typename ...TArgs,
+          std::enable_if_t<std::is_same<TParallelPolicy, Serial>::value ||
+                           std::is_same<TParallelPolicy, Parallel>::value,
+                           int> = 0>
+inline auto
+globalAlignmentScore(ExecutionPolicy<TParallelPolicy, TVectorizationPolicy> const & execPolicy,
+                     TArgs && ...args)
+{
+    auto kernel = [](auto && ...args)
+    {
+        return globalAlignmentScore(std::forward<decltype(args)>(args)...);
+    };
+    return impl::ParallelAlignmentExecutor{}(execPolicy, kernel, std::forward<TArgs>(args)...);
+}
+
+template <typename TParallelPolicy, typename TVectorizationPolicy,
+          typename ...TArgs,
+          std::enable_if_t<std::is_same<TParallelPolicy, Serial>::value ||
+                           std::is_same<TParallelPolicy, Parallel>::value,
+                           int> = 0>
+inline auto
+localAlignmentScore(ExecutionPolicy<TParallelPolicy, TVectorizationPolicy> const & execPolicy,
+                    TArgs && ...args)
+{
+    auto kernel = [](auto && ...args)
+    {
+        return localAlignmentScore(std::forward<decltype(args)>(args)...);
+    };
+    return impl::ParallelAlignmentExecutor{}(execPolicy, kernel, std::forward<TArgs>(args)...);
+}
+
+// Wavefront execution of globalAlignmentScore w/ config.
+template <typename TWaveSpec, typename TVectorizationPolicy,
+          typename TSetH,
+          typename TSetV,
+          typename TScore,
+          typename TConfig,
+          std::enable_if_t<!std::is_same<WavefrontAlignment<TWaveSpec>, Serial>::value &&
+                           !std::is_same<WavefrontAlignment<TWaveSpec>, Parallel>::value,
+                           int> = 0>
+
+inline auto
+globalAlignmentScore(ExecutionPolicy<WavefrontAlignment<TWaveSpec>, TVectorizationPolicy> const & execPolicy,
+                     TSetH const & setH,
+                     TSetV const & setV,
+                     TScore const & scoringScheme,
+                     TConfig const & /*config*/)
+{
+    return impl::doWaveAlignment(execPolicy,
+                                 GlobalAlignment_<typename SubstituteAlignConfig_<TConfig>::Type>{},
+                                 setH,
+                                 setV,
+                                 scoringScheme);
+}
+
+// Wavefront execution of globalAlignmentScore w/o config.
+template <typename TWaveSpec, typename TVectorizationPolicy,
+          typename TSetH,
+          typename TSetV,
+          typename TScore,
+          std::enable_if_t<!std::is_same<WavefrontAlignment<TWaveSpec>, Serial>::value &&
+                           !std::is_same<WavefrontAlignment<TWaveSpec>, Parallel>::value,
+                           int> = 0>
+
+inline auto
+globalAlignmentScore(ExecutionPolicy<WavefrontAlignment<TWaveSpec>, TVectorizationPolicy> const & execPolicy,
+                     TSetH const & setH,
+                     TSetV const & setV,
+                     TScore const & scoringScheme)
+{
+    return globalAlignmentScore(execPolicy, setH, setV, scoringScheme, AlignConfig<>{});
+}
+
+template <typename TWaveSpec, typename TVectorizationPolicy,
+          typename ...TArgs,
+          std::enable_if_t<!std::is_same<WavefrontAlignment<TWaveSpec>, Serial>::value &&
+                           !std::is_same<WavefrontAlignment<TWaveSpec>, Parallel>::value,
+                           int> = 0>
+inline auto
+localAlignmentScore(ExecutionPolicy<WavefrontAlignment<TWaveSpec>, TVectorizationPolicy> const & execPolicy,
+                    TArgs && ...args)
+{
+    return impl::doWaveAlignment(execPolicy, LocalAlignment_<>{}, std::forward<TArgs>(args)...);
+}
+
+}  // namespace seqan
+
+#endif  // INCLUDE_SEQAN_ALIGN_PARALLEL_ALIGN_INTERFACE_H_
diff --git a/include/seqan/journaled_set/journaled_set_join_global_align_manhatten.h b/include/seqan/align_parallel/wavefront_alignment_executor.h
similarity index 63%
copy from include/seqan/journaled_set/journaled_set_join_global_align_manhatten.h
copy to include/seqan/align_parallel/wavefront_alignment_executor.h
index 8a287d2..00db124 100644
--- a/include/seqan/journaled_set/journaled_set_join_global_align_manhatten.h
+++ b/include/seqan/align_parallel/wavefront_alignment_executor.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -32,10 +32,11 @@
 // Author: Rene Rahn <rene.rahn at fu-berlin.de>
 // ==========================================================================
 
-#ifndef INCLUDE_SEQAN_JOURNALED_SET_JOURNALED_SET_JOIN_GLOBAL_ALIGN_MANHATTEN_H_
-#define INCLUDE_SEQAN_JOURNALED_SET_JOURNALED_SET_JOIN_GLOBAL_ALIGN_MANHATTEN_H_
+#ifndef INCLUDE_SEQAN_ALIGN_PARALLEL_WAVEFRONT_ALIGNMENT_EXECUTOR_H_
+#define INCLUDE_SEQAN_ALIGN_PARALLEL_WAVEFRONT_ALIGNMENT_EXECUTOR_H_
 
-namespace seqan {
+namespace seqan
+{
 
 // ============================================================================
 // Forwards
@@ -45,6 +46,25 @@ namespace seqan {
 // Tags, Classes, Enums
 // ============================================================================
 
+// Executor class for an alignment task in the wave-front model.
+// Stores the scheduler and the thread local storage.
+template <typename TScheduler, typename TThreadLocalStore>
+struct WavefrontAlignmentExecutor
+{
+    // Shared data in parallel context.
+    TScheduler *                  ptrTaskScheduler{nullptr};
+    TThreadLocalStore *           ptrThreadLocal{nullptr};
+
+    //NOTE(rrahn) Bug in g++-4.9 prevents us from using as aggregate type.
+    WavefrontAlignmentExecutor() = default;
+
+    WavefrontAlignmentExecutor(TScheduler * _ptrScheduler,
+                               TThreadLocalStore * _ptrTls) :
+            ptrTaskScheduler{_ptrScheduler},
+            ptrThreadLocal(_ptrTls)
+    {}
+};
+
 // ============================================================================
 // Metafunctions
 // ============================================================================
@@ -53,29 +73,26 @@ namespace seqan {
 // Functions
 // ============================================================================
 
-// ----------------------------------------------------------------------------
-// Function _joinInternal()                   [GlobalAlign<JournaledManhatten>]
-// ----------------------------------------------------------------------------
-
-template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBuffSpec, typename TJournalString2>
+// Asynchronosly schedule a new alignment job.
+template <typename ...TArgs,
+          typename TTaskExecutor>
 inline void
-_joinInternal(String<TValue, Journaled<THostSpec, TJournalSpec, TBuffSpec> > & journal,
-              StringSet<TJournalString2, Owner<JournaledSet> > const & journalSet,
-              JoinConfig<GlobalAlign<JournaledManhatten> > const &)
+spawn(WavefrontAlignmentExecutor<TArgs...> & executor,
+      TTaskExecutor && taskExec)
 {
+    SEQAN_ASSERT(executor.ptrTaskScheduler != nullptr);
+    scheduleTask(*executor.ptrTaskScheduler, std::forward<TTaskExecutor>(taskExec));
+}
 
-    typedef String <TValue, Journaled<THostSpec, TJournalSpec, TBuffSpec> > TJournalString;
-    typedef typename TJournalString::TJournalEntry TJounralEntry;
-//    typedef typename Size<TJournalString>::Type TSize;
-
-    JournalTraceBuffer<TJournalString> traceDescriptor;
-    std::stringstream stream;
-    stream << journal;
-    appendValue(getTrace(traceDescriptor), TJounralEntry(SOURCE_PATCH, 0, 0, 0,length(journal)));
-    append(getInsertionBuffer(traceDescriptor), stream.str());
-    _applyTraceOperations(journal, host(journalSet), traceDescriptor);
+// Access thread local storage.
+template <typename ...TArgs>
+inline auto &
+local(WavefrontAlignmentExecutor<TArgs...> & executor)
+{
+    SEQAN_ASSERT(executor.ptrThreadLocal != nullptr);
+    return local(*executor.ptrThreadLocal);
 }
 
 }  // namespace seqan
 
-#endif  // #ifndef INCLUDE_SEQAN_JOURNALED_SET_JOURNALED_SET_JOIN_GLOBAL_ALIGN_MANHATTEN_H_
+#endif  // #ifndef INCLUDE_SEQAN_ALIGN_PARALLEL_WAVEFRONT_ALIGNMENT_EXECUTOR_H_
diff --git a/include/seqan/align_parallel/wavefront_alignment_result.h b/include/seqan/align_parallel/wavefront_alignment_result.h
new file mode 100644
index 0000000..e2e7900
--- /dev/null
+++ b/include/seqan/align_parallel/wavefront_alignment_result.h
@@ -0,0 +1,165 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Rene Rahn <rene.rahn at fu-berlin.de>
+// ==========================================================================
+
+#ifndef INCLUDE_SEQAN_ALIGN_PARALLEL_WAVEFRONT_ALIGNMENT_RESULT_H_
+#define INCLUDE_SEQAN_ALIGN_PARALLEL_WAVEFRONT_ALIGNMENT_RESULT_H_
+
+namespace seqan
+{
+
+// ============================================================================
+// Forwards
+// ============================================================================
+
+// ============================================================================
+// Tags, Classes, Enums
+// ============================================================================
+
+// The intermediate result stored by each thread independently.
+// After an alignment has been finished, the intermediate results are reduced to a global result.
+template <typename TTraits>
+struct WavefrontAlignmentResult
+{
+    // ----------------------------------------------------------------------------
+    // Member Types.
+
+    using TState = std::pair<typename TTraits::TScoreValue, typename TTraits::THostPosition>;
+
+    // ----------------------------------------------------------------------------
+    // Member Variables
+
+    TState  _maxState{std::numeric_limits<typename TTraits::TScoreValue>::min(), typename TTraits::THostPosition{}};
+    size_t  _tileCol{0};
+    size_t  _tileRow{0};
+
+    //NOTE(rrahn) Bug in g++-4.9 prevents us from using as aggregate type.
+    // ----------------------------------------------------------------------------
+    // Constructors.
+
+    // Note: Although, this could be an aggregate type, the icpc-17 crashes,
+    // when compiling without the defaulted constructor.
+    WavefrontAlignmentResult() = default;
+
+    WavefrontAlignmentResult(TState const maxState) :
+        _maxState(std::move(maxState))
+    {}
+
+    WavefrontAlignmentResult(TState const maxState, size_t const tileCol, size_t  const tileRow) :
+        _maxState(std::move(maxState)),
+        _tileCol(tileCol),
+        _tileRow(tileRow)
+    {}
+
+    // ----------------------------------------------------------------------------
+    // Member Functions.
+};
+
+// ============================================================================
+// Metafunctions
+// ============================================================================
+
+// ============================================================================
+// Functions
+// ============================================================================
+
+namespace impl
+{
+
+template <typename TIntermediate,
+          typename TState>
+inline void
+updateMax(TIntermediate & me,
+          TState const & state,
+          size_t const tileCol,
+          size_t const tileRow)
+{
+    if (state.first > me._maxState.first)
+    {
+        me._maxState = state;
+        me._tileCol = tileCol;
+        me._tileRow = tileRow;
+    }
+}
+}  // namespace impl
+
+// Update the intermediate result if new optimum has been found.
+template <typename ...TArgs>
+inline void
+updateMax(WavefrontAlignmentResult<TArgs...> & me,
+          typename WavefrontAlignmentResult<TArgs...>::TState const & state,
+          size_t const tileCol,
+          size_t const tileRow)
+{
+    impl::updateMax(me, state, tileCol, tileRow);
+}
+
+template <typename ...TArgs>
+inline void
+updateMax(WavefrontAlignmentResult<TArgs...> & lhs,
+          WavefrontAlignmentResult<TArgs...> const & rhs)
+{
+    impl::updateMax(lhs, rhs._maxState, rhs._tileCol, rhs._tileRow);
+}
+
+// Reset the intermediate result.
+template <typename ...TArgs>
+inline void
+clear(WavefrontAlignmentResult<TArgs...> & me)
+{
+    me = WavefrontAlignmentResult<TArgs...>{};
+}
+
+// Get the intermediate result.
+template <typename ...TArgs>
+inline typename WavefrontAlignmentResult<TArgs...>::TState const &
+value(WavefrontAlignmentResult<TArgs...> const & me)
+{
+    return me._maxState;
+}
+
+// Swap two intermediate results.
+template <typename ...TArgs>
+inline void
+swap(WavefrontAlignmentResult<TArgs...> & lhs,
+     WavefrontAlignmentResult<TArgs...> & rhs)
+{
+    // TODO (rrahn): report issue with Intel
+    WavefrontAlignmentResult<TArgs...> tmp = std::move(lhs);
+    lhs = std::move(rhs);
+    rhs = std::move(tmp);
+}
+
+}  // namespace seqan
+
+#endif  // #ifndef INCLUDE_SEQAN_ALIGN_PARALLEL_WAVEFRONT_ALIGNMENT_RESULT_H_
diff --git a/include/seqan/align_parallel/wavefront_alignment_scheduler.h b/include/seqan/align_parallel/wavefront_alignment_scheduler.h
new file mode 100644
index 0000000..b7cb246
--- /dev/null
+++ b/include/seqan/align_parallel/wavefront_alignment_scheduler.h
@@ -0,0 +1,347 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Rene Rahn <rene.rahn at fu-berlin.de>
+// ==========================================================================
+
+#ifndef INCLUDE_SEQAN_ALIGN_PARALLEL_PARALLEL_ALIGNMENT_SCHEDULER_H_
+#define INCLUDE_SEQAN_ALIGN_PARALLEL_PARALLEL_ALIGNMENT_SCHEDULER_H_
+
+namespace seqan
+{
+
+// ============================================================================
+// Forwards
+// ============================================================================
+
+// ============================================================================
+// Tags, Classes, Enums
+// ============================================================================
+
+// Yet internal class. Might need some redesign to make it truly generic.
+/*
+ * @class WavefrontAlignmentScheduler
+ * @headerfile <align_parallel.h>
+ * @brief A generic scheduler allowing to execute callables with a ring buffer for the stored tasks.
+ *
+ * @signature class WavefrontAlignmentScheduler;
+ *
+ * This schedule is at the moment only used for the wave-front alignment execution but could be generalized later.
+ * It stores all scheduled callables in a @link ConcurrentSuspendableQueue @endlink which can hold a user defined
+ * number of callables at the same time. It then uses recycable ids to fill up the queue with waiting jobs.
+ * If the queue is full and a thread tries to add a new job, it will be suspended, until resources are freed by
+ * the scheduler.
+ */
+class WavefrontAlignmentScheduler
+{
+public:
+
+    //-------------------------------------------------------------------------
+    // Member Types.
+
+    using TCallable         = std::function<void(uint16_t)>;
+    using TAlignmentQueue   = ConcurrentQueue<TCallable, Suspendable<Limit>>;
+    using TRecycleList      = std::list<uint16_t>;
+
+    //-------------------------------------------------------------------------
+    // Private Member Variables.
+
+    WavefrontTaskScheduler  _taskScheduler;
+    ThreadPool              _pool;
+    TRecycleList            _recycableIds;
+    TAlignmentQueue         _queue;
+    bool                    _receivedEndSignal;
+
+    std::mutex              _mutexRecycleId;
+    unsigned                _numParallelAlignments;
+
+    std::mutex                       _mutexPushException;
+    std::vector<std::exception_ptr>  _exceptionPointers;
+
+    std::atomic<bool>               _isValid{true};
+
+    std::function<void()> job = [this] ()
+    {
+        while (true)
+        {
+            TCallable callable;
+            if (!popFront(callable, _queue))
+                break;  // End of thread => No writers and queue is empty.
+
+            uint16_t id = -1;
+
+            { // Receive id.
+                std::lock_guard<std::mutex> lck(_mutexRecycleId);
+                SEQAN_ASSERT_NOT(_recycableIds.empty());
+                id = _recycableIds.front();
+                _recycableIds.pop_front();
+            }
+
+            try
+            {
+                callable(id);  // invokes the alignment with assigned id.
+            }
+            catch (...)
+            {  // Catch any exception thrown by callable. Store exception, and set *this invalid.
+               // We still keep running until the queue is empty. The thread is cleaned either by,
+               // explicit wait or by destruction of *this.
+                _isValid.store(false, std::memory_order_release);
+                {
+                    std::lock_guard<std::mutex> lck(_mutexPushException);
+                    _exceptionPointers.push_back(std::current_exception());
+                }
+            }
+
+            // Check if task scheduler is still valid.
+            // If not, something went wrong, and we should not continue adding new tasks.
+            // So we propagate the invalid state to *this and break exceution chain.
+            if (!isValid(_taskScheduler))
+            {
+                _isValid.store(false, std::memory_order_release);
+            }
+
+            { // recycle id, when done.
+                std::lock_guard<std::mutex> lck(_mutexRecycleId);
+                _recycableIds.push_back(id);
+            }
+        }
+        unlockReading(_queue);  // Notify that this reader is finished.
+        unlockWriting(_taskScheduler);  // Notify that this writer is finished.
+    };
+
+    //-------------------------------------------------------------------------
+    // Constructors.
+
+    // implicitly deleted default constructor.
+
+    WavefrontAlignmentScheduler(size_t const numParallelAlignments, size_t const numParallelTasks) :
+        _taskScheduler(numParallelTasks),
+        _queue(numParallelAlignments),
+        _receivedEndSignal(false),
+        _numParallelAlignments(numParallelAlignments)
+    {
+        SEQAN_ASSERT_GT(numParallelAlignments, 0u);  // Bad if reader is 0.
+
+        // Setup recycable ids.
+        _recycableIds.resize(numParallelAlignments);
+        std::iota(std::begin(_recycableIds), std::end(_recycableIds), 0);
+
+        setReaderWriterCount(_queue, numParallelAlignments, 1);
+
+        _exceptionPointers.resize(numParallelAlignments, nullptr);
+
+        try
+        { // Create the threads here, later we can try to make lazy thread creation.
+            for (unsigned i = 0; i < numParallelAlignments; ++i)
+            {
+                spawn(_pool, job);
+            }
+        }
+        catch (...)  // Make sure all the spawned threads are safely stopped before re-throwing the exception.
+        {
+            unlockWriting(_queue);
+            waitForWriters(_taskScheduler);
+            join(_pool);
+            throw;
+        }
+
+        setWriterCount(_taskScheduler, numParallelAlignments);
+        // Notify task scheduler, that everything was setup correctly.
+        for (unsigned i = 0; i < numParallelAlignments; ++i)
+        {
+            lockWriting(_taskScheduler);
+        }
+        waitForWriters(_taskScheduler);  // Invoke task scheduler.
+    }
+
+    // Default constructor.
+    WavefrontAlignmentScheduler() : WavefrontAlignmentScheduler(16, 8)
+    {}
+
+    // Copy & Move C'tor
+    WavefrontAlignmentScheduler(WavefrontAlignmentScheduler const &) = delete;
+    WavefrontAlignmentScheduler(WavefrontAlignmentScheduler &&)      = delete;
+
+    ///-------------------------------------------------------------------------
+    // Destructor.
+
+    ~WavefrontAlignmentScheduler()
+    {
+        // Signal that no more alignments will be added.
+        if (!_receivedEndSignal)
+            unlockWriting(_queue);
+
+        SEQAN_ASSERT(_queue.writerCount == 0);
+
+        // Wait until all remaining threads are finished with their execution.
+        join(_pool);
+
+        // In destructor of thread pool we wait for the outstanding alignments to be finished
+        // and then continue destruction of the remaining members and cleaning up the stack.
+    }
+
+    // ------------------------------------------------------------------------
+    // Member Functions.
+
+    // Copy & Move assignment
+    WavefrontAlignmentScheduler& operator=(WavefrontAlignmentScheduler const &) = delete;
+    WavefrontAlignmentScheduler& operator=(WavefrontAlignmentScheduler &&)      = delete;
+};
+
+// ============================================================================
+// Metafunctions
+// ============================================================================
+
+template<>
+struct SchedulerTraits<WavefrontAlignmentScheduler>
+{
+    using TTask = typename WavefrontAlignmentScheduler::TCallable;
+};
+
+// ============================================================================
+// Functions
+// ============================================================================
+
+/*
+ * @fn WavefrontAlignmentScheduler#isValid
+ * @headerfile <align_parallel.h>
+ * @brief Checks if scheduler is in a valid state. This means that no callable has terminated with an exception.
+ */
+inline bool
+isValid(WavefrontAlignmentScheduler const & me)
+{
+    return me._isValid.load(std::memory_order_acquire);
+}
+
+/*
+ * @fn WavefrontAlignmentScheduler#scheduleTask
+ * @headerfile <align_parallel.h>
+ * @brief Adds a new task to the scheduler. Suspends until resources become available.
+ * @throws ExceptionType?
+ */
+// basic exception-safety guarantee.
+// Throws if appendValue failed.
+inline void
+scheduleTask(WavefrontAlignmentScheduler & me,
+             typename SchedulerTraits<WavefrontAlignmentScheduler>::TTask && callable)
+{
+    if (!isValid(me))
+        throw std::runtime_error("Invalid alignment scheduler!");
+
+    // Spins until there is enough space to add to the queue.
+    if (!appendValue(me._queue, std::forward<decltype(callable)>(callable)))
+        throw std::runtime_error("Invalid alignment scheduler 2!");
+}
+
+inline void
+scheduleTask(WavefrontAlignmentScheduler & me,
+             typename SchedulerTraits<WavefrontAlignmentScheduler>::TTask & callable)
+{
+    if (!isValid(me))
+        throw std::runtime_error("Invalid alignment scheduler!");
+    // Spins until there is enough space to add to the queue.
+    if(!appendValue(me._queue, callable))
+        throw std::runtime_error("Invalid alignment scheduler 2!");
+}
+
+/*
+ * @fn WavefrontAlignmentScheduler#notify
+ * @headerfile <align_parallel.h>
+ * @brief Notify the scheduler that no more jobs will follow.
+ */
+inline void
+notify(WavefrontAlignmentScheduler & me)
+{
+    unlockWriting(me._queue);
+    me._receivedEndSignal = true;
+}
+
+/*
+ * @fn WavefrontAlignmentScheduler#wait
+ * @headerfile <align_parallel.h>
+ * @brief Explicit barrier on the scheduler. Suspends until all scheduled jobs have been finsihed.
+ *
+ * Note, can dead lock if notify is never called.
+ */
+// Only possible if some other thread is signaling the end of it.
+inline void
+wait(WavefrontAlignmentScheduler & me)
+{
+    join(me._pool);
+    wait(me._taskScheduler);
+}
+
+/*
+ * @fn WavefrontAlignmentScheduler#wait2
+ * @headerfile <align_parallel.h>
+ * @brief Explicit barrier on the scheduler. Suspends until all scheduled jobs have been finsihed.
+ *
+ * Note, can dead lock if notify is never called.
+ */
+template <typename TNotifiable>
+inline void
+wait2(WavefrontAlignmentScheduler & me, TNotifiable & notifiable)
+{
+    join(me._pool);
+    notify(notifiable);
+    wait(me._taskScheduler);
+}
+
+/*
+ * @fn WavefrontAlignmentScheduler#getExceptions
+ * @headerfile <align_parallel.h>
+ * @brief Returns vector of captured exceptions if any was thrown by the callable.
+ *
+ * Note, can dead lock if notify is never called.
+ */
+inline auto
+getExceptions(WavefrontAlignmentScheduler & me)
+{
+    auto vec = me._exceptionPointers;
+    auto innerExceptions = getExceptions(me._taskScheduler);
+    std::copy(std::begin(innerExceptions), std::end(innerExceptions), std::back_inserter(vec));
+    return vec;
+}
+
+/*
+ * @fn WavefrontAlignmentScheduler#taskScheduler
+ * @headerfile <align_parallel.h>
+ * @brief Returns lvalue reference to the underlying task_scheduler.
+ */
+inline auto&
+taskScheduler(WavefrontAlignmentScheduler & me)
+{
+    return me._taskScheduler;
+}
+
+}  // namespace seqan
+
+#endif  // #ifndef INCLUDE_SEQAN_ALIGN_PARALLEL_PARALLEL_ALIGNMENT_SCHEDULER_H_
diff --git a/include/seqan/align_parallel/wavefront_alignment_task.h b/include/seqan/align_parallel/wavefront_alignment_task.h
new file mode 100644
index 0000000..0334103
--- /dev/null
+++ b/include/seqan/align_parallel/wavefront_alignment_task.h
@@ -0,0 +1,404 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Rene Rahn <rene.rahn at fu-berlin.de>
+// ==========================================================================
+
+#ifndef INCLUDE_SEQAN_ALIGN_PARALLEL_WAVEFRONT_ALIGNMENT_TASK_H_
+#define INCLUDE_SEQAN_ALIGN_PARALLEL_WAVEFRONT_ALIGNMENT_TASK_H_
+
+namespace seqan
+{
+// ============================================================================
+// Forwards
+// ============================================================================
+
+// ============================================================================
+// Tags, Classes, Enums
+// ============================================================================
+
+// Config structre for the execution of one alignment using the wave-front model.
+template <typename TDPSettings>
+struct WavefrontAlignmentTaskConfig
+{
+    // ----------------------------------------------------------------------------
+    // Member Typedefs.
+
+    // DPTrait type forwarding.
+    using TDPTraits       = typename TDPSettings::TTraits;
+    using TScoreValue     = typename Value<typename TDPSettings::TScoringScheme>::Type;
+    using TAlgorithmType  = typename TDPTraits::TAlgorithmType;
+    using TTracebackType  = typename TDPTraits::TTracebackType;
+    using TGapType        = typename TDPTraits::TGapType;
+
+    // Wavefront Alignment Context.
+    using TDPCell         = DPCell_<TScoreValue, TGapType>;
+    using TBufferValue    = Pair<TDPCell, typename TraceBitMap_<>::Type>;
+    using TBuffer         = String<TBufferValue>;
+    using TBlockBuffer    = DPTileBuffer<TBuffer>;
+
+    // DP Execution Context.
+    using TDPProfile      = DPProfile_<TAlgorithmType, TGapType, TTracebackType, Parallel>;
+    using TDPCache        = DPContext<TDPCell, typename TraceBitMap_<>::Type>;
+    using TDPScout        = DPScout_<TDPCell, Default>;
+
+    // Parallel Context.
+    struct IntermediateTraits_
+    {
+        using TScoreValue   = decltype(maxScore(std::declval<TDPScout>()));
+        using THostPosition = decltype(maxHostPosition(std::declval<TDPScout>()));
+    };
+
+    using TDPIntermediate = WavefrontAlignmentResult<IntermediateTraits_>;
+
+    struct AlignThreadLocalConfig_
+    {
+        using TIntermediate = TDPIntermediate;
+        using TCache        = TDPCache;
+
+        using TLocalHost    = std::tuple<TIntermediate, TCache>;
+    };
+
+    using TThreadLocal = WavefrontAlignmentThreadLocalStorage<AlignThreadLocalConfig_>;
+    using TAlignEvent  = WavefrontTaskEvent;
+};
+
+#ifdef SEQAN_SIMD_ENABLED
+template <typename TDPSettings>
+struct WavefrontAlignmentSimdTaskConfig : public WavefrontAlignmentTaskConfig<TDPSettings>
+{
+    // ----------------------------------------------------------------------------
+    // Member Typedefs.
+
+    using TBase_ = WavefrontAlignmentTaskConfig<TDPSettings>;
+
+    using TDPSimdCell        = DPCell_<typename TDPSettings::TScoreValueSimd, typename TBase_::TGapType>;
+    using TDPSimdTraceValue  = typename TraceBitMap_<typename TDPSettings::TScoreValueSimd>::Type;
+
+    using TDPSimdScoreMatrix = String<TDPSimdCell, Alloc<OverAligned>>;
+    using TDPSimdTraceMatrix = String<TDPSimdTraceValue, Alloc<OverAligned>>;
+    using TDPSimdCache       = DPContext<TDPSimdCell, TDPSimdTraceValue, TDPSimdScoreMatrix, TDPSimdTraceMatrix>;
+
+    using TDPScout_          = DPScout_<TDPSimdCell, SimdAlignmentScout<> >;
+    using TDPIntermediate    = WavefrontAlignmentResult<typename TBase_::IntermediateTraits_>;
+
+    // Parallel Context.
+    struct SimdAlignThreadLocalConfig_
+    {
+
+        using TIntermediate = TDPIntermediate;
+        using TCache        = typename TBase_::TDPCache;
+        using TSimdCache    = TDPSimdCache;
+
+        using TLocalHost    = std::tuple<TIntermediate, TCache, TSimdCache>;
+    };
+
+    using TThreadLocal = WavefrontAlignmentThreadLocalStorage<SimdAlignThreadLocalConfig_>;
+    using TAlignEvent  = WavefrontTaskEvent;
+};
+#endif
+
+// Incubator to setup the alignment job.
+template <typename WavefrontAlignmentTaskConfigConcept>
+struct WavefrontAlignmentTaskIncubator
+{
+    using TWatc = WavefrontAlignmentTaskConfigConcept;
+
+    // ----------------------------------------------------------------------------
+    // Function createBlocks()
+    // ----------------------------------------------------------------------------
+
+    template <typename TSeq>
+    static auto createBlocks(TSeq const & seq, size_t const blockSize)
+    {
+        using TIter = typename Iterator<typename Infix<TSeq const>::Type, Standard>::Type;
+        String<Range<TIter>> blocks;
+        resize(blocks, (length(seq) + blockSize - 1) / blockSize, Exact());
+
+        for (unsigned id = 0; id < length(blocks); ++id)
+            blocks[id] = toRange(infix(seq, id * blockSize, _min(length(seq),(id + 1) * blockSize)));
+        return blocks;
+    }
+
+    // ----------------------------------------------------------------------------
+    // Function createBlockBuffer()
+    // ----------------------------------------------------------------------------
+
+    template <typename TSeqHBlocks, typename TSeqVBlovcks, typename TScore>
+    static auto createBlockBuffer(TSeqHBlocks const & seqHBlocks, TSeqVBlovcks const & seqVBlocks, TScore const & score)
+    {
+        using TDPCell = typename TWatc::TDPCell;
+        typename TWatc::TBlockBuffer buffer;
+        resize(buffer.horizontalBuffer, length(seqHBlocks), Exact());
+        resize(buffer.verticalBuffer, length(seqVBlocks), Exact());
+
+        typename TWatc::TBufferValue tmp;
+
+        using TDPMetaColH = DPMetaColumn_<typename TWatc::TDPProfile, MetaColumnDescriptor<DPInnerColumn, FullColumn>>;
+        using TDPMetaColV = DPMetaColumn_<typename TWatc::TDPProfile, MetaColumnDescriptor<DPInitialColumn, FullColumn>>;
+
+        TDPCell dummyCellD;
+        TDPCell dummyCellH;
+        TDPCell dummyCellV;
+        tmp.i2 = _computeScore(tmp.i1, dummyCellD, dummyCellH, dummyCellV,  Nothing(), Nothing(), score,
+                               RecursionDirectionZero(), typename TWatc::TDPProfile());
+        for (auto itH = begin(buffer.horizontalBuffer, Standard());
+             itH != end(buffer.horizontalBuffer, Standard());
+             ++itH)
+        {
+            resize(*itH, length(front(seqHBlocks)), Exact());
+            for (auto it = begin(*itH, Standard()); it != end(*itH, Standard()); ++it)
+            {
+                it->i2 = _computeScore(it->i1, dummyCellD, tmp.i1, dummyCellV, Nothing(), Nothing(), score,
+                                       typename RecursionDirection_<TDPMetaColH, FirstCell>::Type(),
+                                       typename TWatc::TDPProfile());
+                tmp.i1 = it->i1;
+            }
+        }
+        tmp.i1 = decltype(tmp.i1){};
+        tmp.i2 = _computeScore(tmp.i1, dummyCellD, dummyCellH, dummyCellV, Nothing(), Nothing(), score,
+                               RecursionDirectionZero(), typename TWatc::TDPProfile());
+
+        for (auto itV = begin(buffer.verticalBuffer, Standard()); itV != end(buffer.verticalBuffer, Standard()); ++itV)
+        {
+            resize(*itV, length(front(seqVBlocks)) + 1, Exact());
+            auto it = begin(*itV, Standard());
+            it->i2 = tmp.i2;
+            it->i1 = tmp.i1;
+            ++it;
+            for (; it != end(*itV, Standard()); ++it)
+            {
+                it->i2 = _computeScore(it->i1, dummyCellD, dummyCellH, dummyCellV, Nothing(), Nothing(), score,
+                                       typename RecursionDirection_<TDPMetaColV, InnerCell>::Type(),
+                                       typename TWatc::TDPProfile());
+                _setVerticalScoreOfCell(it->i1, _verticalScoreOfCell(dummyCellV));
+                tmp.i1 = it->i1;
+                tmp.i2 = it->i2;  // TODO(rrahn): Move out of loop.
+            }
+        }
+        return buffer;
+    }
+
+    // ----------------------------------------------------------------------------
+    // Function createTaskGraph()
+    // ----------------------------------------------------------------------------
+
+    template <typename TWavefrontTaskContext>
+    static auto createTaskGraph(TWavefrontTaskContext & taskContext)
+    {
+        using TDagTask = WavefrontTask<TWavefrontTaskContext>;
+
+        std::vector<std::vector<std::shared_ptr<TDagTask>>> graph;
+
+        resize(graph, length(taskContext.seqHBlocks));
+        for (int i = length(taskContext.seqHBlocks); --i >= 0;)
+        {
+            resize(graph[i], length(taskContext.seqVBlocks));
+            for (int j = length(taskContext.seqVBlocks); --j >= 0;)
+            {
+                using TSize = decltype(length(taskContext.seqHBlocks));
+                TDagTask * successorRight = (static_cast<TSize>(i + 1) < length(taskContext.seqHBlocks))
+                                                ?  graph[i+1][j].get()
+                                                : nullptr;
+                TDagTask * successorDown  = (static_cast<TSize>(j + 1) < length(taskContext.seqVBlocks))
+                                                ? graph[i][j+1].get()
+                                                : nullptr;
+                graph[i][j] = std::make_shared<TDagTask>(taskContext,
+                                                         std::array<TDagTask*, 2>{{successorRight, successorDown}},
+                                                         static_cast<size_t>(i), static_cast<size_t>(j),
+                                                         static_cast<size_t>(((i > 0) ? 1 : 0) + ((j > 0) ? 1 : 0)),
+                                                         (static_cast<TSize>(i + 1) == length(taskContext.seqHBlocks)),
+                                                         (static_cast<TSize>(j + 1) == length(taskContext.seqVBlocks)));
+            }
+        }
+        return graph;
+    }
+};
+
+// The actual alignment task that is executed by the wave-front model.
+template <typename TSeqH,
+          typename TSeqV,
+          typename TDPSettings,
+          typename TConfig = WavefrontAlignmentTaskConfig<TDPSettings>>
+class WavefrontAlignmentTask
+{
+public:
+
+    using TIncubator    = WavefrontAlignmentTaskIncubator<TConfig>;
+
+    using TSeqHBlocks   = decltype(TIncubator::createBlocks(std::declval<TSeqH>(), std::declval<size_t>()));
+    using TSeqVBlocks   = decltype(TIncubator::createBlocks(std::declval<TSeqV>(), std::declval<size_t>()));
+    using TTileBuffer   = decltype(TIncubator::createBlockBuffer(std::declval<TSeqHBlocks>(),
+                                                                 std::declval<TSeqVBlocks>(),
+                                                                 std::declval<typename TDPSettings::TScoringScheme>()));
+
+    using TTaskContext  = WavefrontAlignmentContext<TSeqHBlocks, TSeqVBlocks, TTileBuffer, TDPSettings>;
+
+    // ----------------------------------------------------------------------------
+    // Member Variables.
+    // ----------------------------------------------------------------------------
+
+    size_t              alignmentId{0};
+    TSeqH const &       seqH;
+    TSeqV const &       seqV;
+    TDPSettings const & dpSettings;
+    size_t              blockSize;
+
+    // ----------------------------------------------------------------------------
+    // Constructors.
+    // ----------------------------------------------------------------------------
+
+    WavefrontAlignmentTask() = delete;
+
+    WavefrontAlignmentTask(TSeqH const & seqH,
+                           TSeqV const & seqV,
+                           TDPSettings const & dpSetting,
+                           size_t const & blockSize) :
+        seqH(seqH),
+        seqV(seqV),
+        dpSettings(dpSetting),
+        blockSize(blockSize)
+    {}
+
+
+    WavefrontAlignmentTask(size_t const id,
+                           TSeqH const & seqH,
+                           TSeqV const & seqV,
+                           TDPSettings const & dpSetting,
+                           size_t const & blockSize) :
+        alignmentId(id),
+        seqH(seqH),
+        seqV(seqV),
+        dpSettings(dpSetting),
+        blockSize(blockSize)
+    {}
+
+    // ----------------------------------------------------------------------------
+    // Member Functions.
+    // ----------------------------------------------------------------------------
+
+    // This function now run's in a separate thread.
+    template <typename TWavefrontExecutor,
+              typename TCallback>
+    inline void
+    operator()(uint16_t const instanceId,
+               TWavefrontExecutor & executor,
+               TCallback && callback)
+    {
+        // Initialize the strings.
+        auto seqHBlocks = TIncubator::createBlocks(seqH, blockSize);
+        auto seqVBlocks = TIncubator::createBlocks(seqV, blockSize);
+
+        // Create the buffer for the matrix.
+        auto buffer = TIncubator::createBlockBuffer(seqHBlocks, seqVBlocks, dpSettings.scoringScheme);
+
+        // Setup the task context and create task graph.
+        TTaskContext taskContext{instanceId, seqHBlocks, seqVBlocks, buffer, dpSettings};
+        auto taskGraph = TIncubator::createTaskGraph(taskContext);
+
+        // Prepare event.
+        WavefrontTaskEvent event;
+        context(*taskGraph.back().back()).ptrEvent = &event;
+
+        // Kick off the execution.
+        using TWavefrontTaskExec = WavefrontTaskExecutor<std::decay_t<decltype(*taskGraph[0][0])>, TWavefrontExecutor>;
+        spawn(executor, TWavefrontTaskExec{taskGraph[0][0].get(), &executor});
+
+        // Wait for alignment to finish.
+        wait(event);
+
+        // Reduce.
+        typename TConfig::TDPIntermediate interMax{};
+        auto collectAndReset = [&](auto & threadLocalStorage)
+        {
+            updateMax(interMax, intermediate(threadLocalStorage, instanceId));
+            clear(intermediate(threadLocalStorage, instanceId));
+        };
+        combineEach(*executor.ptrThreadLocal, collectAndReset);
+        // Continue execution.
+        callback(alignmentId, interMax._maxState.first);
+    }
+
+    template <typename TWavefrontExecutor,
+              typename TSimdTaskQueue,
+              typename TCallback>
+    inline void
+    operator()(uint16_t const instanceId,
+               TWavefrontExecutor & executor,
+               TSimdTaskQueue & taskQueue,
+               TCallback && callback)
+    {
+        // Initialize the strings.
+        auto seqHBlocks = TIncubator::createBlocks(seqH, blockSize);
+        auto seqVBlocks = TIncubator::createBlocks(seqV, blockSize);
+
+        // Create the buffer for the matrix.
+        auto buffer = TIncubator::createBlockBuffer(seqHBlocks, seqVBlocks, dpSettings.scoringScheme);
+
+        // Setup the task context and create task graph.
+        TTaskContext taskContext{instanceId, seqHBlocks, seqVBlocks, buffer, dpSettings};
+        auto taskGraph = TIncubator::createTaskGraph(taskContext);
+
+        // Prepare event.
+        WavefrontTaskEvent event;
+        context(*taskGraph.back().back()).ptrEvent = &event;
+
+        // Kick off the execution.
+        using TWavefrontTaskExec = WavefrontTaskExecutor<TSimdTaskQueue, TWavefrontExecutor>;
+        appendValue(taskQueue, *taskGraph[0][0]);
+        spawn(executor, TWavefrontTaskExec{&taskQueue, &executor});
+
+        // Wait for alignment to finish.
+        wait(event);
+
+        // Reduce.
+        typename TConfig::TDPIntermediate interMax{};
+        auto collectAndReset = [&](auto & threadLocalStorage)
+        {
+            updateMax(interMax, intermediate(threadLocalStorage, instanceId));
+            clear(intermediate(threadLocalStorage, instanceId));
+        };
+        combineEach(*executor.ptrThreadLocal, collectAndReset);
+        callback(alignmentId, interMax._maxState.first);
+    }
+};
+
+// ============================================================================
+// Metafunctions
+// ============================================================================
+
+// ============================================================================
+// Functions
+// ============================================================================
+
+}  // namespace seqan
+
+#endif  // #ifndef INCLUDE_SEQAN_ALIGN_PARALLEL_WAVEFRONT_ALIGNMENT_TASK_H_
diff --git a/include/seqan/journaled_string_tree/stack_observer.h b/include/seqan/align_parallel/wavefront_alignment_thread_local_storage.h
similarity index 50%
copy from include/seqan/journaled_string_tree/stack_observer.h
copy to include/seqan/align_parallel/wavefront_alignment_thread_local_storage.h
index 53ffc8e..42f6aa2 100644
--- a/include/seqan/journaled_string_tree/stack_observer.h
+++ b/include/seqan/align_parallel/wavefront_alignment_thread_local_storage.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -32,8 +32,8 @@
 // Author: Rene Rahn <rene.rahn at fu-berlin.de>
 // ==========================================================================
 
-#ifndef INCLUDE_SEQAN_JOURNALED_STRING_TREE_STACK_OBSERVER_H_
-#define INCLUDE_SEQAN_JOURNALED_STRING_TREE_STACK_OBSERVER_H_
+#ifndef SEQAN_INCLUDE_ALIGN_PARALLEL_DP_THREAD_LOCAL_STORAGE_H_
+#define SEQAN_INCLUDE_ALIGN_PARALLEL_DP_THREAD_LOCAL_STORAGE_H_
 
 namespace seqan
 {
@@ -42,46 +42,49 @@ namespace seqan
 // Forwards
 // ============================================================================
 
-template <typename TObject>
-struct ObservedValue
-{
-    using Type = Nothing;
-};
-
 // ============================================================================
 // Tags, Classes, Enums
 // ============================================================================
 
-// ----------------------------------------------------------------------------
-// Tag PushEvent
-// ----------------------------------------------------------------------------
-
-struct PushEvent_;
-typedef Tag<PushEvent_> PushEvent;
+// Shared thread local storage for the parallel alignment instances.
+template <typename TConfig>
+class WavefrontAlignmentThreadLocalStorage
+{
+public:
+    //-------------------------------------------------------------------------
+    // Member Types.
 
-// ----------------------------------------------------------------------------
-// Tag PopEvent
-// ----------------------------------------------------------------------------
+    using TAlignmentLocal = typename TConfig::TLocalHost;
 
-struct PopEvent_;
-typedef Tag<PopEvent_> PopEvent;
+    //-------------------------------------------------------------------------
+    // Private Members.
 
-// ----------------------------------------------------------------------------
-// Class StackObserver
-// ----------------------------------------------------------------------------
+    std::vector<TAlignmentLocal>   _multiAlignmentThreadLocal;
 
-template <typename TObject>
-class StackObserver
-{
-public:
-    using TValue = typename ObservedValue<TObject>::Type;
-    using TStack = String<TValue, Block<> >;
+    //-------------------------------------------------------------------------
+    // Constructor.
 
-    TObject & _obj;
-    TStack _data;
+    explicit WavefrontAlignmentThreadLocalStorage(size_t const numAlignments) :
+        _multiAlignmentThreadLocal(numAlignments)
+    {}
 
-    StackObserver(TObject & obj) : _obj(obj)
+    // Delegating default constructor.
+    WavefrontAlignmentThreadLocalStorage() : WavefrontAlignmentThreadLocalStorage(1)
     {}
+
+    WavefrontAlignmentThreadLocalStorage(WavefrontAlignmentThreadLocalStorage const &) = default;
+    WavefrontAlignmentThreadLocalStorage(WavefrontAlignmentThreadLocalStorage &&) = default;
+
+    //-------------------------------------------------------------------------
+    // Destructor.
+
+    ~WavefrontAlignmentThreadLocalStorage() = default;
+
+    //-------------------------------------------------------------------------
+    // Member Functions.
+
+    WavefrontAlignmentThreadLocalStorage& operator=(WavefrontAlignmentThreadLocalStorage const &) = default;
+    WavefrontAlignmentThreadLocalStorage& operator=(WavefrontAlignmentThreadLocalStorage &&) = default;
 };
 
 // ============================================================================
@@ -92,31 +95,36 @@ public:
 // Functions
 // ============================================================================
 
-// ----------------------------------------------------------------------------
-// Function notify(); PushEvent
-// ----------------------------------------------------------------------------
-
-template <typename TObject>
-inline void
-notify(StackObserver<TObject> & me,
-       PushEvent const & /*tag*/)
+// Gets the intermediate result for the specific alignment job.
+template <typename TConfig>
+inline typename TConfig::TIntermediate &
+intermediate(WavefrontAlignmentThreadLocalStorage<TConfig> & me,
+             size_t const alignId)
 {
-    appendValue(me._data, getObservedValue(me._obj));
+    SEQAN_ASSERT_LT(alignId, me._multiAlignmentThreadLocal.size());
+    return std::get<typename TConfig::TIntermediate>(me._multiAlignmentThreadLocal[alignId]);
 }
 
-// ----------------------------------------------------------------------------
-// Function notify(); PopEvent
-// ----------------------------------------------------------------------------
-
-template <typename TObject>
-inline void
-notify(StackObserver<TObject> & me,
-       PopEvent const & /*tag*/)
+// Gets the chache for the specific alignment job.
+template <typename TConfig>
+inline typename TConfig::TCache &
+cache(WavefrontAlignmentThreadLocalStorage<TConfig> & me,
+      size_t const alignId)
 {
-    setObservedValue(me._obj, std::move(back(me._data)));
-    eraseBack(me._data);
+    SEQAN_ASSERT_LT(alignId, me._multiAlignmentThreadLocal.size());
+    return std::get<typename TConfig::TCache>(me._multiAlignmentThreadLocal[alignId]);
 }
 
+// Gets the simd chache for the specific alignment job.
+template <typename TConfig>
+inline typename TConfig::TSimdCache &
+simdCache(WavefrontAlignmentThreadLocalStorage<TConfig> & me,
+          size_t const alignId)
+{
+    SEQAN_ASSERT_LT(alignId, me._multiAlignmentThreadLocal.size());
+    return std::get<typename TConfig::TSimdCache>(me._multiAlignmentThreadLocal[alignId]);
 }
 
-#endif  // #ifndef INCLUDE_SEQAN_JOURNALED_STRING_TREE_STACK_OBSERVER_H_
+}  // namespace seqan
+
+#endif  // SEQAN_INCLUDE_ALIGN_PARALLEL_DP_THREAD_LOCAL_STORAGE_H_
diff --git a/include/seqan/align_parallel/wavefront_task.h b/include/seqan/align_parallel/wavefront_task.h
new file mode 100644
index 0000000..b9bd8a4
--- /dev/null
+++ b/include/seqan/align_parallel/wavefront_task.h
@@ -0,0 +1,365 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Rene Rahn <rene.rahn at fu-berlin.de>
+// ==========================================================================
+
+#ifndef INCLUDE_SEQAN_ALIGN_PARALLEL_WAVEFRONT_TASK_H_
+#define INCLUDE_SEQAN_ALIGN_PARALLEL_WAVEFRONT_TASK_H_
+
+namespace seqan
+{
+// ============================================================================
+// Forwards
+// ============================================================================
+
+// ============================================================================
+// Tags, Classes, Enums
+// ============================================================================
+
+// Context used per task. Access information like the infixes of the sequences for this block and other.
+template <typename TSeqHBlocks,
+          typename TSeqVBlocks,
+          typename TTileBuffer,
+          typename TDPSettings,
+          typename TEvent = WavefrontTaskEvent>
+struct WavefrontAlignmentContext
+{
+    size_t              alignmentId{0};
+    TSeqHBlocks const & seqHBlocks;
+    TSeqVBlocks const & seqVBlocks;
+    TTileBuffer       & tileBuffer;
+    TDPSettings const & dpSettings;
+    TEvent            * ptrEvent{nullptr};
+
+    //NOTE(rrahn) Bug in g++-4.9 prevents us from using as aggregate type.
+    WavefrontAlignmentContext(size_t const _alignmentId,
+                              TSeqHBlocks const & _seqHBlocks,
+                              TSeqVBlocks const & _seqVBlocks,
+                              TTileBuffer       & _tileBuffer,
+                              TDPSettings const & _dpSettings) :
+        alignmentId(_alignmentId),
+        seqHBlocks(_seqHBlocks),
+        seqVBlocks(_seqVBlocks),
+        tileBuffer(_tileBuffer),
+        dpSettings(_dpSettings)
+    {}
+};
+
+// The abstract task that is executed as separat alignment instance.
+template <typename TAlignmentContext>
+class WavefrontTask
+{
+public:
+
+    using TContext  = TAlignmentContext;
+
+    TContext &                     context;
+    std::array<WavefrontTask*, 2>  successor{{nullptr, nullptr}};
+    size_t                         col{0};
+    size_t                         row{0};
+    std::atomic<size_t>            refCount{0};
+    bool                           lastTileH{false};
+    bool                           lastTileV{false};
+
+
+    //-------------------------------------------------------------------------
+    // Constructor
+    WavefrontTask() = delete;
+
+    WavefrontTask(TContext & context, std::array<WavefrontTask*, 2> successor,
+                  size_t const col,
+                  size_t const row,
+                  size_t const refCount,
+                  bool const lastTileH,
+                  bool const lastTileV) :
+        context(context),
+        successor(std::move(successor)),
+        col(col), row(row),
+        refCount(refCount),
+        lastTileH(lastTileH), lastTileV(lastTileV)
+    {}
+};
+
+// ============================================================================
+// Metafunctions
+// ============================================================================
+
+template <typename TContext>
+struct TaskExecutionTraits;
+
+template <typename ...TArgs>
+struct TaskExecutionTraits<WavefrontAlignmentContext<TArgs...>>
+{
+    using TaskContext_      = WavefrontAlignmentContext<TArgs...>;
+
+    using TSeqHBlocks       = typename std::decay<decltype(std::declval<TaskContext_>().seqHBlocks)>::type;
+    using TSeqVBlocks       = typename std::decay<decltype(std::declval<TaskContext_>().seqVBlocks)>::type;
+    using TWavefrontBuffer  = typename std::decay<decltype(std::declval<TaskContext_>().tileBuffer)>::type;
+    using TDPSettings       = typename std::decay<decltype(std::declval<TaskContext_>().dpSettings)>::type;
+
+    using TTileBuffer       = typename std::decay<decltype(std::declval<TWavefrontBuffer>().horizontalBuffer[0])>::type;
+    using TDPScoutState     = DPScoutState_<DPTiled<TTileBuffer>>;
+
+    // Sequence types.
+    using TSeqH = typename Value<TSeqHBlocks>::Type;
+    using TSeqV = typename Value<TSeqVBlocks>::Type;
+
+    // DPTrait type forwarding.
+    using TDPTraits         = typename TDPSettings::TTraits;
+    using TScoreValue       = typename Value<typename TDPSettings::TScoringScheme>::Type;
+    using TAlgorithmType    = typename TDPTraits::TAlgorithmType;
+    using TTracebackType    = typename TDPTraits::TTracebackType;
+    using TGapType          = typename TDPTraits::TGapType;
+
+    // Wavefront Alignment Context.
+    using TDPCell           = DPCell_<TScoreValue, TGapType>;
+
+    using TScoutSpec        = typename ScoutSpecForAlignmentAlgorithm_<TAlgorithmType, TDPScoutState>::Type;
+    using TDPScout          = DPScout_<TDPCell, TScoutSpec>;
+};
+
+template <typename TWavefrontAlignmentContextConcept>
+struct SimdTaskExecutionTraits : public TaskExecutionTraits<TWavefrontAlignmentContextConcept>
+{
+    using TBase = TaskExecutionTraits<TWavefrontAlignmentContextConcept>;
+
+    using TScoreValue = typename TBase::TDPSettings::TScoreValueSimd;
+    using TDPCell     = DPCell_<TScoreValue, typename TBase::TGapType>;
+    using TTraceValue = typename TraceBitMap_<TScoreValue>::Type;
+    using TBufferValue = Pair<TDPCell, TTraceValue>;
+};
+
+// ============================================================================
+// Functions
+// ============================================================================
+
+template <typename ...TArgs>
+inline void
+setRefCount(WavefrontTask<TArgs...> & me, size_t const count)
+{
+    me.refCount.store(count, std::memory_order_relaxed);
+}
+
+template <typename ...TArgs>
+inline unsigned
+decrementRefCount(WavefrontTask<TArgs...> & me)
+{
+    return --me.refCount;
+}
+
+template <typename ...TArgs>
+inline unsigned
+incrementRefCount(WavefrontTask<TArgs...> & me)
+{
+    return ++me.refCount;
+}
+
+template <typename TTask>
+inline auto
+column(TTask const & task) -> decltype(task.col)
+{
+    return task.col;
+}
+
+template <typename TTask>
+inline auto
+row(TTask const & task) -> decltype(task.row)
+{
+    return task.row;
+}
+
+template <typename TTask>
+inline bool
+inLastColumn(TTask const & task)
+{
+    return task.lastTileH;
+}
+
+template <typename TTask>
+inline bool
+inLastRow(TTask const & task)
+{
+    return task.lastTileV;
+}
+
+template <typename TTask>
+inline bool
+isLastTask(TTask const & task)
+{
+    return inLastColumn(task) && inLastRow(task);
+}
+
+template <typename TTask>
+inline auto
+successor(TTask & task) -> std::add_lvalue_reference_t<decltype(task.successor)>
+{
+    return task.successor;
+}
+
+template <typename TTask>
+inline auto
+successor(TTask const & task) -> std::add_lvalue_reference_t<std::add_const_t<decltype(task.successor)>>
+{
+    return task.successor;
+}
+
+template <typename TTask>
+inline auto
+context(TTask & task) -> std::add_lvalue_reference_t<decltype(task.context)>
+{
+    return task.context;
+}
+
+template <typename TTask>
+inline auto
+context(TTask const & task) -> std::add_lvalue_reference_t<std::add_const_t<decltype(task.context)>>
+{
+    return task.context;
+}
+
+template <typename TAlgorithm, typename TTask>
+inline bool
+isTrackTile(TTask const & task)
+{
+    return isLastColumn(task) && isLastRow(task);
+}
+
+template <typename TTask>
+inline bool
+isTrackTile(TTask const & task)
+{
+    return isLastColumn(task) && isLastRow(task);
+}
+
+template <typename TTask, typename TDPLocalData>
+inline void
+executeScalar(TTask & task, TDPLocalData & dpLocal)
+{
+    using TExecTraits = TaskExecutionTraits<typename TTask::TContext>;
+
+    auto & taskContext = context(task);
+    // Load the cache from the local data.
+    auto & dpCache = cache(dpLocal, taskContext.alignmentId);
+    auto & buffer = taskContext.tileBuffer;
+
+    // Capture the buffer.
+    typename TExecTraits::TDPScoutState scoutState(buffer.horizontalBuffer[column(task)],
+                                                   buffer.verticalBuffer[row(task)]);  // Task local
+
+    typename TExecTraits::TDPScout scout(scoutState);
+
+    impl::computeTile(dpCache, scout,
+                      taskContext.seqHBlocks[column(task)],
+                      taskContext.seqVBlocks[row(task)],
+                      taskContext.dpSettings.scoringScheme,
+                      taskContext.dpSettings);
+    // We want to get the state here from the scout.
+    if(impl::AlgorithmProperty<typename TExecTraits::TAlgorithmType>::isTrackingEnabled(task))
+    {
+        // TODO(rrahn): Implement the interface.
+        // TODO(rrahn): Make it a member function of a policy so that we don't have to implement the specifics here
+        updateMax(intermediate(dpLocal, taskContext.alignmentId),
+                  {maxScore(scout), maxHostPosition(scout)},
+                  column(task),
+                  row(task));
+    }
+}
+
+template <typename TBuffer>
+inline void
+printSimdBuffer(TBuffer const & buffer, size_t const l)
+{
+    for (auto simdHolder : buffer)
+    {
+        std::cout << "<";
+        unsigned i = 0;
+        for (; i < l - 1; ++i)
+        {
+            std::cout << simdHolder.i1._score[i] << ", ";
+        }
+        std::cout << simdHolder.i1._score[i] << ">\n";
+    }
+}
+
+#ifdef SEQAN_SIMD_ENABLED
+template <typename TTasks, typename TDPLocalData>
+inline void
+executeSimd(TTasks & tasks, TDPLocalData & dpLocal)
+{
+    using TTask = typename std::remove_pointer<typename Value<TTasks>::Type>::type;
+    using TExecTraits = SimdTaskExecutionTraits<typename TTask::TContext>;
+
+    auto offset = impl::computeOffset(tasks, TExecTraits{});
+    // Has to be adapted to take the correct buffer from the corresponding task.
+    auto simdBufferH = impl::gatherSimdBuffer(tasks,
+                                              [] (auto & task)
+                                              {
+                                                  return &context(task).tileBuffer.horizontalBuffer[column(task)];
+                                              },
+                                              offset,
+                                              TExecTraits{});
+    auto simdBufferV = impl::gatherSimdBuffer(tasks,
+                                              [] (auto & task)
+                                              {
+                                                  return &context(task).tileBuffer.verticalBuffer[row(task)];
+                                              },
+                                              offset,
+                                              TExecTraits{});
+
+    // Does not really make sense.
+    auto & cache = simdCache(dpLocal, 0);
+    // Run alignment.
+    impl::computeSimdBatch(cache, simdBufferH, simdBufferV, tasks, dpLocal, offset, TExecTraits{});
+
+    // Write back into buffer.
+    impl::scatterSimdBuffer(tasks,
+                            simdBufferH,
+                            [](auto & task)
+                            {
+                                return &context(task).tileBuffer.horizontalBuffer[column(task)];
+                            },
+                            offset,
+                            TExecTraits{});
+    impl::scatterSimdBuffer(tasks,
+                            simdBufferV,
+                            [](auto & task)
+                            {
+                                return &context(task).tileBuffer.verticalBuffer[row(task)];
+                            },
+                            offset,
+                            TExecTraits{});
+}
+#endif  // SEQAN_SIMD_ENABLED
+
+}  // namespace seqan
+
+#endif  // INCLUDE_SEQAN_ALIGN_PARALLEL_WAVEFRONT_TASK_H_
diff --git a/include/seqan/journaled_set/journaled_set_join_global_align_manhatten.h b/include/seqan/align_parallel/wavefront_task_event.h
similarity index 63%
copy from include/seqan/journaled_set/journaled_set_join_global_align_manhatten.h
copy to include/seqan/align_parallel/wavefront_task_event.h
index 8a287d2..ccd18dc 100644
--- a/include/seqan/journaled_set/journaled_set_join_global_align_manhatten.h
+++ b/include/seqan/align_parallel/wavefront_task_event.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -32,10 +32,11 @@
 // Author: Rene Rahn <rene.rahn at fu-berlin.de>
 // ==========================================================================
 
-#ifndef INCLUDE_SEQAN_JOURNALED_SET_JOURNALED_SET_JOIN_GLOBAL_ALIGN_MANHATTEN_H_
-#define INCLUDE_SEQAN_JOURNALED_SET_JOURNALED_SET_JOIN_GLOBAL_ALIGN_MANHATTEN_H_
+#ifndef INCLUDE_SEQAN_ALIGN_PARALLEL_WAVEFRONT_TASK_EVENT_H_
+#define INCLUDE_SEQAN_ALIGN_PARALLEL_WAVEFRONT_TASK_EVENT_H_
 
-namespace seqan {
+namespace seqan
+{
 
 // ============================================================================
 // Forwards
@@ -45,6 +46,35 @@ namespace seqan {
 // Tags, Classes, Enums
 // ============================================================================
 
+// Event to signal end of one alignment instance.
+class WavefrontTaskEvent
+{
+public:
+    std::mutex                  mutexLastTask{};
+    std::condition_variable     conditionLastTask{};
+    bool                        readyLastTask{false};
+
+    WavefrontTaskEvent() = default;
+
+    WavefrontTaskEvent(WavefrontTaskEvent const &) = delete;
+    WavefrontTaskEvent(WavefrontTaskEvent &&) = delete;
+
+    WavefrontTaskEvent& operator=(WavefrontTaskEvent const &) = delete;
+    WavefrontTaskEvent& operator=(WavefrontTaskEvent &&) = delete;
+
+    ~WavefrontTaskEvent()
+    {
+        if (!readyLastTask)
+        {
+            {
+                std::lock_guard<decltype(mutexLastTask)> lck(mutexLastTask);
+                readyLastTask = true;
+            }
+            conditionLastTask.notify_one();
+        }
+    }
+};
+
 // ============================================================================
 // Metafunctions
 // ============================================================================
@@ -53,29 +83,22 @@ namespace seqan {
 // Functions
 // ============================================================================
 
-// ----------------------------------------------------------------------------
-// Function _joinInternal()                   [GlobalAlign<JournaledManhatten>]
-// ----------------------------------------------------------------------------
-
-template <typename TValue, typename THostSpec, typename TJournalSpec, typename TBuffSpec, typename TJournalString2>
 inline void
-_joinInternal(String<TValue, Journaled<THostSpec, TJournalSpec, TBuffSpec> > & journal,
-              StringSet<TJournalString2, Owner<JournaledSet> > const & journalSet,
-              JoinConfig<GlobalAlign<JournaledManhatten> > const &)
+notify(WavefrontTaskEvent & event)
 {
+    std::lock_guard<decltype(event.mutexLastTask)> lck(event.mutexLastTask);
+    event.readyLastTask = true;
+    event.conditionLastTask.notify_one();  // We require a strict synchronization between waiting and notifying thread.
+}
 
-    typedef String <TValue, Journaled<THostSpec, TJournalSpec, TBuffSpec> > TJournalString;
-    typedef typename TJournalString::TJournalEntry TJounralEntry;
-//    typedef typename Size<TJournalString>::Type TSize;
-
-    JournalTraceBuffer<TJournalString> traceDescriptor;
-    std::stringstream stream;
-    stream << journal;
-    appendValue(getTrace(traceDescriptor), TJounralEntry(SOURCE_PATCH, 0, 0, 0,length(journal)));
-    append(getInsertionBuffer(traceDescriptor), stream.str());
-    _applyTraceOperations(journal, host(journalSet), traceDescriptor);
+inline void
+wait(WavefrontTaskEvent & event)
+{
+    std::unique_lock<decltype(event.mutexLastTask)> lck(event.mutexLastTask);
+    if (!event.readyLastTask)
+        event.conditionLastTask.wait(lck, [&] { return event.readyLastTask; });
 }
 
 }  // namespace seqan
 
-#endif  // #ifndef INCLUDE_SEQAN_JOURNALED_SET_JOURNALED_SET_JOIN_GLOBAL_ALIGN_MANHATTEN_H_
+#endif  // #ifndef INCLUDE_SEQAN_ALIGN_PARALLEL_WAVEFRONT_TASK_EVENT_H_
diff --git a/include/seqan/align_parallel/wavefront_task_executor.h b/include/seqan/align_parallel/wavefront_task_executor.h
new file mode 100644
index 0000000..ab0f933
--- /dev/null
+++ b/include/seqan/align_parallel/wavefront_task_executor.h
@@ -0,0 +1,146 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Rene Rahn <rene.rahn at fu-berlin.de>
+// ==========================================================================
+
+#ifndef INCLUDE_SEQAN_ALIGN_PARALLEL_WAVEFRONT_TASK_EXECUTOR_H_
+#define INCLUDE_SEQAN_ALIGN_PARALLEL_WAVEFRONT_TASK_EXECUTOR_H_
+
+namespace seqan
+{
+
+// ============================================================================
+// Forwards
+// ============================================================================
+
+template <typename TResource>
+struct WavefrontTaskExecutionPolicy;
+
+// ============================================================================
+// Tags, Classes, Enums
+// ============================================================================
+
+// Task executor. Manages the execution of single alignment blocks.
+template <typename TResource, typename TWavefrontExecutor>
+struct WavefrontTaskExecutor
+{
+    TResource*            _ptrResource{nullptr};
+    TWavefrontExecutor *  _ptrWavefrontExecutor{nullptr};
+
+    //NOTE(rrahn) Bug in g++-4.9 prevents us from using as aggregate type.
+    WavefrontTaskExecutor() = default;
+
+    WavefrontTaskExecutor(TResource * _resource,
+                          TWavefrontExecutor * _wavefrontExecutor) :
+            _ptrResource{_resource},
+            _ptrWavefrontExecutor(_wavefrontExecutor)
+    {}
+
+    inline void operator()()
+    {
+        WavefrontTaskExecutionPolicy<TResource>::execute(*_ptrResource, *_ptrWavefrontExecutor);
+    }
+};
+
+// Policy for no SIMD execution.
+template <typename ...TArgs>
+struct WavefrontTaskExecutionPolicy<WavefrontTask<TArgs...>>
+{
+
+    template <typename TResource, typename TWavefrontExecutor>
+    inline static void
+    execute(TResource & task, TWavefrontExecutor & wavefrontExec)
+    {
+        using TWaveTaskExec = WavefrontTaskExecutor<TResource, TWavefrontExecutor>;
+
+        executeScalar(task, local(wavefrontExec));
+        for (auto succ : successor(task))
+        {
+            if (succ && decrementRefCount(*succ) == 0)
+                spawn(wavefrontExec, TWaveTaskExec{succ, &wavefrontExec});
+        }
+        if (isLastTask(task))
+        {
+            notify(*(context(task).ptrEvent));
+        }
+    }
+};
+
+// Policy for SIMD execution.
+template <typename TValue, size_t VECTOR_SIZE>
+struct WavefrontTaskExecutionPolicy<WavefrontTaskQueue<TValue, VECTOR_SIZE>>
+{
+    template <typename TResource, typename TWavefrontExecutor>
+    inline static void
+    execute(TResource & resource, TWavefrontExecutor & wavefrontExec)
+    {
+        using TWaveTaskExec = WavefrontTaskExecutor<TResource, TWavefrontExecutor>;
+
+        typename TResource::ResultType tasks;
+        if (!tryPopTasks(tasks, resource))
+            return;
+
+        SEQAN_ASSERT(!empty(tasks));
+        if (tasks.size()  == 1)
+            executeScalar(*front(tasks), local(wavefrontExec));
+        else
+            executeSimd(tasks, local(wavefrontExec));
+
+        for (auto task : tasks)
+        {
+            for (auto succ : successor(*task))
+            {
+                if (succ && decrementRefCount(*succ) == 0)
+                {
+                    appendValue(resource, *succ);
+                    spawn(wavefrontExec, TWaveTaskExec{&resource, &wavefrontExec});
+                }
+            }
+            if (isLastTask(*task))
+            {
+                notify(*(context(*task).ptrEvent));
+            }
+        }
+    }
+};
+
+// ============================================================================
+// Metafunctions
+// ============================================================================
+
+// ============================================================================
+// Functions
+// ============================================================================
+
+}  // namespace seqan
+
+#endif  // #ifndef INCLUDE_SEQAN_ALIGN_PARALLEL_WAVEFRONT_TASK_EXECUTOR_H_
diff --git a/include/seqan/align/dp_cell_linear.h b/include/seqan/align_parallel/wavefront_task_queue.h
similarity index 55%
copy from include/seqan/align/dp_cell_linear.h
copy to include/seqan/align_parallel/wavefront_task_queue.h
index 1a46fbe..d64b61f 100644
--- a/include/seqan/align/dp_cell_linear.h
+++ b/include/seqan/align_parallel/wavefront_task_queue.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -31,15 +31,12 @@
 // ==========================================================================
 // Author: Rene Rahn <rene.rahn at fu-berlin.de>
 // ==========================================================================
-// Implements the DPCell for linear gap cost functions. This requires only
-// one matrix, such that we only need to store one score value per matrix
-// entry.
-// ==========================================================================
 
-#ifndef SEQAN_INCLUDE_SEQAN_ALIGN_DP_CELL_LINEAR_H_
-#define SEQAN_INCLUDE_SEQAN_ALIGN_DP_CELL_LINEAR_H_
+#ifndef INCLUDE_SEQAN_ALIGN_PARALLEL_DP_WAVEFRONT_TASK_QUEUE_H_
+#define INCLUDE_SEQAN_ALIGN_PARALLEL_DP_WAVEFRONT_TASK_QUEUE_H_
 
-namespace seqan {
+namespace seqan
+{
 
 // ============================================================================
 // Forwards
@@ -49,47 +46,45 @@ namespace seqan {
 // Tags, Classes, Enums
 // ============================================================================
 
-
-// ----------------------------------------------------------------------------
-// Class DPCell                                                    [LinearGaps]
-// ----------------------------------------------------------------------------
-
-// The specialization for linear gap cost function.
-// It solely stores the maximal score.
-template <typename TScoreValue>
-class DPCell_<TScoreValue, LinearGaps>
+// Central task queue used in simd mode to gather multiple blocks to gather full simd registers.
+template <typename TValue,
+          size_t VECTOR_SIZE_>
+class WavefrontTaskQueue
 {
 public:
-    TScoreValue _score = DPCellDefaultInfinity<DPCell_>::VALUE;
-
-    DPCell_() = default;
-    
-    // Copy c'tor.
-    DPCell_(DPCell_ const & other) : _score(other._score)
-    {}
-    
-    // Move c'tor.
-    DPCell_(DPCell_ && other) : DPCell_()
-    {
-        swap(*this, other);
-    }
-    
-    // Assignment & move operator
-    DPCell_& operator=(DPCell_ other)
+
+
+    // Member Types.
+    using TQueue = ConcurrentQueue<TValue*>;
+    using ResultType = std::vector<TValue*>;
+    using ValueType = TValue;
+
+    // Members.
+    static constexpr size_t VECTOR_SIZE{VECTOR_SIZE_};
+
+    TQueue      queue;
+    std::mutex  mutexPopQueue;
+    bool        hasNotified{false};
+
+    // Constructors.
+    WavefrontTaskQueue()
     {
-        swap(*this, other);
-        return *this;
+        lockWriting(queue);
+        lockReading(queue);
     }
 
-    // Assignment of score.
-    DPCell_ &
-    operator=(TScoreValue const & score)
+    WavefrontTaskQueue(WavefrontTaskQueue const&) = delete;
+    WavefrontTaskQueue(WavefrontTaskQueue &&) = delete;
+
+    WavefrontTaskQueue& operator=(WavefrontTaskQueue const &) = delete;
+    WavefrontTaskQueue& operator=(WavefrontTaskQueue &&) = delete;
+
+    ~WavefrontTaskQueue()
     {
-        _score = score;
-        return *this;
+        if (!hasNotified)
+            unlockWriting(queue);
+        unlockReading(queue);
     }
-
-    ~DPCell_() = default;
 };
 
 // ============================================================================
@@ -100,26 +95,45 @@ public:
 // Functions
 // ============================================================================
 
-// ----------------------------------------------------------------------------
-// Function operator<()
-// ----------------------------------------------------------------------------
+template <typename TValue, size_t VECTOR_SIZE>
+inline bool
+tryPopTasks(typename WavefrontTaskQueue<TValue, VECTOR_SIZE>::ResultType & tasks,
+            WavefrontTaskQueue<TValue, VECTOR_SIZE> & me)
+{
+    clear(tasks);
+    std::lock_guard<std::mutex> lck(me.mutexPopQueue);
+    if (length(me.queue) < WavefrontTaskQueue<TValue, VECTOR_SIZE>::VECTOR_SIZE)
+    {
+        resize(tasks, 1);
+        if (!popFront(tasks[0], me.queue, Serial()))
+        {
+            return false;
+        }
+    }
+    else
+    {
+        for (size_t lane = 0u; lane < VECTOR_SIZE; ++lane)
+            tasks.push_back(popFront(me.queue, Serial()));
+    }
+    return true;
+}
 
-// Needed for banded chain alignment for the std::set.
-template <typename TScoreValueLeft, typename TScoreValueRight>
-inline bool operator<(DPCell_<TScoreValueLeft, LinearGaps> const & left,
-                      DPCell_<TScoreValueRight, LinearGaps> const & right)
+template <typename TValue, size_t VECTOR_SIZE>
+inline void
+appendValue(WavefrontTaskQueue<TValue, VECTOR_SIZE> & me,
+            TValue & newTask)
 {
-    return left._score < right._score;
+    appendValue(me.queue, &newTask);
 }
 
-template <typename TScoreValue>
-inline void 
-swap(DPCell_<TScoreValue, LinearGaps> & lhs, 
-     DPCell_<TScoreValue, LinearGaps> & rhs)
+template <typename TValue, size_t VECTOR_SIZE>
+inline void
+notify(WavefrontTaskQueue<TValue, VECTOR_SIZE> & me)
 {
-    std::swap(lhs._score, rhs._score);
+    me.hasNotified = true;
+    unlockWriting(me.queue);
 }
 
 }  // namespace seqan
 
-#endif  // #ifndef SEQAN_INCLUDE_SEQAN_ALIGN_DP_CELL_LINEAR_H_
+#endif  // #ifndef INCLUDE_SEQAN_ALIGN_PARALLEL_DP_WAVEFRONT_TASK_QUEUE_H_
diff --git a/include/seqan/align_parallel/wavefront_task_scheduler.h b/include/seqan/align_parallel/wavefront_task_scheduler.h
new file mode 100644
index 0000000..c246796
--- /dev/null
+++ b/include/seqan/align_parallel/wavefront_task_scheduler.h
@@ -0,0 +1,218 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Rene Rahn <rene.rahn at fu-berlin.de>
+// ==========================================================================
+
+#ifndef INCLUDE_SEQAN_ALIGN_PARALLEL_WAVEFRONT_TASK_SCHEDULER_H_
+#define INCLUDE_SEQAN_ALIGN_PARALLEL_WAVEFRONT_TASK_SCHEDULER_H_
+
+namespace seqan
+{
+
+// ============================================================================
+// Forwards
+// ============================================================================
+
+// ============================================================================
+// Tags, Classes, Enums
+// ============================================================================
+
+// Scheduler for wavefront tasks.
+class WavefrontTaskScheduler
+{
+public:
+
+    //-------------------------------------------------------------------------
+    // Memeber Types
+
+    using TWrapper = std::function<void()>;
+    using TTaskQueue = ConcurrentQueue<TWrapper>;
+
+    //-------------------------------------------------------------------------
+    // Member Variables
+
+    ThreadPool  _threadPool;
+    TTaskQueue  _taskQueue;
+
+    unsigned    _writerCount;
+
+    std::mutex                      _mutexPushException;
+    std::vector<std::exception_ptr> _exceptionPointers;
+    std::atomic<bool>               _isValid{true};
+
+    std::function<void()> job = [this] ()
+    {
+        lockReading(_taskQueue);
+        waitForFirstValue(_taskQueue);  // Wait for all writers to be setup.
+
+        std::function<void()> _dummy = [] ()
+        {  // TODO(rrahn): Could throw exception to signal something went terribly wrong.
+            SEQAN_ASSERT_FAIL("Trying to exceute empty wavefront task in a thread");
+        };
+        TWrapper task{_dummy};
+
+        while (true)
+        {
+            if (!popFront(task, _taskQueue))
+                break;  // Empty queue and no writer registered.
+
+            try
+            {
+                task();  // Execute the task;
+            }
+            catch (...)
+            {  // Catch exception, and signal failure. Continue running until queue is empty.
+                {
+                    std::lock_guard<std::mutex> lck(_mutexPushException);
+                    _exceptionPointers.push_back(std::current_exception());
+                }
+                _isValid.store(false, std::memory_order_release);
+            }
+        }
+        unlockReading(_taskQueue);
+    };
+
+    //-------------------------------------------------------------------------
+    // Constructor
+
+    WavefrontTaskScheduler(size_t const threadCount, size_t const writerCount) :
+        _writerCount(writerCount)
+    {
+
+        for (unsigned i = 0; i < threadCount; ++i)
+        {
+            spawn(_threadPool, job);
+        }
+        setCpuAffinity(_threadPool, 0, 1);
+    }
+
+    WavefrontTaskScheduler(size_t const threadCount) : WavefrontTaskScheduler(threadCount, 0)
+    {}
+
+    WavefrontTaskScheduler(WavefrontTaskScheduler const &) = delete;
+    WavefrontTaskScheduler(WavefrontTaskScheduler &&) = delete;
+
+    //-------------------------------------------------------------------------
+    // Member Functions
+
+    WavefrontTaskScheduler& operator=(WavefrontTaskScheduler const &) = delete;
+    WavefrontTaskScheduler& operator=(WavefrontTaskScheduler &&) = delete;
+
+    //-------------------------------------------------------------------------
+    // Destructor
+
+    ~WavefrontTaskScheduler()
+    {}
+    // In destructor of thread pool we wait for the outstanding alignments to be finished
+    // and then continue destruction of the remaining members and cleaning up the stack.
+    // Note the number of writers must be set to 0, for the queue to stop spinning.
+};
+
+// ============================================================================
+// Metafunctions
+// ============================================================================
+
+template <typename TScheduler>
+struct SchedulerTraits;
+
+template <>
+struct SchedulerTraits<WavefrontTaskScheduler>
+{
+    using TWrapper_ = typename WavefrontTaskScheduler::TWrapper;
+    using TTask  = TWrapper_;
+};
+
+// ============================================================================
+// Functions
+// ============================================================================
+
+inline void
+setWriterCount(WavefrontTaskScheduler & me, size_t const count) noexcept
+{
+    me._writerCount = count;
+}
+
+inline void
+lockWriting(WavefrontTaskScheduler & me) noexcept
+{
+    lockWriting(me._taskQueue);
+}
+
+inline void
+unlockWriting(WavefrontTaskScheduler & me) noexcept
+{
+    unlockWriting(me._taskQueue);
+}
+
+inline void
+waitForWriters(WavefrontTaskScheduler & me) noexcept
+{
+    waitForWriters(me._taskQueue, me._writerCount);
+}
+
+inline bool
+isValid(WavefrontTaskScheduler & me) noexcept
+{
+    return me._isValid.load(std::memory_order_acquire);
+}
+
+inline void
+scheduleTask(WavefrontTaskScheduler & me,
+             typename SchedulerTraits<WavefrontTaskScheduler>::TTask task)
+{
+    if (!isValid(me))
+    {  // TODO(rrahn): Improve error handling.
+        throw std::runtime_error("Invalid Task Scheduler");
+    }
+    appendValue(me._taskQueue, std::move(task));
+}
+
+inline void
+wait(WavefrontTaskScheduler & me)
+{
+    SEQAN_ASSERT(me._taskQueue.writerCount == 0);
+
+    join(me._threadPool);
+
+    SEQAN_ASSERT(empty(me._taskQueue));
+    SEQAN_ASSERT(me._taskQueue.readerCount == 0);
+}
+
+inline auto
+getExceptions(WavefrontTaskScheduler & me)
+{
+    return me._exceptionPointers;
+}
+
+}  // namespace seqan
+
+#endif  // #ifndef INCLUDE_SEQAN_ALIGN_PARALLEL_WAVEFRONT_TASK_SCHEDULER_H_
diff --git a/include/seqan/align_parallel/wavefront_task_util.h b/include/seqan/align_parallel/wavefront_task_util.h
new file mode 100644
index 0000000..1208055
--- /dev/null
+++ b/include/seqan/align_parallel/wavefront_task_util.h
@@ -0,0 +1,557 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Rene Rahn <rene.rahn at fu-berlin.de>
+// ==========================================================================
+
+#ifndef INCLUDE_SEQAN_ALIGN_PARALLEL_WAVEFRONT_TASK_UTIL_H_
+#define INCLUDE_SEQAN_ALIGN_PARALLEL_WAVEFRONT_TASK_UTIL_H_
+
+namespace seqan
+{
+namespace impl
+{
+
+// ============================================================================
+// Forwards
+// ============================================================================
+
+// ============================================================================
+// Tags, Classes, Enums
+// ============================================================================
+
+// ============================================================================
+// Metafunctions
+// ============================================================================
+
+// Helper meta-function to extract the correct DP Property.
+template <typename TAlgotrithm>
+struct AlgorithmProperty
+{
+    template <typename TTask>
+    inline static bool
+    isTrackingEnabled(TTask const & tile)
+    {
+        return isLastColumn(tile) && isLastRow(tile);
+    }
+};
+
+template <typename TFreeEndGaps>
+struct AlgorithmProperty<GlobalAlignment_<TFreeEndGaps>>
+{
+    template <typename TTask>
+    inline static bool
+    isTrackingEnabled(TTask const & tile)
+    {
+        return (IsFreeEndGap_<TFreeEndGaps, DPLastColumn>::VALUE && inLastColumn(tile)) ||
+               (IsFreeEndGap_<TFreeEndGaps, DPLastRow>::VALUE && inLastRow(tile)) ||
+               (inLastColumn(tile) && inLastRow(tile));
+    }
+};
+
+template <typename TSpec>
+struct AlgorithmProperty<LocalAlignment_<TSpec>>
+{
+    template <typename TTask>
+    inline static bool
+    isTrackingEnabled(TTask const & /*tile*/)
+    {
+        return true;
+    }
+};
+
+// ============================================================================
+// Functions
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// Function computeTile()
+// ----------------------------------------------------------------------------
+
+// Wrapper function to call alignment core for the specific block.
+template <typename TScoreValue, typename TTraceValue, typename TScoreMatHost, typename TTraceMatHost,
+          typename TDPScout,
+          typename TSequenceH,
+          typename TSequenceV,
+          typename TScoringScheme,
+          typename TDPSettings>
+inline void
+computeTile(DPContext<TScoreValue, TTraceValue, TScoreMatHost, TTraceMatHost> & dpContext,
+            TDPScout & scout,
+            TSequenceH const & seqH,
+            TSequenceV const & seqV,
+            TScoringScheme const & scoringScheme,
+            TDPSettings const & /*settings*/)
+{
+    using TDPTraits = typename TDPSettings::TTraits;
+
+    using TScoreMatrixSpec = typename DefaultScoreMatrixSpec_<typename TDPTraits::TAlgorithmType>::Type;
+
+    using TDPScoreMatrix = DPMatrix_<TScoreValue, TScoreMatrixSpec, TScoreMatHost>;
+    using TDPTraceMatrix = DPMatrix_<TTraceValue, FullDPMatrix, TTraceMatHost>;
+
+    using TDPScoreMatrixNavigator = DPMatrixNavigator_<TDPScoreMatrix, DPScoreMatrix, NavigateColumnWise>;
+    using TDPTraceMatrixNavigator = DPMatrixNavigator_<TDPTraceMatrix, DPTraceMatrix<typename TDPTraits::TTracebackType>, NavigateColumnWise>;
+
+    using TDPProfile = DPProfile_<typename TDPTraits::TAlgorithmType,
+                                  typename TDPTraits::TGapType,
+                                  typename TDPTraits::TTracebackType,
+                                  Parallel>;
+
+    // Setup the score and trace matrix.
+    TDPScoreMatrix dpScoreMatrix;
+    TDPTraceMatrix dpTraceMatrix;
+
+    setLength(dpScoreMatrix, +DPMatrixDimension_::HORIZONTAL, length(seqH) + 1);
+    setLength(dpScoreMatrix, +DPMatrixDimension_::VERTICAL, length(seqV) + 1);
+
+    setLength(dpTraceMatrix, +DPMatrixDimension_::HORIZONTAL, length(seqH) + 1);
+    setLength(dpTraceMatrix, +DPMatrixDimension_::VERTICAL, length(seqV) + 1);
+
+    // Resue the buffer from the cache.
+    setHost(dpScoreMatrix, getDpScoreMatrix(dpContext));
+    setHost(dpTraceMatrix, getDpTraceMatrix(dpContext));
+
+    resize(dpScoreMatrix);
+    // We do not need to allocate the memory for the trace matrix if the traceback is disabled.
+    if /*constexpr*/(IsTracebackEnabled_<typename TDPTraits::TTracebackType>::VALUE)
+    {
+        static_assert(std::is_same<typename TDPTraits::TTracebackType, TracebackOff>::value, "Traceback not implemented!");
+        resize(dpTraceMatrix);
+    }
+
+    // Initialize the navigators.
+    TDPScoreMatrixNavigator dpScoreMatrixNavigator{dpScoreMatrix, DPBandConfig<BandOff>{}};
+    TDPTraceMatrixNavigator dpTraceMatrixNavigator{dpTraceMatrix, DPBandConfig<BandOff>{}};
+
+    // Execute the alignment.
+    _computeAlignmentImpl(scout, dpScoreMatrixNavigator, dpTraceMatrixNavigator, seqH, seqV,
+                          scoringScheme, DPBandConfig<BandOff>{}, TDPProfile(), NavigateColumnWise{});
+}
+
+#ifdef SEQAN_SIMD_ENABLED
+// Some utility functions.
+template <typename TTasks,
+          typename TScoreValueScalar,
+          typename TScoreValueSimd>
+inline auto
+doComputeOffset(TTasks const &tasks,
+                TScoreValueScalar const & /*scalarScore*/,
+                TScoreValueSimd const & /*simdScore*/)
+{
+    String<TScoreValueScalar> offset;
+    resize(offset, length(tasks), std::numeric_limits<TScoreValueScalar>::min(), Exact());
+
+    size_t pos = 0;
+
+    for (auto task : tasks)
+    {
+            offset[pos] = front(context(*task).tileBuffer.horizontalBuffer[column(*task)]).i1._score;
+        ++pos;
+    }
+
+    return offset;
+}
+
+template <typename TTasks,
+          typename TScoreValue>
+inline auto
+doComputeOffset(TTasks const &tasks,
+                TScoreValue const & /*scalarScore*/,
+                TScoreValue const & /*simdScore*/)
+{
+    String<TScoreValue> offset;
+    resize(offset, length(tasks), 0, Exact());
+    return offset;
+}
+
+template <typename TTasks,
+          typename TTaskTraits>
+inline auto
+computeOffset(TTasks const &tasks, TTaskTraits const & /*traits*/)
+{
+    using TDPSettings       = typename TTaskTraits::TDPSettings;
+    using TScoreValueScalar = typename Value<typename TDPSettings::TScoringScheme>::Type;
+    using TScoreValueSimd   = typename Value<typename TDPSettings::TSimdScoringScheme>::Type;
+    using TDPSimdValue      = typename Value<TScoreValueSimd>::Type;
+
+    return doComputeOffset(tasks, TScoreValueScalar{}, TDPSimdValue{});
+}
+
+template <typename TDPCell, typename TTrace,
+          typename TTasks,
+          typename TPos,
+          typename TFunc,
+          typename TOffset>
+inline void
+loadIntoSimd(Pair<TDPCell, TTrace> & target,
+             TTasks const & tasks,
+             TPos const pos,
+             TFunc && getBuffer,
+             TOffset const & offset,
+             LinearGaps const & /*unsused*/)
+{
+    using TSimdVec = typename Value<TDPCell>::Type;
+    using TVecVal = typename Value<TSimdVec>::Type;
+
+    alignas(sizeof(TSimdVec)) std::array<TVecVal, LENGTH<TSimdVec>::VALUE> scoreVec;
+    alignas(sizeof(TSimdVec)) std::array<TVecVal, LENGTH<TSimdVec>::VALUE> traceVec;
+
+    auto zipCont = makeZipView(tasks, scoreVec, traceVec, offset);
+
+    std::for_each(begin(zipCont), end(zipCont),
+                  [&, getBuffer = std::move(getBuffer)](auto tuple)
+                  {
+                      auto & buffer = *getBuffer(*std::get<0>(tuple));
+                      auto val = (length(buffer) > pos) ? buffer[pos] : typename std::decay<decltype(buffer[0])>::type{};
+
+                      // We might access values out of bounds here.
+                      std::get<1>(tuple) = static_cast<TVecVal>(val.i1._score - std::get<3>(tuple));
+                      std::get<2>(tuple) = val.i2;
+                  });
+
+    target.i1._score = load<TSimdVec>(&scoreVec[0]);
+    target.i2 = load<TSimdVec>(&traceVec[0]);
+}
+
+template <typename TDPCell, typename TTrace,
+          typename TTasks,
+          typename TPos,
+          typename TFunc,
+          typename TOffset>
+inline void
+loadIntoSimd(Pair<TDPCell, TTrace> & target,
+             TTasks const & tasks,
+             TPos const pos,
+             TFunc && getBuffer,
+             TOffset const & offset,
+             AffineGaps const & /*unsused*/)
+{
+    using TSimdVec = typename Value<TDPCell>::Type;
+    using TVecVal = typename Value<TSimdVec>::Type;
+
+    alignas(sizeof(TSimdVec)) std::array<TVecVal, LENGTH<TSimdVec>::VALUE> scoreVec;
+    alignas(sizeof(TSimdVec)) std::array<TVecVal, LENGTH<TSimdVec>::VALUE> scoreHorVec;
+    alignas(sizeof(TSimdVec)) std::array<TVecVal, LENGTH<TSimdVec>::VALUE> scoreVerVec;
+    alignas(sizeof(TSimdVec)) std::array<TVecVal, LENGTH<TSimdVec>::VALUE> traceVec;
+
+    auto zipCont = makeZipView(tasks, scoreVec, scoreHorVec, scoreVerVec, traceVec, offset);
+
+    std::for_each(begin(zipCont), end(zipCont),
+                  [&, getBuffer = std::move(getBuffer)](auto tuple)
+                  {
+                      auto & buffer = *getBuffer(*std::get<0>(tuple));
+                      auto val = (length(buffer) > pos) ? buffer[pos] : typename std::decay<decltype(buffer[0])>::type{};
+                      using TDPCellVar = decltype(val.i1);
+                      using TDPCell16 = DPCell_<TVecVal, AffineGaps>;
+
+                      // We might access values out of bounds here.
+                      std::get<1>(tuple) = static_cast<TVecVal>(val.i1._score - std::get<5>(tuple));
+
+                      std::get<2>(tuple) =
+                        (val.i1._horizontalScore <= DPCellDefaultInfinity<TDPCellVar>::VALUE) ?
+                            DPCellDefaultInfinity<TDPCell16>::VALUE :
+                            static_cast<TVecVal>(val.i1._horizontalScore - std::get<5>(tuple));
+                      std::get<3>(tuple) =
+                        (val.i1._verticalScore <= DPCellDefaultInfinity<TDPCellVar>::VALUE) ?
+                        DPCellDefaultInfinity<TDPCell16>::VALUE :
+                        static_cast<TVecVal>(val.i1._verticalScore - std::get<5>(tuple));
+                      std::get<4>(tuple) = val.i2;
+                  });
+
+    target.i1._score = load<TSimdVec>(&scoreVec[0]);
+    target.i1._horizontalScore = load<TSimdVec>(&scoreHorVec[0]);
+    target.i1._verticalScore = load<TSimdVec>(&scoreVerVec[0]);
+    target.i2 = load<TSimdVec>(&traceVec[0]);
+}
+
+template <typename TTasks,
+          typename TDPCell, typename TTrace,
+          typename TPos,
+          typename TFunc,
+          typename TOffset>
+inline void
+storeIntoBuffer(TTasks & tasks,
+                Pair<TDPCell, TTrace> const & source,
+                TPos const pos,
+                TFunc && getBuffer,
+                TOffset const & offset,
+                LinearGaps const & /*unsused*/)
+{
+    using TSimdVec = typename Value<TDPCell>::Type;
+    using TVecVal = typename Value<TSimdVec>::Type;
+
+    alignas(sizeof(TSimdVec)) std::array<TVecVal, LENGTH<TSimdVec>::VALUE> scoreVec;
+    alignas(sizeof(TSimdVec)) std::array<TVecVal, LENGTH<TSimdVec>::VALUE> traceVec;
+
+    storeu(&scoreVec[0], source.i1._score);
+    storeu(&traceVec[0], source.i2);
+
+    auto zipCont = makeZipView(tasks, scoreVec, traceVec, offset);
+
+    std::for_each(begin(zipCont), end(zipCont),
+                  [&, getBuffer = std::move(getBuffer)] (auto tuple)
+                  {
+                      auto & buffer = *getBuffer(*std::get<0>(tuple));
+                      if (length(buffer) > pos)
+                      {
+                          auto & pair = buffer[pos];
+                          pair.i1._score = std::get<1>(tuple) + std::get<3>(tuple);
+                          pair.i2 = std::get<2>(tuple);
+                      }
+                  });
+}
+
+template <typename TTasks,
+          typename TDPCell, typename TTrace,
+          typename TPos,
+          typename TFunc,
+          typename TOffset>
+inline void
+storeIntoBuffer(TTasks & tasks,
+                Pair<TDPCell, TTrace> const & source,
+                TPos const pos,
+                TFunc && getBuffer,
+                TOffset const & offset,
+                AffineGaps const & /*unsused*/)
+{
+    using TSimdVec = typename Value<TDPCell>::Type;
+    using TVecVal = typename Value<TSimdVec>::Type;
+
+    alignas(sizeof(TSimdVec)) std::array<TVecVal, LENGTH<TSimdVec>::VALUE> scoreVec;
+    alignas(sizeof(TSimdVec)) std::array<TVecVal, LENGTH<TSimdVec>::VALUE> scoreHorVec;
+    alignas(sizeof(TSimdVec)) std::array<TVecVal, LENGTH<TSimdVec>::VALUE> scoreVerVec;
+    alignas(sizeof(TSimdVec)) std::array<TVecVal, LENGTH<TSimdVec>::VALUE> traceVec;
+
+    storeu(&scoreVec[0], source.i1._score);
+    storeu(&scoreHorVec[0], source.i1._horizontalScore);
+    storeu(&scoreVerVec[0], source.i1._verticalScore);
+    storeu(&traceVec[0], source.i2);
+
+    auto zipCont = makeZipView(tasks, scoreVec, scoreHorVec, scoreVerVec, traceVec, offset);
+
+    std::for_each(begin(zipCont), end(zipCont),
+                  [&, getBuffer = std::move(getBuffer)](auto tuple)
+                  {
+                      auto & buffer = *getBuffer(*std::get<0>(tuple));
+                      if (length(buffer) > pos)
+                      {
+                          auto & pair = buffer[pos];
+                          pair.i1._score = std::get<1>(tuple) + std::get<5>(tuple);
+                          pair.i1._horizontalScore = std::get<2>(tuple) + std::get<5>(tuple);
+                          pair.i1._verticalScore = std::get<3>(tuple) + std::get<5>(tuple);
+                          pair.i2 = std::get<4>(tuple);
+                      }
+                  });
+}
+
+template <typename TTasks,
+          typename TFunc,
+          typename TOffset,
+          typename TExecTraits>
+inline auto
+gatherSimdBuffer(TTasks const & tasks,
+                 TFunc && getBuffer,
+                 TOffset const & offset,
+                 TExecTraits const & /*traits*/)
+{
+    // Check for valid simd length.
+    SEQAN_ASSERT_EQ(LENGTH<typename TExecTraits::TScoreValue>::VALUE, length(tasks));
+
+    String<typename TExecTraits::TBufferValue, Alloc<OverAligned> > simdSet;
+
+    auto maxLength = length(*getBuffer(*tasks[0]));
+    std::for_each(begin(tasks, Standard()) + 1, end(tasks, Standard()),
+                  [&](auto & task)
+                  {
+                      auto len = length(*getBuffer(*task));
+                      maxLength = (len > maxLength) ? len : maxLength;
+                  });
+
+    resize(simdSet, maxLength, Exact());
+    for (unsigned i = 0; i < length(simdSet); ++i)
+    {
+        loadIntoSimd(simdSet[i], tasks, i, std::forward<TFunc>(getBuffer), offset, typename TExecTraits::TGapType());
+    }
+    return simdSet;
+}
+
+template <typename TTasks,
+          typename TBufferValue, typename TSpec,
+          typename TFunc,
+          typename TOffset,
+          typename TExecTraits>
+inline void
+scatterSimdBuffer(TTasks & tasks,
+                  String<TBufferValue, TSpec> const & simdSet,
+                  TFunc && getBuffer,
+                  TOffset const & offset,
+                  TExecTraits const & /*traits*/)
+{
+    for (unsigned i = 0; i < length(simdSet); ++i)
+    {
+        storeIntoBuffer(tasks, simdSet[i], i, std::forward<TFunc>(getBuffer), offset, typename TExecTraits::TGapType());
+    }
+}
+
+// Compute tasks as simd alignment.
+template <typename TDPCell, typename TTraceValue, typename TScoreMat, typename TTraceMat,
+          typename TTasks,
+          typename TSimdBufferH,
+          typename TSimdBufferV,
+          typename TDPLocal,
+          typename TOffset,
+          typename TExecTraits>
+inline void
+computeSimdBatch(DPContext<TDPCell, TTraceValue, TScoreMat, TTraceMat> & cache,
+                 TSimdBufferH                                          & bufferH,
+                 TSimdBufferV                                          & bufferV,
+                 TTasks                                                & tasks,
+                 TDPLocal                                              & dpLocal,
+                 TOffset                                               & offset,
+                 TExecTraits                                     const & /*traits*/)
+{
+    // Now what?
+    using TSeqH    = typename TExecTraits::TSeqH;
+    using TSeqV    = typename TExecTraits::TSeqV;
+    using TSimdVec = typename TExecTraits::TScoreValue;
+
+    // Prepare sequence set.
+    StringSet<TSeqH, Dependent<> > depSetH;
+    StringSet<TSeqV, Dependent<> > depSetV;
+    bool allSameLength = true;
+    auto ptrTask = tasks[0];
+    auto lenH = length(context(*ptrTask).seqHBlocks[column(*ptrTask)]);
+    auto lenV = length(context(*ptrTask).seqVBlocks[row(*ptrTask)]);
+
+    for (auto ptrTask : tasks)
+    {
+        appendValue(depSetH, context(*ptrTask).seqHBlocks[column(*ptrTask)]);
+        appendValue(depSetV, context(*ptrTask).seqVBlocks[row(*ptrTask)]);
+        if (lenH != length(context(*ptrTask).seqHBlocks[column(*ptrTask)]) ||
+            lenV != length(context(*ptrTask).seqVBlocks[row(*ptrTask)]))
+        {
+            allSameLength = false;
+        }
+    }
+
+    // Dummy trace set.
+    StringSet<String<Nothing> > trace;  // We need to instantiate it, but it will not be used.
+
+    // We can compute with one simd score, but might collect them here.
+    auto const & scoringScheme = context(*tasks[0]).dpSettings.simdScoringScheme;
+
+    // Preapare and run alingment.
+    String<TSimdVec, Alloc<OverAligned> > stringSimdH;
+    String<TSimdVec, Alloc<OverAligned> > stringSimdV;
+
+    if (allSameLength)
+    {
+        using TScoutState = DPScoutState_<DPTiled<TSimdBufferH, Default, SimdAlignEqualLength>>;
+        TScoutState scoutState(bufferH, bufferV);
+        _prepareSimdAlignment(stringSimdH, stringSimdV, depSetH, depSetV, scoutState);
+
+        using TScoutSpec = typename ScoutSpecForAlignmentAlgorithm_<typename TExecTraits::TAlgorithmType, TScoutState>::Type;
+        using TDPScout = DPScout_<TDPCell, TScoutSpec>;
+
+        TDPScout dpScout(scoutState);
+        // We rather want to set
+        computeTile(cache, dpScout, stringSimdH, stringSimdV, scoringScheme, context(*tasks[0]).dpSettings);
+
+        // Now we need to run the scout check for all tasks.
+
+        // We want to get the state here from the scout.
+        for (size_t pos = 0; pos < length(tasks); ++pos)
+        {
+            auto & task = *tasks[pos];
+            if (AlgorithmProperty<typename TExecTraits::TAlgorithmType>::isTrackingEnabled(task))
+            {
+                // TODO(rrahn): Implement the interface.
+                // TODO(rrahn): Make it a member function of a policy so that we don't have to implement the specifics here
+                _setSimdLane(dpScout, pos);
+                auto & taskContext = context(task);
+                updateMax(intermediate(dpLocal, taskContext.alignmentId),
+                          {maxScoreAt(dpScout) + offset[pos], 0u},
+                          column(task),
+                          row(task));
+            }
+        }
+    }
+    else
+    {
+        using TDPSettings = std::decay_t<decltype(context(*tasks[0]).dpSettings)>;
+        using TDPTraits = typename TDPSettings::TTraits;
+
+        using TDPProfile = DPProfile_<typename TDPTraits::TAlgorithmType,
+                                      typename TDPTraits::TGapType,
+                                      typename TDPTraits::TTracebackType,
+                                      Parallel>;
+
+        using TSimdScoutTrait = SimdAlignVariableLengthTraits<TSimdVec,
+                                                              decltype(depSetH),
+                                                              decltype(depSetV),
+                                                              TDPProfile>;
+        using TScoutState = DPScoutState_<DPTiled<TSimdBufferH, Default, SimdAlignVariableLength<TSimdScoutTrait>>>;
+
+        String<size_t> lengthsH;
+        String<size_t> lengthsV;
+
+        TScoutState scoutState(bufferH, bufferV);
+        _prepareSimdAlignment(stringSimdH, stringSimdV, depSetH, depSetV, lengthsH, lengthsV, scoutState);
+
+        using TScoutSpec = typename ScoutSpecForAlignmentAlgorithm_<typename TExecTraits::TAlgorithmType, TScoutState>::Type;
+        using TDPScout = DPScout_<TDPCell, TScoutSpec>;
+
+        TDPScout dpScout(scoutState);
+        computeTile(cache, dpScout, stringSimdH, stringSimdV, scoringScheme, context(*tasks[0]).dpSettings);
+        // We want to get the state here from the scout.
+        for (size_t pos = 0; pos < length(tasks); ++pos)
+        {
+            auto & task = *tasks[pos];
+            if (AlgorithmProperty<typename TExecTraits::TAlgorithmType>::isTrackingEnabled(task))
+            {
+                // TODO(rrahn): Implement the interface.
+                // TODO(rrahn): Make it a member function of a policy so that we don't have to implement the specifics here
+                _setSimdLane(dpScout, pos);
+                auto & taskContext = context(task);
+                updateMax(intermediate(dpLocal, taskContext.alignmentId),
+                          {maxScoreAt(dpScout) + offset[pos], 0u},
+                          column(task),
+                          row(task));
+            }
+        }
+    }
+}
+#endif // SEQAN_SIMD_ENABLED
+}  // namespace impl
+}  // namespace seqan
+
+#endif  // #ifndef INCLUDE_SEQAN_ALIGN_PARALLEL_WAVEFRONT_TASK_UTIL_H_
diff --git a/include/seqan/align_profile.h b/include/seqan/align_profile.h
index f9436f8..794474e 100644
--- a/include/seqan/align_profile.h
+++ b/include/seqan/align_profile.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/align_profile/add_to_profile.h b/include/seqan/align_profile/add_to_profile.h
index 76f035d..912c6b3 100644
--- a/include/seqan/align_profile/add_to_profile.h
+++ b/include/seqan/align_profile/add_to_profile.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -83,8 +83,8 @@ namespace seqan {
 template <typename TChar, typename TValue, typename TSpec, typename TSpec2>
 void addToProfile(String<ProfileChar<TChar, TValue, TSpec> > & profile,
                   String<TChar, TSpec2> /*const*/ & seq,
-                  int lDiag = minValue<int>(),
-                  int uDiag = maxValue<int>())  // non-const because of holder issues
+                  int lDiag = std::numeric_limits<int>::min(),
+                  int uDiag = std::numeric_limits<int>::max())  // non-const because of holder issues
 {
     typedef ProfileChar<TChar, TValue, TSpec> TProfileChar;
 
@@ -97,7 +97,7 @@ void addToProfile(String<ProfileChar<TChar, TValue, TSpec> > & profile,
     seqan::Score<int, seqan::ProfileSeqScore> sScheme(profile);
 
     // Perform the global alignment.
-    if (lDiag == minValue<int>() || uDiag == maxValue<int>())
+    if (lDiag == std::numeric_limits<int>::min() || uDiag == std::numeric_limits<int>::max())
         globalAlignment(gapsH, gapsV, sScheme, Gotoh());
     else
         globalAlignment(gapsH, gapsV, sScheme, lDiag, uDiag, Gotoh());
diff --git a/include/seqan/align_profile/score_profile_seq.h b/include/seqan/align_profile/score_profile_seq.h
index 86b9a26..18cfcf7 100644
--- a/include/seqan/align_profile/score_profile_seq.h
+++ b/include/seqan/align_profile/score_profile_seq.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/align_split.h b/include/seqan/align_split.h
index b08ac58..a0aa200 100644
--- a/include/seqan/align_split.h
+++ b/include/seqan/align_split.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/align_split/align_split_interface.h b/include/seqan/align_split/align_split_interface.h
index 658536a..5f2ee4d 100644
--- a/include/seqan/align_split/align_split_interface.h
+++ b/include/seqan/align_split/align_split_interface.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -98,12 +98,12 @@ template <typename TSpec>
 struct IsSplitAlignment_<SplitAlignment_<TSpec> const>:
     True {};
 
-template <typename TAlgoSpec, typename TGapCosts, typename TTraceFlag>
-struct IsSplitAlignment_<DPProfile_<TAlgoSpec, TGapCosts, TTraceFlag> >:
+template <typename TAlgoSpec, typename TGapCosts, typename TTraceFlag, typename TExecPolicy>
+struct IsSplitAlignment_<DPProfile_<TAlgoSpec, TGapCosts, TTraceFlag, TExecPolicy> >:
     IsSplitAlignment_<TAlgoSpec> {};
 
-template <typename TAlgoSpec, typename TGapCosts, typename TTraceFlag>
-struct IsSplitAlignment_<DPProfile_<TAlgoSpec, TGapCosts, TTraceFlag> const>:
+template <typename TAlgoSpec, typename TGapCosts, typename TTraceFlag, typename TExecPolicy>
+struct IsSplitAlignment_<DPProfile_<TAlgoSpec, TGapCosts, TTraceFlag, TExecPolicy> const>:
     IsSplitAlignment_<TAlgoSpec> {};
 
 // ----------------------------------------------------------------------------
@@ -176,10 +176,12 @@ struct LastRowEnabled_<SplitAlignment_<TSpec>, LastCell, TColumnDescriptor>
 // Metafunction DPMetaColumn_
 // ----------------------------------------------------------------------------
 
-template <typename TSpec, typename TGapCosts, typename TTraceFlag, typename TColumnType>
-struct DPMetaColumn_<DPProfile_<SplitAlignment_<TSpec>, TGapCosts, TTraceFlag>, MetaColumnDescriptor<TColumnType, FullColumn> >
+template <typename TSpec, typename TGapCosts, typename TTraceFlag, typename TExecPolicy,
+          typename TColumnType>
+struct DPMetaColumn_<DPProfile_<SplitAlignment_<TSpec>, TGapCosts, TTraceFlag, TExecPolicy>,
+                     MetaColumnDescriptor<TColumnType, FullColumn> >
 {
-    typedef DPProfile_<SplitAlignment_<TSpec>, TGapCosts, TTraceFlag> TDPProfile;
+    typedef DPProfile_<SplitAlignment_<TSpec>, TGapCosts, TTraceFlag, TExecPolicy> TDPProfile;
     typedef typename IsLocalAlignment_<TDPProfile>::Type TIsLocal;
 
     // If InitialColumn -> Zero, Vertical | Zero, Vertical | Zero  // Within the algorithm we need to define the first row as only one cell if it is no initial column
@@ -201,8 +203,10 @@ struct DPMetaColumn_<DPProfile_<SplitAlignment_<TSpec>, TGapCosts, TTraceFlag>,
 };
 
 
-template <typename TSpec, typename TGapCosts, typename TTraceFlag, typename TColumnType>
-struct DPMetaColumn_<DPProfile_<SplitAlignment_<TSpec>, TGapCosts, TTraceFlag>, MetaColumnDescriptor<TColumnType, PartialColumnTop> >
+template <typename TSpec, typename TGapCosts, typename TTraceFlag, typename TExecPolicy,
+          typename TColumnType>
+struct DPMetaColumn_<DPProfile_<SplitAlignment_<TSpec>, TGapCosts, TTraceFlag, TExecPolicy>,
+                     MetaColumnDescriptor<TColumnType, PartialColumnTop> >
 {
     typedef DPProfile_<SplitAlignment_<TSpec>, TGapCosts, TTraceFlag> TDPProfile;
     typedef typename IsLocalAlignment_<TDPProfile>::Type TIsLocal;
@@ -227,10 +231,12 @@ struct DPMetaColumn_<DPProfile_<SplitAlignment_<TSpec>, TGapCosts, TTraceFlag>,
     typedef DPMetaCell_<TRecursionTypeLastCell_, True> TLastCell_;
 };
 
-template <typename TSpec, typename TGapCosts, typename TTraceFlag, typename TColumnType>
-struct DPMetaColumn_<DPProfile_<SplitAlignment_<TSpec>, TGapCosts, TTraceFlag>, MetaColumnDescriptor<TColumnType, PartialColumnMiddle> >
+template <typename TSpec, typename TGapCosts, typename TTraceFlag, typename TExecPolicy,
+          typename TColumnType>
+struct DPMetaColumn_<DPProfile_<SplitAlignment_<TSpec>, TGapCosts, TTraceFlag, TExecPolicy>,
+                     MetaColumnDescriptor<TColumnType, PartialColumnMiddle> >
 {
-    typedef DPProfile_<SplitAlignment_<TSpec>, TGapCosts, TTraceFlag> TDPProfile;
+    typedef DPProfile_<SplitAlignment_<TSpec>, TGapCosts, TTraceFlag, TExecPolicy> TDPProfile;
     typedef typename IsLocalAlignment_<TDPProfile>::Type TIsLocal;
 
     // If InitialColumn -> Zero, Vertical | Zero, Vertical | Zero  // Within the algorithm we need to define the first row as only one cell if it is no initial column
@@ -250,10 +256,12 @@ struct DPMetaColumn_<DPProfile_<SplitAlignment_<TSpec>, TGapCosts, TTraceFlag>,
     typedef DPMetaCell_<TRecursionTypeLastCell_, True> TLastCell_;
 };
 
-template <typename TSpec, typename TGapCosts, typename TTraceFlag, typename TColumnType>
-struct DPMetaColumn_<DPProfile_<SplitAlignment_<TSpec>, TGapCosts, TTraceFlag>, MetaColumnDescriptor<TColumnType, PartialColumnBottom> >
+template <typename TSpec, typename TGapCosts, typename TTraceFlag, typename TExecPolicy,
+          typename TColumnType>
+struct DPMetaColumn_<DPProfile_<SplitAlignment_<TSpec>, TGapCosts, TTraceFlag, TExecPolicy>,
+                     MetaColumnDescriptor<TColumnType, PartialColumnBottom> >
 {
-    typedef DPProfile_<SplitAlignment_<TSpec>, TGapCosts, TTraceFlag> TDPProfile;
+    typedef DPProfile_<SplitAlignment_<TSpec>, TGapCosts, TTraceFlag, TExecPolicy> TDPProfile;
     typedef typename IsLocalAlignment_<TDPProfile>::Type TIsLocal;
 
     // If InitialColumn -> Zero, Vertical | Zero, Vertical | Zero  // Within the algorithm we need to define the first row as only one cell if it is no initial column
@@ -280,7 +288,7 @@ struct DPMetaColumn_<DPProfile_<SplitAlignment_<TSpec>, TGapCosts, TTraceFlag>,
 template <typename TFreeEndGaps, typename TGapCosts, typename TTraceSwitch>
 struct SetupAlignmentProfile_<SplitAlignmentAlgo, TFreeEndGaps, TGapCosts, TTraceSwitch>
 {
-    typedef DPProfile_<SplitAlignment_<TFreeEndGaps>, TGapCosts, TTraceSwitch> Type;
+    typedef DPProfile_<SplitAlignment_<TFreeEndGaps>, TGapCosts, TTraceSwitch, Serial> Type;
 };
 
 // ============================================================================
@@ -330,7 +338,7 @@ void _computeSplitTrace(TTarget & target,
 {
     typedef typename SetupAlignmentProfile_<TDPType, TFreeEndGaps, LinearGaps, TTraceConfig>::Type TDPProfile;
 
-    typedef typename GetDPTraceMatrix<TDPContext const>::Type TDPTraceMatrixHost;
+    using TDPTraceMatrixHost = std::remove_reference_t<decltype(getDpTraceMatrix(dpContext))>;
     typedef typename Value<TDPTraceMatrixHost>::Type TTraceValue;
 
     typedef DPMatrix_<TTraceValue, FullDPMatrix> TDPTraceMatrix;
@@ -339,7 +347,7 @@ void _computeSplitTrace(TTarget & target,
     TDPTraceMatrix matrix;
     setLength(matrix, +DPMatrixDimension_::HORIZONTAL, length(seqH) + 1 - std::max(0, lowerDiagonal(config._band)));
 
-    if (IsSameType<TBandSwitch, BandOff>::VALUE)
+    SEQAN_IF_CONSTEXPR (IsSameType<TBandSwitch, BandOff>::VALUE)
     {
         setLength(matrix, +DPMatrixDimension_::VERTICAL, length(seqV) + 1);
     }
@@ -353,8 +361,7 @@ void _computeSplitTrace(TTarget & target,
     setHost(matrix, getDpTraceMatrix(dpContext));
     resize(matrix);
     SEQAN_ASSERT_EQ(length(getDpTraceMatrix(dpContext)), length(matrix));
-    TDPTraceMatrixNavigator navi;
-    _init(navi, matrix, config._band);
+    TDPTraceMatrixNavigator navi{matrix, config._band};
     _computeTraceback(target, navi, matPos, seqH, seqV, config._band, TDPProfile());
 }
 
@@ -387,9 +394,9 @@ auto _splitAlignmentImpl(Gaps<TContigSeqL> & gapsContigL,
 
     // Compute trace and split score sequence for the left alignment.
     // We actually need to first compute the scores, than trace from the choosen split position.
-    DPContext<TScoreValue, TGapModel> dpContextL;
+    DPContext<DPCell_<TScoreValue, TGapModel>, typename TraceBitMap_<TScoreValue>::Type> dpContextL;
     DPScoutState_<SplitAlignmentScout> scoutStateL;
-    resize(scoutStateL.splitScore, length(source(gapsContigL)) + 1, minValue<TScoreValue>() / 2);
+    resize(scoutStateL.splitScore, length(source(gapsContigL)) + 1, std::numeric_limits<TScoreValue>::min() / 2);
     resize(scoutStateL.splitPos, length(scoutStateL.splitScore));
 
     String<TTraceSegment> traceL;
@@ -400,9 +407,9 @@ auto _splitAlignmentImpl(Gaps<TContigSeqL> & gapsContigL,
     ModifiedString<TReadSeqR, ModReverse> revReadR(source(gapsReadR));
 
     // Compute trace and split score sequence for the right alignment.
-    DPContext<TScoreValue, TGapModel> dpContextR;
+    DPContext<DPCell_<TScoreValue, TGapModel>, typename TraceBitMap_<TScoreValue>::Type> dpContextR;
     DPScoutState_<SplitAlignmentScout> scoutStateR;
-    resize(scoutStateR.splitScore, length(source(gapsContigR)) + 1, minValue<TScoreValue>() / 2);
+    resize(scoutStateR.splitScore, length(source(gapsContigR)) + 1, std::numeric_limits<TScoreValue>::min() / 2);
     resize(scoutStateR.splitPos, length(scoutStateR.splitScore));
 
     String<TTraceSegment> traceR;
@@ -482,7 +489,7 @@ auto _splitAlignmentImpl(Gaps<TContigSeqL> & gapsContigL,
 {
     typedef typename SubstituteAlignConfig_<AlignConfig<TTop, TRight, TLeft, TBottom> >::Type TFreeEndGaps;
     // Check whether we need to run the banded versions.
-    if (lowerDiagonal != minValue<int>() && upperDiagonal != maxValue<int>())
+    if (lowerDiagonal != std::numeric_limits<int>::min() && upperDiagonal != std::numeric_limits<int>::max())
     {
         typedef AlignConfig2<SplitAlignmentAlgo, DPBandConfig<BandOn>, TFreeEndGaps,
         TracebackOn<TracebackConfig_<CompleteTrace, GapsLeft> > > TAlignConfigL;
@@ -513,8 +520,8 @@ auto _splitAlignmentImpl(Gaps<TContigSeqL> & gapsContigL,
                          Gaps<TReadSeqR> & gapsReadR,
                          Score<TScoreValue, TScoreSpec> const & scoringScheme,
                          AlignConfig<TTop, TRight, TLeft, TBottom, TConfigSpec> const & config,
-                         int lowerDiagonal = minValue<int>(),
-                         int upperDiagonal = maxValue<int>())
+                         int lowerDiagonal = std::numeric_limits<int>::min(),
+                         int upperDiagonal = std::numeric_limits<int>::max())
 {
     if (_usesAffineGaps(scoringScheme, source(gapsContigL), source(gapsReadL)))
         return _splitAlignmentImpl(gapsContigL, gapsReadL, gapsContigR, gapsReadR,
diff --git a/include/seqan/align_split/dp_scout_split.h b/include/seqan/align_split/dp_scout_split.h
index b107e43..c525f21 100644
--- a/include/seqan/align_split/dp_scout_split.h
+++ b/include/seqan/align_split/dp_scout_split.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/alignment_free.h b/include/seqan/alignment_free.h
index 8a68853..be44c79 100644
--- a/include/seqan/alignment_free.h
+++ b/include/seqan/alignment_free.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/alignment_free/af_d2.h b/include/seqan/alignment_free/af_d2.h
index 7e5bcbe..b9c9e4d 100644
--- a/include/seqan/alignment_free/af_d2.h
+++ b/include/seqan/alignment_free/af_d2.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/alignment_free/af_d2star.h b/include/seqan/alignment_free/af_d2star.h
index c6bf16f..0fcfaae 100644
--- a/include/seqan/alignment_free/af_d2star.h
+++ b/include/seqan/alignment_free/af_d2star.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/alignment_free/af_d2z.h b/include/seqan/alignment_free/af_d2z.h
index 6325af2..0cb88ff 100644
--- a/include/seqan/alignment_free/af_d2z.h
+++ b/include/seqan/alignment_free/af_d2z.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/alignment_free/af_n2.h b/include/seqan/alignment_free/af_n2.h
index ac2110a..5e98fa2 100644
--- a/include/seqan/alignment_free/af_n2.h
+++ b/include/seqan/alignment_free/af_n2.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/alignment_free/alignment_free_base.h b/include/seqan/alignment_free/alignment_free_base.h
index c3a7471..ba80f81 100644
--- a/include/seqan/alignment_free/alignment_free_base.h
+++ b/include/seqan/alignment_free/alignment_free_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/alignment_free/alignment_free_comparison.h b/include/seqan/alignment_free/alignment_free_comparison.h
index bf33fa0..ee6e65c 100644
--- a/include/seqan/alignment_free/alignment_free_comparison.h
+++ b/include/seqan/alignment_free/alignment_free_comparison.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/alignment_free/kmer_functions.h b/include/seqan/alignment_free/kmer_functions.h
index 118c7d8..222f0f3 100644
--- a/include/seqan/alignment_free/kmer_functions.h
+++ b/include/seqan/alignment_free/kmer_functions.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/arg_parse.h b/include/seqan/arg_parse.h
index 06b2d8d..e806c27 100644
--- a/include/seqan/arg_parse.h
+++ b/include/seqan/arg_parse.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/arg_parse/arg_parse_argument.h b/include/seqan/arg_parse/arg_parse_argument.h
index 95ebf88..91ef3fa 100644
--- a/include/seqan/arg_parse/arg_parse_argument.h
+++ b/include/seqan/arg_parse/arg_parse_argument.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -438,6 +438,28 @@ inline bool isOutputFileArgument(ArgParseArgument const & me)
 }
 
 // ----------------------------------------------------------------------------
+// Function isDirectoryArgument()
+// ----------------------------------------------------------------------------
+
+/*!
+ * @fn ArgParseArgument#isDirectoryArgument
+ * @headerfile <seqan/arg_parse.h>
+ * @brief Returns whether the argument is a directorz argument.
+ *
+ * @signature bool isDirectoryArgument(arg);
+ *
+ * @param[in] arg The ArgParseArgument to query.
+ *
+ * @return bool <tt>true</tt> if it is a directory argument, <tt>false</tt> otherwise.
+ */
+
+inline bool isDirectoryArgument(ArgParseArgument const & me)
+{
+    return me._argumentType == ArgParseArgument::INPUT_DIRECTORY ||
+           me._argumentType == ArgParseArgument::OUTPUT_DIRECTORY;
+}
+
+// ----------------------------------------------------------------------------
 // Function isOutputPrefixArgument()
 // ----------------------------------------------------------------------------
 
@@ -923,7 +945,15 @@ inline void _checkValue(ArgParseArgument const & me)
 {
     unsigned i = 0;
     for (std::vector<std::string>::const_iterator it = me.value.begin(); it != me.value.end(); ++it, ++i)
-        _checkValue(me, *it, i);
+    {
+        auto val = *it;
+
+        if (isDirectoryArgument(me)) // strip trailing slash for directories
+            if (val[length(val) - 1] == '/')
+                val.resize(length(val) - 1);
+
+        _checkValue(me, val, i);
+    }
 }
 
 // ----------------------------------------------------------------------------
@@ -1138,6 +1168,10 @@ inline std::string getFileExtension(ArgParseArgument const & me, unsigned pos =
     if (value.empty())
         return "";
 
+    if (isDirectoryArgument(me)) // strip trailing slash for directories
+        if (value[length(value) - 1] == '/')
+            value.resize(length(value) - 1);
+
     // If there is a list of valid values then we look for each of these in the path.
     if (!me.validValues.empty())
     {
diff --git a/include/seqan/arg_parse/arg_parse_ctd_support.h b/include/seqan/arg_parse/arg_parse_ctd_support.h
index 532cddd..9125fd7 100644
--- a/include/seqan/arg_parse/arg_parse_ctd_support.h
+++ b/include/seqan/arg_parse/arg_parse_ctd_support.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/arg_parse/arg_parse_doc.h b/include/seqan/arg_parse/arg_parse_doc.h
index 528ce81..b81498f 100644
--- a/include/seqan/arg_parse/arg_parse_doc.h
+++ b/include/seqan/arg_parse/arg_parse_doc.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -669,7 +669,7 @@ inline void printLongCopyright(ArgumentParser const & me, std::ostream & stream)
            << "=============================================================================" << std::endl
            << "This program contains SeqAn code licensed under the following terms:" << std::endl
            << "-----------------------------------------------------------------------------" << std::endl
-           << " Copyright (c) 2006-2015, Knut Reinert, FU Berlin" << std::endl
+           << " Copyright (c) 2006-2018, Knut Reinert, FU Berlin" << std::endl
            << " All rights reserved." << std::endl
            << "" << std::endl
            << " Redistribution and use in source and binary forms, with or without" << std::endl
diff --git a/include/seqan/arg_parse/arg_parse_exceptions.h b/include/seqan/arg_parse/arg_parse_exceptions.h
index 5c6ffe1..4199bec 100644
--- a/include/seqan/arg_parse/arg_parse_exceptions.h
+++ b/include/seqan/arg_parse/arg_parse_exceptions.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                           arg_parse_exceptions.h
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/arg_parse/arg_parse_option.h b/include/seqan/arg_parse/arg_parse_option.h
index 7b6d8bd..770207e 100644
--- a/include/seqan/arg_parse/arg_parse_option.h
+++ b/include/seqan/arg_parse/arg_parse_option.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/arg_parse/arg_parse_parse.h b/include/seqan/arg_parse/arg_parse_parse.h
index 5afe27a..b73f2b2 100644
--- a/include/seqan/arg_parse/arg_parse_parse.h
+++ b/include/seqan/arg_parse/arg_parse_parse.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/arg_parse/arg_parse_type_support.h b/include/seqan/arg_parse/arg_parse_type_support.h
index 9b1192d..3343647 100644
--- a/include/seqan/arg_parse/arg_parse_type_support.h
+++ b/include/seqan/arg_parse/arg_parse_type_support.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/arg_parse/arg_parse_version_check.h b/include/seqan/arg_parse/arg_parse_version_check.h
index bb10cc8..01bc176 100644
--- a/include/seqan/arg_parse/arg_parse_version_check.h
+++ b/include/seqan/arg_parse/arg_parse_version_check.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -68,18 +68,18 @@ struct VersionControlTags_
     static constexpr char const * const UNREGISTERED_APP   = "UNREGISTERED_APP";
 
     static constexpr char const * const MESSAGE_SEQAN_UPDATE =
-        "[SEQAN INFO] :: There is a newer SeqAn version available!\n"
+        "[SEQAN INFO] :: A new SeqAn version is available online.\n"
         "[SEQAN INFO] :: Please visit www.seqan.de for an update or inform the developer of this app.\n"
-        "[SEQAN INFO] :: If you don't want to recieve this message again set --version-check OFF\n\n";
+        "[SEQAN INFO] :: If you don't wish to receive further notifications, set --version-check OFF.\n\n";
     static constexpr char const * const MESSAGE_APP_UPDATE =
-        "[APP INFO] :: There is a newer version of this application available.\n"
-        "[APP INFO] :: If this app is developed by SeqAn, visit www.seqan.de for updates.\n"
-        "[APP INFO] :: If you don't want to recieve this message again set --version_check OFF\n\n";
+        "[APP INFO] :: A new version of this application is now available.\n"
+        "[APP INFO] :: Visit www.seqan.de for updates of official SeqAn applications.\n"
+        "[APP INFO] :: If you don't wish to receive further notifications, set --version-check OFF.\n\n";
     static constexpr char const * const MESSAGE_UNREGISTERED_APP =
         "[SEQAN INFO] :: Thank you for using SeqAn!\n"
-        "[SEQAN INFO] :: You might want to regsiter you app for support and version check features?\n"
-        "[SEQAN INFO] :: Just send us an email to seqan at team.fu-berlin.de with your app name and version number.\n"
-        "[SEQAN INFO] :: If you don't want to recieve this message anymore set --version_check OFF\n\n";
+        "[SEQAN INFO] :: Do you wish to register your app for update notifications?\n"
+        "[SEQAN INFO] :: Just send an email to support at seqan.de with your app name and version number.\n"
+        "[SEQAN INFO] :: If you don't wish to receive further notifications, set --version-check OFF.\n\n";
     static constexpr char const * const MESSAGE_REGISTERED_APP_UPDATE =
         "[APP INFO] :: We noticed the app version you use is newer than the one registered with us.\n"
         "[APP INFO] :: Please send us an email with the new version so we can correct it (support at seqan.de)\n\n";
diff --git a/include/seqan/arg_parse/argument_parser.h b/include/seqan/arg_parse/argument_parser.h
index 92467a3..101736e 100644
--- a/include/seqan/arg_parse/argument_parser.h
+++ b/include/seqan/arg_parse/argument_parser.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/arg_parse/tool_doc.h b/include/seqan/arg_parse/tool_doc.h
index a19a983..78f7db7 100644
--- a/include/seqan/arg_parse/tool_doc.h
+++ b/include/seqan/arg_parse/tool_doc.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -444,6 +444,13 @@ public:
         std::fill_n(out, _layout.leftPadding, ' ');
         stream << _toText(listItem._term);
         unsigned pos = _layout.leftPadding + length(listItem._term);
+
+        if (empty(listItem._description))
+        {
+            stream << '\n';
+            return;
+        }
+
         if (pos + _layout.centerPadding > _layout.rightColumnTab)
         {
             stream << '\n';
diff --git a/include/seqan/arg_parse/xml_support.h b/include/seqan/arg_parse/xml_support.h
index 6e14d40..cc46ab3 100644
--- a/include/seqan/arg_parse/xml_support.h
+++ b/include/seqan/arg_parse/xml_support.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/bam_io.h b/include/seqan/bam_io.h
index f9f9842..7b7154f 100644
--- a/include/seqan/bam_io.h
+++ b/include/seqan/bam_io.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -42,6 +42,7 @@
 // Prerequisites.
 // ===========================================================================
 
+#include <seqan/platform.h>
 #include <seqan/basic.h>
 #include <seqan/file.h>
 #include <seqan/sequence.h>
diff --git a/include/seqan/bam_io/bam_alignment_record.h b/include/seqan/bam_io/bam_alignment_record.h
index 4e694d5..e731861 100644
--- a/include/seqan/bam_io/bam_alignment_record.h
+++ b/include/seqan/bam_io/bam_alignment_record.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -117,12 +117,12 @@ struct BamTypeChar
     {
         VALUE =
             (IsSameType<TValue, char>::VALUE)?              'A':
-            (IsSameType<TValue, signed char>::VALUE)?       'c':
-            (IsSameType<TValue, unsigned char>::VALUE)?     'C':
-            (IsSameType<TValue, short>::VALUE)?             's':
-            (IsSameType<TValue, unsigned short>::VALUE)?    'S':
-            (IsSameType<TValue, int>::VALUE)?               'i':
-            (IsSameType<TValue, unsigned int>::VALUE)?      'I':
+            (IsSameType<TValue, int8_t>::VALUE)?            'c':
+            (IsSameType<TValue, uint8_t>::VALUE)?           'C':
+            (IsSameType<TValue, int16_t>::VALUE)?           's':
+            (IsSameType<TValue, uint16_t>::VALUE)?          'S':
+            (IsSameType<TValue, int32_t>::VALUE)?           'i':
+            (IsSameType<TValue, uint32_t>::VALUE)?          'I':
             (IsSameType<TValue, float>::VALUE)?             'f':
 //          (IsSameType<TValue, double>::VALUE)?            'd':
             (IsSequence<TValue>::VALUE)?                    'Z':
@@ -131,14 +131,14 @@ struct BamTypeChar
 };
 
 // List of primitive BAM types (ordered by expected usage frequency)
-typedef TagList<int,
-        TagList<unsigned int,
+typedef TagList<int32_t,
+        TagList<uint32_t,
         TagList<float,
-        TagList<short,
-        TagList<unsigned short,
+        TagList<int16_t,
+        TagList<uint16_t,
         TagList<char,
-        TagList<unsigned char,
-        TagList<signed char
+        TagList<uint8_t,
+        TagList<int8_t
 //      TagList<double
         > > > > > > > > BamTagTypes;
 
@@ -254,7 +254,7 @@ public:
     static int32_t const INVALID_LEN = 0;
     static uint32_t const INVALID_QID = 4294967295u;  // TODO(holtgrew): Undocumented as of yet.
 
-    BamAlignmentRecord() : _qID(MaxValue<unsigned>::VALUE) { clear(*this); }
+    BamAlignmentRecord() : _qID(std::numeric_limits<unsigned>::max()) { clear(*this); }
 };
 
 // ============================================================================
@@ -281,7 +281,7 @@ clear(BamAlignmentRecord & record)
 {
     clear(record.qName);
     record.flag = 0;
-    record._qID = MaxValue<uint32_t>::VALUE;
+    record._qID = std::numeric_limits<uint32_t>::max();
     record.rID = BamAlignmentRecord::INVALID_REFID;
     record.beginPos = BamAlignmentRecord::INVALID_POS;
     record.mapQ = 255;
@@ -607,6 +607,37 @@ getAlignmentLengthInRef(BamAlignmentRecord const & record)
     return l;
 }
 
+// ----------------------------------------------------------------------------
+// Function appendRawPod()
+// ----------------------------------------------------------------------------
+
+#if SEQAN_BIG_ENDIAN
+inline void
+enforceLittleEndian(BamAlignmentRecordCore & r)
+{
+    enforceLittleEndian(r.rID);
+    enforceLittleEndian(r.beginPos);
+    // _l_qname unchanged because 8bit
+    // mapQ unchanged because 8bit
+    r.bin       = htole16(r.bin);
+    r._n_cigar  = htole16(r._n_cigar);
+    r.flag      = htole16(r.flag);
+    enforceLittleEndian(r._l_qseq);
+    enforceLittleEndian(r.rNextId);
+    enforceLittleEndian(r.pNext);
+    enforceLittleEndian(r.tLen);
+}
+
+// This function is guarded so that we save the copy on little endian systems
+template <typename TTarget>
+inline void
+appendRawPod(TTarget & target, BamAlignmentRecordCore r)
+{
+    enforceLittleEndian(r);
+    appendRawPodImpl(target, r);
+}
+#endif
+
 }  // namespace seqan
 
 #endif  // #ifndef INCLUDE_SEQAN_BAM_IO_BAM_RECORD_H_
diff --git a/include/seqan/bam_io/bam_alignment_record_util.h b/include/seqan/bam_io/bam_alignment_record_util.h
index 1a7a02f..777edd6 100644
--- a/include/seqan/bam_io/bam_alignment_record_util.h
+++ b/include/seqan/bam_io/bam_alignment_record_util.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -237,7 +237,7 @@ bamRecordToAlignment(Align<TSource, TSpec> & result, TReference & reference, Bam
     // TODO(holtgrew): Clipping better than copying infix? But is it generic?
     resize(rows(result), 2);
 
-    unsigned len = record.beginPos + getAlignmentLengthInRef(record) - countPaddings(record.cigar);
+    unsigned len = getAlignmentLengthInRef(record) - countPaddings(record.cigar);
 
     setSource(row(result, 0), reference);
     setClippedEndPosition(row(result, 0), record.beginPos + len);
diff --git a/include/seqan/bam_io/bam_file.h b/include/seqan/bam_io/bam_file.h
index bf1c681..5190796 100644
--- a/include/seqan/bam_io/bam_file.h
+++ b/include/seqan/bam_io/bam_file.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -243,7 +243,7 @@ readRecord(BamAlignmentRecord & record, FormattedFile<Bam, Input, TSpec> & file)
 
 template <typename TRecords, typename TSpec, typename TSize>
 inline SEQAN_FUNC_ENABLE_IF(And<IsSameType<typename Value<TRecords>::Type, BamAlignmentRecord>,
-                                IsInteger<TSize> >, TSize)
+                                Is<IntegerConcept<TSize> > >, TSize)
 readRecords(TRecords & records, FormattedFile<Bam, Input, TSpec> & file, TSize maxRecords)
 {
     String<CharString> & buffers = context(file).buffers;
diff --git a/include/seqan/bam_io/bam_header_record.h b/include/seqan/bam_io/bam_header_record.h
index 0854d33..45e3f16 100644
--- a/include/seqan/bam_io/bam_header_record.h
+++ b/include/seqan/bam_io/bam_header_record.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -272,7 +272,7 @@ findTagKey(unsigned & idx, TKeyName const & key, BamHeaderRecord const & record)
 
 template <typename TId>
 SEQAN_FUNC_ENABLE_IF(
-    IsInteger<TId>,
+    Is<IntegerConcept<TId> >,
     bool)
 inline getTagValue(CharString & value, TId idx, BamHeaderRecord const & record)
 {
@@ -310,7 +310,7 @@ inline getTagValue(CharString & value, TKeyName const & key, BamHeaderRecord con
 
 template <typename TId>
 SEQAN_FUNC_ENABLE_IF(
-    IsInteger<TId>,
+    Is<IntegerConcept<TId> >,
     void)
 inline setTagValue(TId idx, CharString const & value, BamHeaderRecord & record)
 {
diff --git a/include/seqan/bam_io/bam_index_bai.h b/include/seqan/bam_io/bam_index_bai.h
index db5ed68..fbb9f8f 100644
--- a/include/seqan/bam_io/bam_index_bai.h
+++ b/include/seqan/bam_io/bam_index_bai.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -37,7 +37,7 @@
 
 /* The MIT License
 
-   Copyright (c) 2008-2009 Genome Research Ltd.
+   Copyright (c) 2008-2018 Genome Research Ltd.
 
    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
@@ -146,7 +146,7 @@ public:
     String<TBinIndex_> _binIndices;
     String<TLinearIndex_> _linearIndices;
 
-    BamIndex() : _unalignedCount(maxValue<uint64_t>())
+    BamIndex() : _unalignedCount(std::numeric_limits<uint64_t>::max())
     {}
 };
 
@@ -162,24 +162,29 @@ public:
  * @fn BamFileIn#jumpToRegion
  * @brief Seek in BamFileIn using an index.
  *
- * You provide a region <tt>[pos, posEnd)</tt> on the reference <tt>refID</tt> that you want to jump to and the function
- * jumps to the first alignment in this region, if any.
+ * You provide a region <tt>[regionStart, regionEnd]</tt> on the reference <tt>refID</tt>
+ * that you want to jump to and the function jumps to the first alignment (bam record)
+ * whose start position lies inside this region, if any.
+ * Note: The current inmplementation only consideres the read start positions.
+ *       Therefore, we do guarantee that reads overlapping the region are included.
+ *       To account for this limitation you may want to choose the start of your
+ *       your region with an appropiate offset (e.g. start - length_of_read).
  *
- * @signature bool jumpToRegion(bamFileIn, hasAlignments, refID, pos, posEnd, index);
+ * @signature bool jumpToRegion(bamFileIn, hasAlignments, refID, regionStart, regionEnd, index);
  *
  * @param[in,out] bamFileIn     The @link BamFileIn @endlink to jump with.
- * @param[out]    hasAlignments A <tt>bool</tt> that is set true if the region <tt>[pos, posEnd)</tt> has any
- *                              alignments.
+ * @param[out]    hasAlignments A <tt>bool</tt> that is set true if the region <tt>[regionStart, regionEnd]</tt> has any
+ *                              at least one overlapping alignment (bam record).
  * @param[in]     refID         The reference id to jump to (<tt>int32_t</tt>).
- * @param[in]     pos           The begin of the region to jump to (<tt>int32_t</tt>).
- * @param[in]     posEnd        The end of the region to jump to (<tt>int32_t</tt>).
+ * @param[in]     regionStart   The begin of the region to jump to (<tt>int32_t</tt>).
+ * @param[in]     regionEnd     The end of the region to jump to (<tt>int32_t</tt>).
  * @param[in]     index         The @link BamIndex @endlink to use for the jumping.
  *
  * @return bool true if seeking was successful, false if not.
  *
  * @section Remarks
  *
- * This function fails if <tt>refID</tt>/<tt>pos</tt> are invalid.
+ * This function fails if <tt>refID</tt>/<tt>regionStart</tt> are invalid.
  */
 
 static inline void
@@ -202,8 +207,8 @@ inline bool
 jumpToRegion(FormattedFile<Bam, Input, TSpec> & bamFile,
              bool & hasAlignments,
              int32_t refId,
-             int32_t pos,
-             int32_t posEnd,
+             int32_t regionStart,
+             int32_t regionEnd,
              BamIndex<Bai> const & index)
 {
     if (!isEqual(format(bamFile), Bam()))
@@ -218,14 +223,14 @@ jumpToRegion(FormattedFile<Bam, Input, TSpec> & bamFile,
     // ------------------------------------------------------------------------
     // Compute offset in BGZF file.
     // ------------------------------------------------------------------------
-    uint64_t offset = MaxValue<uint64_t>::VALUE;
+    uint64_t offset = std::numeric_limits<uint64_t>::max();
 
-    // Retrieve the candidate bin identifiers for [pos, posEnd).
+    // Retrieve the candidate bin identifiers for [regionStart, regionEnd).
     String<uint16_t> candidateBins;
-    _baiReg2bins(candidateBins, pos, posEnd);
+    _baiReg2bins(candidateBins, regionStart, regionEnd);
 
     // Retrieve the smallest required offset from the linear index.
-    unsigned windowIdx = pos >> 14;  // Linear index consists of 16kb windows.
+    unsigned windowIdx = regionStart >> 14;  // Linear index consists of 16kb windows.
     uint64_t linearMinOffset = 0;
     if (windowIdx >= length(index._linearIndices[refId]))
     {
@@ -298,24 +303,43 @@ jumpToRegion(FormattedFile<Bam, Input, TSpec> & bamFile,
         readRecord(record, bamFile);
 
         // std::cerr << "record.beginPos == " << record.beginPos << "\n";
-        // int32_t endPos = record.beginPos + getAlignmentLengthInRef(record);
         if (record.rID != refId)
             continue;  // Wrong contig.
-        if (!hasAlignments || record.beginPos <= pos)
+
+        if (record.beginPos <= regionStart)
         {
-            // Found a valid alignment.
-            hasAlignments = true;
             offset = *candIt;
         }
 
-        if (record.beginPos >= posEnd)
+        if (record.beginPos >= regionEnd)
             break;  // Cannot find overlapping any more.
     }
 
-    if (offset != MaxValue<uint64_t>::VALUE)
-        setPosition(bamFile, offset);
+    if (offset == std::numeric_limits<uint64_t>::max())
+        return true; // Finding no overlapping alignment is not an error, hasAlignments is false.
+
+    // Now only the right most offset was found but it is not ensured that the
+    // alignment at the start of the offset lies inside the region.
+    // Therefore we must advance further or until the region ends.
+    setPosition(bamFile, offset);
+
+    while (!atEnd(bamFile))
+    {
+        auto seek_pos = position(bamFile); // store current pos to reset bamFile if necessary
+
+        readRecord(record, bamFile);
+
+        if (record.beginPos >= regionEnd)
+            break;
+
+        if (record.beginPos >= regionStart)
+        {
+            hasAlignments = true;
+            setPosition(bamFile, seek_pos);
+            break;
+        }
+    }
 
-    // Finding no overlapping alignment is not an error, hasAlignments is false.
     return true;
 }
 
@@ -345,19 +369,19 @@ bool jumpToOrphans(FormattedFile<Bam, Input, TSpec> & bamFile,
     hasAlignments = false;
 
     // Search linear indices for the largest entry of all references.
-    uint64_t aliOffset = MaxValue<uint64_t>::VALUE;
+    uint64_t aliOffset = std::numeric_limits<uint64_t>::max();
     for (int i = length(index._linearIndices) - 1; i >= 0; --i)
         if (!empty(index._linearIndices[i]))
         {
             aliOffset = back(index._linearIndices[i]);
             break;
         }
-    if (aliOffset == MaxValue<uint64_t>::VALUE)
+    if (aliOffset == std::numeric_limits<uint64_t>::max())
         return false;  // No offset found.
 
     // Get index of the first orphan alignment by seeking from linear index bucket.
     BamAlignmentRecord record;
-    uint64_t offset = MaxValue<uint64_t>::VALUE;
+    uint64_t offset = std::numeric_limits<uint64_t>::max();
     uint64_t result = 0;
     if (!setPosition(bamFile, aliOffset))
         return false;  // Error while seeking.
@@ -375,7 +399,7 @@ bool jumpToOrphans(FormattedFile<Bam, Input, TSpec> & bamFile,
     }
 
     // Jump back to the first alignment.
-    if (offset != MaxValue<uint64_t>::VALUE)
+    if (offset != std::numeric_limits<uint64_t>::max())
     {
         if (!setPosition(bamFile, offset))
             return false;  // Error while seeking.
@@ -440,6 +464,7 @@ open(BamIndex<Bai> & index, char const * filename)
     fin.read(reinterpret_cast<char *>(&nRef), 4);
     if (!fin.good())
         return false;
+    enforceLittleEndian(nRef);
 
     resize(index._linearIndices, nRef);
     resize(index._binIndices, nRef);
@@ -451,6 +476,7 @@ open(BamIndex<Bai> & index, char const * filename)
         fin.read(reinterpret_cast<char *>(&nBin), 4);
         if (!fin.good())
             return false;
+        enforceLittleEndian(nBin);
         index._binIndices[i].clear();
         BaiBamIndexBinData_ data;
         for (int j = 0; j < nBin; ++j)  // For each bin.
@@ -461,11 +487,13 @@ open(BamIndex<Bai> & index, char const * filename)
             fin.read(reinterpret_cast<char *>(&bin), 4);
             if (!fin.good())
                 return false;
+            enforceLittleEndian(bin);
 
             int32_t nChunk = 0;
             fin.read(reinterpret_cast<char *>(&nChunk), 4);
             if (!fin.good())
                 return false;
+            enforceLittleEndian(nChunk);
             reserve(data.chunkBegEnds, nChunk);
             for (int k = 0; k < nChunk; ++k)  // For each chunk;
             {
@@ -475,6 +503,8 @@ open(BamIndex<Bai> & index, char const * filename)
                 fin.read(reinterpret_cast<char *>(&chunkEnd), 8);
                 if (!fin.good())
                     return false;
+                enforceLittleEndian(chunkBeg);
+                enforceLittleEndian(chunkEnd);
                 appendValue(data.chunkBegEnds, Pair<uint64_t>(chunkBeg, chunkEnd));
             }
 
@@ -487,6 +517,7 @@ open(BamIndex<Bai> & index, char const * filename)
         fin.read(reinterpret_cast<char *>(&nIntv), 4);
         if (!fin.good())
             return false;
+        enforceLittleEndian(nIntv);
         clear(index._linearIndices[i]);
         reserve(index._linearIndices[i], nIntv);
         for (int j = 0; j < nIntv; ++j)
@@ -495,6 +526,7 @@ open(BamIndex<Bai> & index, char const * filename)
             fin.read(reinterpret_cast<char *>(&ioffset), 8);
             if (!fin.good())
                 return false;
+            enforceLittleEndian(ioffset);
             appendValue(index._linearIndices[i], ioffset);
         }
     }
@@ -510,6 +542,7 @@ open(BamIndex<Bai> & index, char const * filename)
         fin.clear();
         nNoCoord = 0;
     }
+    enforceLittleEndian(nNoCoord);
     index._unalignedCount = nNoCoord;
 
     return true;
@@ -549,6 +582,7 @@ inline bool save(BamIndex<Bai> const & index, char const * baiFilename)
     // Write header.
     out.write("BAI\1", 4);
     int32_t numRefSeqs = length(index._binIndices);
+    enforceLittleEndian(numRefSeqs);
     out.write(reinterpret_cast<char *>(&numRefSeqs), 4);
 
     // Write out indices.
@@ -556,42 +590,59 @@ inline bool save(BamIndex<Bai> const & index, char const * baiFilename)
     typedef TBamIndex::TBinIndex_ const        TBinIndex;
     typedef TBinIndex::const_iterator          TBinIndexIter;
     typedef TBamIndex::TLinearIndex_           TLinearIndex;
-    for (int i = 0; i < numRefSeqs; ++i)
+    for (unsigned i = 0; i < length(index._binIndices); ++i)
     {
         TBinIndex const & binIndex = index._binIndices[i];
         TLinearIndex const & linearIndex = index._linearIndices[i];
 
         // Write out binning index.
         int32_t numBins = binIndex.size();
+        enforceLittleEndian(numBins);
         out.write(reinterpret_cast<char *>(&numBins), 4);
         for (TBinIndexIter itB = binIndex.begin(), itBEnd = binIndex.end(); itB != itBEnd; ++itB)
         {
             // Write out bin id.
-            out.write(reinterpret_cast<char const *>(&itB->first), 4);
+            uint32_t tmp = itB->first;
+            enforceLittleEndian(tmp);
+            out.write(reinterpret_cast<char const *>(&tmp), 4);
             // Write out number of chunks.
             uint32_t numChunks = length(itB->second.chunkBegEnds);
+            enforceLittleEndian(numChunks);
             out.write(reinterpret_cast<char *>(&numChunks), 4);
             // Write out all chunks.
             typedef Iterator<String<Pair<uint64_t> > const, Rooted>::Type TChunkIter;
             for (TChunkIter itC = begin(itB->second.chunkBegEnds); !atEnd(itC); goNext(itC))
             {
-                out.write(reinterpret_cast<char const *>(&itC->i1), 8);
-                out.write(reinterpret_cast<char const *>(&itC->i2), 8);
+                uint64_t tmp1 = itC->i1;
+                enforceLittleEndian(tmp1);
+                uint64_t tmp2 = itC->i2;
+                enforceLittleEndian(tmp2);
+                out.write(reinterpret_cast<char const *>(&tmp1), 8);
+                out.write(reinterpret_cast<char const *>(&tmp2), 8);
             }
         }
 
         // Write out linear index.
         int32_t numIntervals = length(linearIndex);
+        enforceLittleEndian(numIntervals);
         out.write(reinterpret_cast<char *>(&numIntervals), 4);
         typedef Iterator<String<uint64_t> const, Rooted>::Type TLinearIndexIter;
         for (TLinearIndexIter it = begin(linearIndex, Rooted()); !atEnd(it); goNext(it))
-            out.write(reinterpret_cast<char const *>(&*it), 8);
+        {
+            uint64_t tmp = *it;
+            enforceLittleEndian(tmp);
+            out.write(reinterpret_cast<char const *>(&tmp), 8);
+        }
     }
 
     // Write the number of unaligned reads if set.
     //std::cerr << "UNALIGNED\t" << index._unalignedCount << std::endl;
-    if (index._unalignedCount != maxValue<uint64_t>())
-        out.write(reinterpret_cast<char const *>(&index._unalignedCount), 8);
+    if (index._unalignedCount != std::numeric_limits<uint64_t>::max())
+    {
+        uint64_t tmp = index._unalignedCount;
+        enforceLittleEndian(tmp);
+        out.write(reinterpret_cast<char const *>(&tmp), 8);
+    }
 
     return out.good();  // false on error, true on success.
 }
@@ -656,13 +707,13 @@ inline bool build(BamIndex<Bai> & index, char const * bamFilename)
 
     // Scan over BAM file and create index.
     BamAlignmentRecord record;
-    uint32_t currBin    = maxValue<uint32_t>();
-    uint32_t prevBin    = maxValue<uint32_t>();
+    uint32_t currBin    = std::numeric_limits<uint32_t>::max();
+    uint32_t prevBin    = std::numeric_limits<uint32_t>::max();
     int32_t currRefId   = BamAlignmentRecord::INVALID_REFID;
     int32_t prevRefId   = BamAlignmentRecord::INVALID_REFID;
     uint64_t currOffset = position(bamFile);
     uint64_t prevOffset = currOffset;
-    int32_t prevPos     = minValue<int32_t>();
+    int32_t prevPos     = std::numeric_limits<int32_t>::min();
 
     while (!atEnd(bamFile))
     {
@@ -710,7 +761,7 @@ inline bool build(BamIndex<Bai> & index, char const * bamFilename)
 
             // Update reference book keeping.
             prevRefId = record.rID;
-            prevBin = minValue<int32_t>();
+            prevBin = std::numeric_limits<int32_t>::min();
         }
 
         // If the alignment's reference id is valid and its bin is not a leaf.
@@ -736,7 +787,7 @@ inline bool build(BamIndex<Bai> & index, char const * bamFilename)
         if (record.bin != prevBin)
         {
             // If not first bin of reference, save previous bin data.
-            if (currBin != maxValue<uint32_t>())
+            if (currBin != std::numeric_limits<uint32_t>::max())
                 _baiAddAlignmentChunkToBin(index, currBin, currOffset, prevOffset);
 
             // Update markers.
diff --git a/include/seqan/bam_io/bam_io_context.h b/include/seqan/bam_io/bam_io_context.h
index 3bdf2e3..a4808ab 100644
--- a/include/seqan/bam_io/bam_io_context.h
+++ b/include/seqan/bam_io/bam_io_context.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/bam_io/bam_sam_conversion.h b/include/seqan/bam_io/bam_sam_conversion.h
index 4cec8de..90e090b 100644
--- a/include/seqan/bam_io/bam_sam_conversion.h
+++ b/include/seqan/bam_io/bam_sam_conversion.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -128,7 +128,7 @@ void _appendTagsSamToBamOneTag(TTarget & target, TForwardIter & iter, CharString
                     ++nEntries;
 
             // Write out array length.
-            appendRawPod(target, (uint32_t)nEntries);
+            appendRawPod(target, nEntries);
 
             // Write out array values.
             size_t startPos = 1;
@@ -233,7 +233,9 @@ struct AssignTagsBamToSamOneTagHelper_
         if (BamTypeChar<Type>::VALUE != typeC)
             return false;
 
-        appendNumber(target, reinterpret_cast<Type const &>(*it));
+        Type tmp = *reinterpret_cast<Type const *>(&*it);
+        enforceLittleEndian(tmp);
+        appendNumber(target, tmp);
         it += sizeof(Type);
         return true;
     }
@@ -299,14 +301,15 @@ void _appendTagsBamToSamOneTag(TTarget & target, TSourceIter & it)
             // Read array length.
             union {
                 char raw[4];
-                unsigned len;
+                uint32_t len;
             } tmp;
-            for (unsigned i = 0; i < 4; ++i)
+            for (uint32_t i = 0; i < 4; ++i)
             {
                 SEQAN_ASSERT_NOT(atEnd(it));
                 tmp.raw[i] = *it++;
             }
-            for (unsigned i = 0; i < tmp.len; ++i)
+            enforceLittleEndian(tmp.len);
+            for (uint32_t i = 0; i < tmp.len; ++i)
             {
                 writeValue(target, ',');
                 if (!tagApply(func, BamTagTypes()))
diff --git a/include/seqan/bam_io/bam_scanner_cache.h b/include/seqan/bam_io/bam_scanner_cache.h
index bbc1f42..9fe8bc8 100644
--- a/include/seqan/bam_io/bam_scanner_cache.h
+++ b/include/seqan/bam_io/bam_scanner_cache.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/bam_io/bam_tags_dict.h b/include/seqan/bam_io/bam_tags_dict.h
index 05ddae5..cbb21e3 100644
--- a/include/seqan/bam_io/bam_tags_dict.h
+++ b/include/seqan/bam_io/bam_tags_dict.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -302,6 +302,7 @@ buildIndex(BamTagsDict const & bamTags)
                 uint32_t len;
             } tmp;
             arrayCopyForward(it, it + 4, tmp.raw);
+            enforceLittleEndian(tmp.len);
             it += 4 + tmp.len * getBamTypeSize(c);
         }
         else
@@ -492,6 +493,7 @@ struct ExtractTagValueHelper_
         } tmp;
 
         arrayCopyForward(rawIter, rawIter + sizeof(Type), tmp.raw);
+        enforceLittleEndian(tmp.i);
         result = static_cast<TResultType>(tmp.i);
         return true;
     }
@@ -666,6 +668,7 @@ struct ToBamTagValueHelper_
         } tmp;
 
         tmp.i = static_cast<Type>(val);
+        enforceLittleEndian(tmp.i);
         append(result, toRange(&tmp.raw[0], &tmp.raw[sizeof(Type)]));
         return true;
     }
diff --git a/include/seqan/bam_io/cigar.h b/include/seqan/bam_io/cigar.h
index 8a61fef..1d6df11 100644
--- a/include/seqan/bam_io/cigar.h
+++ b/include/seqan/bam_io/cigar.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/bam_io/read_bam.h b/include/seqan/bam_io/read_bam.h
index 71059c8..b655c9f 100644
--- a/include/seqan/bam_io/read_bam.h
+++ b/include/seqan/bam_io/read_bam.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -207,6 +207,7 @@ readRecord(BamAlignmentRecord & record,
 
     // BamAlignmentRecordCore.
     arrayCopyForward(it, it + sizeof(BamAlignmentRecordCore), reinterpret_cast<char*>(&record));
+    enforceLittleEndian(*reinterpret_cast<BamAlignmentRecordCore*>(&record));
     it += sizeof(BamAlignmentRecordCore);
 
     remainingBytes -= sizeof(BamAlignmentRecordCore) + record._l_qname +
@@ -236,7 +237,7 @@ readRecord(BamAlignmentRecord & record,
     TCigarIter cigEnd = end(record.cigar, Standard());
     for (TCigarIter cig = begin(record.cigar, Standard()); cig != cigEnd; ++cig)
     {
-        unsigned opAndCnt;
+        uint32_t opAndCnt;
         readRawPod(opAndCnt, it);
         SEQAN_ASSERT_LEQ(opAndCnt & 15, 8u);
         cig->operation = CIGAR_MAPPING[opAndCnt & 15];
@@ -251,9 +252,9 @@ readRecord(BamAlignmentRecord & record,
     {
         unsigned char ui = getValue(it);
         ++it;
-        assignValue(sit, Iupac(ui >> 4));
+        *sit = Iupac(ui >> 4);
         ++sit;
-        assignValue(sit, Iupac(ui & 0x0f));
+        *sit = Iupac(ui & 0x0f);
         ++sit;
     }
     if (record._l_qseq & 1)
@@ -266,7 +267,7 @@ readRecord(BamAlignmentRecord & record,
     TQualIter qitEnd = end(record.qual, Standard());
     for (TQualIter qit = begin(record.qual, Standard()); qit != qitEnd;)
         *qit++ = '!' + *it++;
-    if (!empty(record.qual) && record.qual[0] == '\xff')
+    if (!empty(record.qual) && static_cast<char>(record.qual[0] - '!') == '\xff')
         clear(record.qual);
 
     // tags
diff --git a/include/seqan/bam_io/read_sam.h b/include/seqan/bam_io/read_sam.h
index ad30a46..6b21cf9 100644
--- a/include/seqan/bam_io/read_sam.h
+++ b/include/seqan/bam_io/read_sam.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -353,7 +353,7 @@ readRecord(BamAlignmentRecord & record,
     // TLEN
     if (value(iter) == '*')
     {
-        record.tLen = MaxValue<int32_t>::VALUE;
+        record.tLen = std::numeric_limits<int32_t>::max();
         skipOne(iter);
     }
     else
diff --git a/include/seqan/bam_io/write_bam.h b/include/seqan/bam_io/write_bam.h
index 6eb1e1c..1578dba 100644
--- a/include/seqan/bam_io/write_bam.h
+++ b/include/seqan/bam_io/write_bam.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/bam_io/write_sam.h b/include/seqan/bam_io/write_sam.h
index 3191e9a..a8b51ba 100644
--- a/include/seqan/bam_io/write_sam.h
+++ b/include/seqan/bam_io/write_sam.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic.h b/include/seqan/basic.h
index 0cf12db..cd83b1b 100644
--- a/include/seqan/basic.h
+++ b/include/seqan/basic.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -106,7 +106,4 @@
 // Basic device metafunctions.
 #include <seqan/basic/basic_device.h>
 
-// Basic SIMD vector implementation using intrinsics.
-#include <seqan/basic/basic_simd_vector.h>
-
 #endif  // #ifndef SEQAN_INCLUDE_SEQAN_BASIC_H_
diff --git a/include/seqan/basic/aggregate_concept.h b/include/seqan/basic/aggregate_concept.h
index f79a7d1..d23f2d0 100644
--- a/include/seqan/basic/aggregate_concept.h
+++ b/include/seqan/basic/aggregate_concept.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/allocator_chunkpool.h b/include/seqan/basic/allocator_chunkpool.h
index d41f433..f8cae4f 100644
--- a/include/seqan/basic/allocator_chunkpool.h
+++ b/include/seqan/basic/allocator_chunkpool.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/allocator_interface.h b/include/seqan/basic/allocator_interface.h
index 41d7169..a90b401 100644
--- a/include/seqan/basic/allocator_interface.h
+++ b/include/seqan/basic/allocator_interface.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -200,34 +200,18 @@ allocate(T const &,
 #else
     data = (TValue *) malloc(count * sizeof(TValue));
 #endif*/
-  data = (TValue *) operator new(count * sizeof(TValue));
-#endif
-
-#ifdef SEQAN_PROFILE
-    if (data)
-        SEQAN_PROADD(SEQAN_PROMEMORY, count * sizeof(TValue));
-#endif
-}
-
-template <typename T, typename TValue, typename TSize, typename TUsage>
-inline void
-allocate(T &,
-         TValue * & data,
-         TSize count,
-         Tag<TUsage> const &)
-{
-//  data = (TValue *) operator new(count * sizeof(TValue));
-#ifdef STDLIB_VS
-    data = (TValue *) _aligned_malloc(count * sizeof(TValue), __alignof(TValue));
-#else
-/*#if _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600
-    const size_t align = (__alignof__(TValue) < sizeof(void*)) ? sizeof(void*) : __alignof__(TValue);
-    if (posix_memalign(&(void* &)data, align, count * sizeof(TValue)))
-      data = NULL;
-#else
-    data = (TValue *) malloc(count * sizeof(TValue));
-#endif*/
-  data = (TValue *) operator new(count * sizeof(TValue));
+// suppress -Walloc-size-larger-than= warning; a simple static_cast does not work
+// a working solution would be to downcast std::size_t to unsigned, but this
+// would loose information; thus disabling this for gcc 7 and upwards
+    SEQAN_ASSERT_LEQ(static_cast<std::size_t>(count), std::numeric_limits<std::size_t>::max() / sizeof(TValue));
+#   if defined(COMPILER_GCC) &&  __GNUC__ >= 7
+#       pragma GCC diagnostic push
+#       pragma GCC diagnostic ignored "-Walloc-size-larger-than="
+#   endif //COMPILER_GCC
+    data = (TValue *) operator new(count * sizeof(TValue));
+#   if defined(COMPILER_GCC) &&  __GNUC__ >= 7
+#       pragma GCC diagnostic pop
+#   endif //COMPILER_GCC
 #endif
 
 #ifdef SEQAN_PROFILE
diff --git a/include/seqan/basic/allocator_multipool.h b/include/seqan/basic/allocator_multipool.h
index a93cbd1..8b0932a 100644
--- a/include/seqan/basic/allocator_multipool.h
+++ b/include/seqan/basic/allocator_multipool.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/allocator_simple.h b/include/seqan/basic/allocator_simple.h
index 37d45ce..09ec3b1 100644
--- a/include/seqan/basic/allocator_simple.h
+++ b/include/seqan/basic/allocator_simple.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/allocator_singlepool.h b/include/seqan/basic/allocator_singlepool.h
index 314cdab..c037b99 100644
--- a/include/seqan/basic/allocator_singlepool.h
+++ b/include/seqan/basic/allocator_singlepool.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/allocator_to_std.h b/include/seqan/basic/allocator_to_std.h
index b7d07a5..981dbb3 100644
--- a/include/seqan/basic/allocator_to_std.h
+++ b/include/seqan/basic/allocator_to_std.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/alphabet_adapt_builtins.h b/include/seqan/basic/alphabet_adapt_builtins.h
index a5db639..7fdeff1 100644
--- a/include/seqan/basic/alphabet_adapt_builtins.h
+++ b/include/seqan/basic/alphabet_adapt_builtins.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -171,13 +171,15 @@ unknownValueImpl(char const *)
 // ----------------------------------------------------------------------------
 
 template <typename T>
+[[deprecated("Use std::numeric_limits<T>::max() instead.")]]
 inline T const &
 supremumValueImpl(T *)
 {
-    static T const x = MaxValue<T>::VALUE;
+    static T const x = std::numeric_limits<T>::max();
     return x;
 }
 
+[[deprecated("Use std::numeric_limits<T>::max() instead.")]]
 inline long double const &
 supremumValueImpl(long double *)
 {
@@ -185,12 +187,15 @@ supremumValueImpl(long double *)
     return _value;
 }
 
+[[deprecated("Use std::numeric_limits<T>::max() instead.")]]
 inline double const &
 supremumValueImpl(double *)
 {
     static double const _value = std::numeric_limits<double>::infinity( );
     return _value;
 }
+
+[[deprecated("Use std::numeric_limits<T>::max() instead.")]]
 inline float const &
 supremumValueImpl(float *)
 {
@@ -203,13 +208,15 @@ supremumValueImpl(float *)
 // ----------------------------------------------------------------------------
 
 template <typename T>
+[[deprecated("Use std::numeric_limits<T>::min() instead.")]]
 inline T const &
 infimumValueImpl(T *)
 {
-    static T const x = MinValue<T>::VALUE;
+    static T const x = std::numeric_limits<T>::min();
     return x;
 }
 
+[[deprecated("Use std::numeric_limits<T>::min() instead.")]]
 inline float const &
 infimumValueImpl(float *)
 {
@@ -217,6 +224,7 @@ infimumValueImpl(float *)
     return _value;
 }
 
+[[deprecated("Use std::numeric_limits<T>::min() instead.")]]
 inline double const &
 infimumValueImpl(double *)
 {
@@ -224,6 +232,7 @@ infimumValueImpl(double *)
     return _value;
 }
 
+[[deprecated("Use std::numeric_limits<T>::min() instead.")]]
 inline long double const &
 infimumValueImpl(long double *)
 {
diff --git a/include/seqan/basic/alphabet_bio.h b/include/seqan/basic/alphabet_bio.h
index 0339e34..701e82e 100644
--- a/include/seqan/basic/alphabet_bio.h
+++ b/include/seqan/basic/alphabet_bio.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/alphabet_concept.h b/include/seqan/basic/alphabet_concept.h
index 50e5164..c8a9206 100644
--- a/include/seqan/basic/alphabet_concept.h
+++ b/include/seqan/basic/alphabet_concept.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -171,7 +171,7 @@ SEQAN_CONCEPT_REFINE(AlphabetConcept, (TValue), (Assignable)(DefaultConstructibl
  *
  * @section Status
  *
- * Deprecated, will be removed in favour of OrderedAlphabetConcept#MaxValue.
+ * @deprecated Will be removed in favour of MaxValue.
  *
  * @see OrderedAlphabetConcept#maxValue
  */
@@ -191,7 +191,7 @@ SEQAN_CONCEPT_REFINE(AlphabetConcept, (TValue), (Assignable)(DefaultConstructibl
  *
  * @section Status
  *
- * Deprecated, will be removed in favour of MaxValue.
+ * @deprecated Will be removed in favour of MaxValue.
  *
  * @see OrderedAlphabetConcept#supremumValueImpl
  * @see OrderedAlphabetConcept#minValue
@@ -213,7 +213,7 @@ SEQAN_CONCEPT_REFINE(AlphabetConcept, (TValue), (Assignable)(DefaultConstructibl
  *
  * @section Status
  *
- * Deprecated, will be removed in favour of MinValue.
+ * @deprecated Will be removed in favour of MinValue.
  *
  * @see OrderedAlphabetConcept#minValue
  */
@@ -233,7 +233,7 @@ SEQAN_CONCEPT_REFINE(AlphabetConcept, (TValue), (Assignable)(DefaultConstructibl
  *
  * @section Status
  *
- * Deprecated, will be removed in favour of MinValue.
+ * @deprecated  Will be removed in favour of MinValue.
  *
  * @see OrderedAlphabetConcept#infimumValueImpl
  * @see OrderedAlphabetConcept#maxValue
@@ -243,10 +243,10 @@ SEQAN_CONCEPT_REFINE(AlphabetConcept, (TValue), (Assignable)(DefaultConstructibl
 // Forwards for Metafunctions and Functions.
 template <typename T> struct MinValue;
 template <typename T> struct MaxValue;
-template <typename T> T const & minValue();
-template <typename T> T const & minValue(T);
-template <typename T> T const & maxValue();
-template <typename T> T const & maxValue(T);
+template <typename T> T minValue();
+template <typename T> T minValue(T);
+template <typename T> T maxValue();
+template <typename T> T maxValue(T);
 
 SEQAN_CONCEPT_REFINE(OrderedAlphabetConcept, (TValue), (AlphabetConcept)(Comparable))
 {
@@ -255,11 +255,11 @@ SEQAN_CONCEPT_REFINE(OrderedAlphabetConcept, (TValue), (AlphabetConcept)(Compara
     SEQAN_CONCEPT_USAGE(OrderedAlphabetConcept)
     {
         // type consistency checks
-        sameType(minValue(val), val);
-        sameType(minValue<TValue>(), val);
+        // sameType(minValue(val), val);      // minValue() is deprecated
+        // sameType(minValue<TValue>(), val); // minValue() is deprecated
         sameType(MinValue<TValue>::VALUE, val);
-        sameType(maxValue(val), val);
-        sameType(maxValue<TValue>(), val);
+        // sameType(maxValue(val), val);      // maxValue() is deprecated
+        // sameType(maxValue<TValue>(), val); // maxValue() is deprecated
         sameType(MaxValue<TValue>::VALUE, val);
 
         // TODO(holtgrew): This does not work in C++98, we need C++11 with constexpr.
diff --git a/include/seqan/basic/alphabet_math.h b/include/seqan/basic/alphabet_math.h
index c77afdb..7031bc4 100644
--- a/include/seqan/basic/alphabet_math.h
+++ b/include/seqan/basic/alphabet_math.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -211,7 +211,7 @@ unsigned char toUpperValue(unsigned char c)
 // Function supremumValueImpl
 // ----------------------------------------------------------------------------
 
-template <typename T> inline T const & supremumValueImpl(T *);
+template <typename T> [[deprecated("Use std::numeric_limits<T>::max() instead.")]] inline T const & supremumValueImpl(T *);
 
 // ----------------------------------------------------------------------------
 // Function maxValue
@@ -220,26 +220,26 @@ template <typename T> inline T const & supremumValueImpl(T *);
 // Forward to supremumValueImpl() only.
 
 template <typename T>
-inline T const &
+[[deprecated("Use std::numeric_limits<T>::max() instead.")]]
+inline T
 maxValue()
 {
-    T * _tag = 0;
-    return supremumValueImpl(_tag);
+    return std::numeric_limits<T>::max();
 }
 
 template <typename T>
-inline T const &
+[[deprecated("Use std::numeric_limits<T>::max() instead.")]]
+inline T
 maxValue(T /*tag*/)
 {
-    T * _tag = 0;
-    return supremumValueImpl(_tag);
+    return std::numeric_limits<T>::max();
 }
 
 // ----------------------------------------------------------------------------
 // Function infimumValueImpl
 // ----------------------------------------------------------------------------
 
-template <typename T> inline T const & infimumValueImpl(T *);
+template <typename T> [[deprecated("Use std::numeric_limits<T>::min() instead.")]] inline T const & infimumValueImpl(T *);
 
 // ----------------------------------------------------------------------------
 // Function minValue
@@ -248,19 +248,19 @@ template <typename T> inline T const & infimumValueImpl(T *);
 // Forward to infimumValueImpl() only.
 
 template <typename T>
-inline T const &
+[[deprecated("Use std::numeric_limits<T>::min() instead.")]]
+inline T
 minValue()
 {
-    T * _tag = 0;
-    return infimumValueImpl(_tag);
+    return std::numeric_limits<T>::min();
 }
 
 template <typename T>
-inline T const &
+[[deprecated("Use std::numeric_limits<T>::min() instead.")]]
+inline T
 minValue(T /*tag*/)
 {
-    T * _tag = 0;
-    return infimumValueImpl(_tag);
+    return std::numeric_limits<T>::min();
 }
 
 // ----------------------------------------------------------------------------
diff --git a/include/seqan/basic/alphabet_profile.h b/include/seqan/basic/alphabet_profile.h
index ac81662..52d4d05 100644
--- a/include/seqan/basic/alphabet_profile.h
+++ b/include/seqan/basic/alphabet_profile.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/alphabet_qualities.h b/include/seqan/basic/alphabet_qualities.h
index b3b79de..d249279 100644
--- a/include/seqan/basic/alphabet_qualities.h
+++ b/include/seqan/basic/alphabet_qualities.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/alphabet_residue.h b/include/seqan/basic/alphabet_residue.h
index fae9710..7033a45 100644
--- a/include/seqan/basic/alphabet_residue.h
+++ b/include/seqan/basic/alphabet_residue.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -768,6 +768,17 @@ inline void assign(Rna & target, char c_source)
 }
 
 template <>
+struct CompareTypeImpl<Rna5, Iupac>
+{
+    typedef Rna5 Type;
+};
+
+inline void assign(Rna5 & target, Iupac const & source)
+{
+    target.value = TranslateTableIupacToDna5_<>::VALUE[source.value];
+}
+
+template <>
 struct CompareTypeImpl<Rna, Rna5>
 {
     typedef Rna Type;
diff --git a/include/seqan/basic/alphabet_residue_tabs.h b/include/seqan/basic/alphabet_residue_tabs.h
index ca2f439..ef3dd49 100644
--- a/include/seqan/basic/alphabet_residue_tabs.h
+++ b/include/seqan/basic/alphabet_residue_tabs.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/alphabet_simple_type.h b/include/seqan/basic/alphabet_simple_type.h
index f4955fc..8e4fb0e 100644
--- a/include/seqan/basic/alphabet_simple_type.h
+++ b/include/seqan/basic/alphabet_simple_type.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -135,26 +135,20 @@ public:
     // Members;  Have to be defined in class.
     // ------------------------------------------------------------------------
 
-    TValue value;
+    TValue value{0};
 
     // ------------------------------------------------------------------------
     // Constructors;  Have to be defined in class.
     // ------------------------------------------------------------------------
 
     // TODO(holtgrew): Do we want default initialization?
-   
-    SimpleType() : value(0)
-    {}
-
-   
-    SimpleType(SimpleType const & other)
-    {
-        assign(*this, other);
-    }
+    SimpleType() = default;
+    SimpleType(SimpleType const &) = default;
+    SimpleType(SimpleType &&) = default;
+    ~SimpleType() = default;
 
     // TODO(holtgrew): Do we want an explicit here?
     template <typename T>
-   
     SimpleType(T const & other)
     {
         assign(*this, other);
@@ -163,13 +157,8 @@ public:
     // ------------------------------------------------------------------------
     // Assignment Operator;  Have to be defined in class.
     // ------------------------------------------------------------------------
-
-   
-    SimpleType & operator=(SimpleType const & other)
-    {
-        assign(*this, other);
-        return *this;
-    }
+    SimpleType & operator=(SimpleType const &) = default;
+    SimpleType & operator=(SimpleType &&) = default;
 
     template <typename T>
     inline SimpleType &
@@ -264,6 +253,67 @@ public:
 };
 #pragma pack(pop)
 
+} // namespace seqan
+
+// ----------------------------------------------------------------------------
+// Class numeric_limits
+// ----------------------------------------------------------------------------
+namespace std
+{
+
+template <typename TValue, typename TSpec>
+class numeric_limits<seqan::SimpleType<TValue, TSpec> >
+{
+public:
+    static constexpr bool is_specialized    = true;
+    static constexpr bool is_signed         = false;
+    static constexpr bool is_integer        = false;
+    static constexpr bool is_exact          = true;
+    static constexpr bool has_infinity      = false;
+    static constexpr bool has_quiet_NaN     = false;
+    static constexpr bool has_signaling_NaN = false;
+    static constexpr float_denorm_style has_denorm = denorm_absent;
+    static constexpr bool has_denorm_loss   = false;
+    static constexpr float_round_style round_style = round_toward_zero;
+    static constexpr bool is_iec559         = false;
+    static constexpr bool is_bounded        = true;
+    static constexpr bool is_modulu         = false;
+    static constexpr int  digits            = seqan::BitsPerValue<seqan::SimpleType<TValue, TSpec>>::VALUE;
+    static constexpr int  digits10          = digits - 1;
+    static constexpr int  max_digits10      = 0;
+    static constexpr int  radix             = 2;
+    static constexpr int  min_exponent      = 0;
+    static constexpr int  min_exponent10    = 0;
+    static constexpr int  max_exponent      = 0;
+    static constexpr int  max_exponent10    = 0;
+    static constexpr bool traps             = false;
+    static constexpr bool tinyness_before   = false;
+
+    static constexpr seqan::SimpleType<TValue, TSpec> min()
+    {
+        return seqan::SimpleType<TValue, TSpec>(0);
+    }
+
+    static constexpr seqan::SimpleType<TValue, TSpec> max()
+    {
+        return seqan::SimpleType<TValue, TSpec>(((TValue)seqan::ValueSize<seqan::SimpleType<TValue, TSpec> >::VALUE - 1));
+    }
+
+    static constexpr seqan::SimpleType<TValue, TSpec> lowest()
+    {
+        return seqan::SimpleType<TValue, TSpec>(0);
+    }
+
+    static constexpr seqan::SimpleType<TValue, TSpec> infinity()
+    {
+        return seqan::SimpleType<TValue, TSpec>(((TValue)seqan::ValueSize<seqan::SimpleType<TValue, TSpec> >::VALUE - 1));
+    }
+};
+
+} //namespace std
+
+namespace seqan
+{
 // ============================================================================
 // Metafunctions
 // ============================================================================
@@ -319,7 +369,7 @@ struct MinValue<SimpleType<TValue, TSpec> >
 };
 
 template <typename TValue, typename TSpec>
-const SimpleType<TValue, TSpec> MinValue<SimpleType<TValue, TSpec> >::VALUE = SimpleType<TValue, TSpec>(0);
+const SimpleType<TValue, TSpec> MinValue<SimpleType<TValue, TSpec> >::VALUE = std::numeric_limits<SimpleType<TValue, TSpec>>::min();
 
 template <typename TValue, typename TSpec>
 inline SimpleType<TValue, TSpec> const &
@@ -339,7 +389,7 @@ struct MaxValue<SimpleType<TValue, TSpec> >
 };
 
 template <typename TValue, typename TSpec>
-const SimpleType<TValue, TSpec> MaxValue<SimpleType<TValue, TSpec> >::VALUE = SimpleType<TValue, TSpec>(((TValue)ValueSize<SimpleType<TValue, TSpec> >::VALUE - 1));
+const SimpleType<TValue, TSpec> MaxValue<SimpleType<TValue, TSpec> >::VALUE = std::numeric_limits<SimpleType<TValue, TSpec>>::max();
 
 template <typename TValue, typename TSpec>
 inline SimpleType<TValue, TSpec> const &
diff --git a/include/seqan/basic/alphabet_storage.h b/include/seqan/basic/alphabet_storage.h
index 53a5df3..da54a45 100644
--- a/include/seqan/basic/alphabet_storage.h
+++ b/include/seqan/basic/alphabet_storage.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/array_construct_destruct.h b/include/seqan/basic/array_construct_destruct.h
index cb83d7a..3cf5aab 100644
--- a/include/seqan/basic/array_construct_destruct.h
+++ b/include/seqan/basic/array_construct_destruct.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -460,9 +460,7 @@ _arrayConstructCopyDefault(TSource1 source_begin,
 {
     while (source_begin != source_end)
     {
-        // NOTE(holtgrew): getValue() is used here since value() could return
-        // a proxy!
-        valueConstruct(target_begin, getValue(source_begin));
+        valueConstruct(target_begin, *source_begin);
         ++source_begin;
         ++target_begin;
     }
diff --git a/include/seqan/basic/basic_aggregate.h b/include/seqan/basic/basic_aggregate.h
index e0998f7..aa23d45 100644
--- a/include/seqan/basic/basic_aggregate.h
+++ b/include/seqan/basic/basic_aggregate.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/basic_allocator.h b/include/seqan/basic/basic_allocator.h
index 1a3f609..05c53d2 100644
--- a/include/seqan/basic/basic_allocator.h
+++ b/include/seqan/basic/basic_allocator.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                             basic_allocator.h
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/basic_alphabet.h b/include/seqan/basic/basic_alphabet.h
index 91da52a..b71360a 100644
--- a/include/seqan/basic/basic_alphabet.h
+++ b/include/seqan/basic/basic_alphabet.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/basic_concept.h b/include/seqan/basic/basic_concept.h
index 5fb0376..e2871c2 100644
--- a/include/seqan/basic/basic_concept.h
+++ b/include/seqan/basic/basic_concept.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/basic_container.h b/include/seqan/basic/basic_container.h
index d8f8bf0..ffea681 100644
--- a/include/seqan/basic/basic_container.h
+++ b/include/seqan/basic/basic_container.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/basic_debug.h b/include/seqan/basic/basic_debug.h
index 3b0aefe..4263268 100644
--- a/include/seqan/basic/basic_debug.h
+++ b/include/seqan/basic/basic_debug.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/basic_exception.h b/include/seqan/basic/basic_exception.h
index 8a5a95a..0166a0b 100644
--- a/include/seqan/basic/basic_exception.h
+++ b/include/seqan/basic/basic_exception.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -369,7 +369,7 @@ inline static void globalExceptionHandler()
 }
 
 // Install global exception handler.
-static const std::terminate_handler SEQAN_UNUSED _globalExceptionHandler = std::set_terminate(globalExceptionHandler);
+static const std::terminate_handler _globalExceptionHandler SEQAN_UNUSED = std::set_terminate(globalExceptionHandler);
 
 #endif  // #if defined(SEQAN_EXCEPTIONS) && defined(SEQAN_GLOBAL_EXCEPTION_HANDLER)
 
diff --git a/include/seqan/basic/basic_functors.h b/include/seqan/basic/basic_functors.h
index 6633709..b26d606 100644
--- a/include/seqan/basic/basic_functors.h
+++ b/include/seqan/basic/basic_functors.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/basic_fundamental.h b/include/seqan/basic/basic_fundamental.h
index b60abdc..5fec637 100644
--- a/include/seqan/basic/basic_fundamental.h
+++ b/include/seqan/basic/basic_fundamental.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/basic_iterator.h b/include/seqan/basic/basic_iterator.h
index 82a1ecc..5adadd6 100644
--- a/include/seqan/basic/basic_iterator.h
+++ b/include/seqan/basic/basic_iterator.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/basic_math.h b/include/seqan/basic/basic_math.h
index a9473b6..9a7e124 100644
--- a/include/seqan/basic/basic_math.h
+++ b/include/seqan/basic/basic_math.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/basic_metaprogramming.h b/include/seqan/basic/basic_metaprogramming.h
index d620dcf..13d04a8 100644
--- a/include/seqan/basic/basic_metaprogramming.h
+++ b/include/seqan/basic/basic_metaprogramming.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/basic_parallelism.h b/include/seqan/basic/basic_parallelism.h
index b96c43a..22b0461 100644
--- a/include/seqan/basic/basic_parallelism.h
+++ b/include/seqan/basic/basic_parallelism.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/basic_proxy.h b/include/seqan/basic/basic_proxy.h
index fe6b711..e5bfb1d 100644
--- a/include/seqan/basic/basic_proxy.h
+++ b/include/seqan/basic/basic_proxy.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/basic_simd_vector.h b/include/seqan/basic/basic_simd_vector.h
deleted file mode 100644
index 40f6e56..0000000
--- a/include/seqan/basic/basic_simd_vector.h
+++ /dev/null
@@ -1,1671 +0,0 @@
-// ==========================================================================
-//                 SeqAn - The Library for Sequence Analysis
-// ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-//     * Redistributions of source code must retain the above copyright
-//       notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above copyright
-//       notice, this list of conditions and the following disclaimer in the
-//       documentation and/or other materials provided with the distribution.
-//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
-//       its contributors may be used to endorse or promote products derived
-//       from this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
-// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
-// DAMAGE.
-//
-// ==========================================================================
-// Author: David Weese <david.weese at fu-berlin.de>
-//         René Rahn <rene.rahn at fu-berlin.de>
-//         Stefan Budach <stefan.budach at fu-berlin.de>
-// ==========================================================================
-// generic SIMD interface for SSE3 / AVX2
-// ==========================================================================
-
-#ifndef SEQAN_INCLUDE_SEQAN_BASIC_SIMD_VECTOR_H_
-#define SEQAN_INCLUDE_SEQAN_BASIC_SIMD_VECTOR_H_
-
-#include <utility>
-#include <tuple>
-
-// Currently only support the following compilers
-#if defined(COMPILER_GCC) || defined(COMPILER_CLANG) || defined(COMPILER_LINTEL)
-    // Define global macro to check if simd instructions are enabled.
-    #define SEQAN_SIMD_ENABLED
-
-    // Define maximal size of vector in byte.
-    #if defined(__AVX2__)
-        #define SEQAN_SIZEOF_MAX_VECTOR 32
-    #elif defined(__SSE4_1__) && defined(__SSE4_2__)
-        #define SEQAN_SSE4
-        #define SEQAN_SIZEOF_MAX_VECTOR 16
-    #else  // defined(__AVX2__)
-        #undef SEQAN_SIMD_ENABLED  // Disable simd if instruction set is not supported.
-    #endif  // defined(__AVX2__)
-#endif  // defined(COMPILER_GCC) || defined(COMPILER_CLANG) || defined(COMPILER_LINTEL)
-
-#ifdef SEQAN_SIMD_ENABLED  // Include header with intrinsics.
-    #include <x86intrin.h>
-#endif  // SEQAN_SIMD_ENABLED
-
-namespace seqan {
-
-#ifdef COMPILER_LINTEL
-#include <type_traits>
-#define SEQAN_VECTOR_CAST_(T, v) static_cast<typename std::decay<T>::type>(v)
-#define SEQAN_VECTOR_CAST_LVALUE_(T, v) static_cast<T>(v)
-#else
-#define SEQAN_VECTOR_CAST_(T, v) reinterpret_cast<T>(v)
-#define SEQAN_VECTOR_CAST_LVALUE_(T, v) reinterpret_cast<T>(v)
-#endif
-
-// ============================================================================
-// Forwards
-// ============================================================================
-
-// ============================================================================
-// Useful Macros
-// ============================================================================
-
-#define SEQAN_DEFINE_SIMD_VECTOR_GETVALUE_(TSimdVector)                                                 \
-template <typename TPosition>                                                                           \
-inline typename Value<TSimdVector>::Type                                                                \
-getValue(TSimdVector &vector, TPosition pos)                                                            \
-{                                                                                                       \
-/*                                                                                                      \
-    typedef typename Value<TSimdVector>::Type TValue;                                                   \
-    TValue val = (SEQAN_VECTOR_CAST_(TValue*, &vector))[pos];                                           \
-    return val;                                                                                         \
-*/                                                                                                      \
-    return vector[pos];                                                                                 \
-}
-
-#define SEQAN_DEFINE_SIMD_VECTOR_VALUE_(TSimdVector)                                                    \
-template <typename TPosition>                                                                           \
-inline typename Value<TSimdVector>::Type                                                                \
-value(TSimdVector &vector, TPosition pos)                                                               \
-{                                                                                                       \
-    return getValue(vector, pos);                                                                       \
-}
-
-#define SEQAN_DEFINE_SIMD_VECTOR_ASSIGNVALUE_(TSimdVector)                                              \
-template <typename TPosition, typename TValue2>                                                         \
-inline void                                                                                             \
-assignValue(TSimdVector &vector, TPosition pos, TValue2 value)                                          \
-{                                                                                                       \
-/*                                                                                                      \
-    typedef typename Value<TSimdVector>::Type TValue;                                                   \
-    (SEQAN_VECTOR_CAST_(TValue*, &vector))[pos] = value;                                                \
-*/                                                                                                      \
-    vector[pos] = value;                                                                                \
-}
-
-// define a concept and its models
-// they allow us to define generic vector functions
-SEQAN_CONCEPT(SimdVectorConcept, (T)) {};
-
-// Only include following code if simd instructions are enabled.
-#ifdef SEQAN_SIMD_ENABLED
-
-// ============================================================================
-// Tags, Classes, Enums
-// ============================================================================
-
-// a metafunction returning the biggest supported SIMD vector
-template <typename TValue, int LENGTH = SEQAN_SIZEOF_MAX_VECTOR / sizeof(TValue)>
-struct SimdVector;
-
-// internal struct to specialize for vector parameters
-// VEC_SIZE = Vector size := sizeof(vec)
-// LENGTH = number of elements := VEC_SIZE / sizeof(InnerValue<TVec>::Type)
-template <int VEC_SIZE, int LENGTH = 0>
-struct SimdParams_ {};
-
-template <int SCALE>
-struct ScaleParam_
-{};
-
-// internal struct to specialize for matrix parameters
-template <int ROWS, int COLS, int BITS_PER_VALUE>
-struct SimdMatrixParams_ {};
-
-#define SEQAN_DEFINE_SIMD_VECTOR_(TSimdVector, TValue, SIZEOF_VECTOR)                                           \
-        typedef TValue TSimdVector __attribute__ ((__vector_size__(SIZEOF_VECTOR)));                            \
-        template <> struct SimdVector<TValue, SIZEOF_VECTOR / sizeof(TValue)> {  typedef TSimdVector Type; };   \
-        template <> struct Value<TSimdVector>           { typedef TValue Type; };                               \
-        template <> struct Value<TSimdVector const>:  public Value<TSimdVector> {};                             \
-        template <> struct LENGTH<TSimdVector>          { enum { VALUE = SIZEOF_VECTOR / sizeof(TValue) }; };   \
-        template <> struct LENGTH<TSimdVector const>: public LENGTH<TSimdVector> {};                            \
-        SEQAN_DEFINE_SIMD_VECTOR_GETVALUE_(TSimdVector)                                                         \
-        SEQAN_DEFINE_SIMD_VECTOR_GETVALUE_(TSimdVector const)                                                   \
-        SEQAN_DEFINE_SIMD_VECTOR_VALUE_(TSimdVector)                                                            \
-        SEQAN_DEFINE_SIMD_VECTOR_VALUE_(TSimdVector const)                                                      \
-        SEQAN_DEFINE_SIMD_VECTOR_ASSIGNVALUE_(TSimdVector)                                                      \
-        template <>                                                                                             \
-        SEQAN_CONCEPT_IMPL((TSimdVector),       (SimdVectorConcept));                                           \
-        template <>                                                                                             \
-        SEQAN_CONCEPT_IMPL((TSimdVector const), (SimdVectorConcept));
-
-#ifdef __AVX2__
-SEQAN_DEFINE_SIMD_VECTOR_(SimdVector32Char,     char,           32)
-SEQAN_DEFINE_SIMD_VECTOR_(SimdVector32SChar,    signed char,    32)
-SEQAN_DEFINE_SIMD_VECTOR_(SimdVector32UChar,    unsigned char,  32)
-SEQAN_DEFINE_SIMD_VECTOR_(SimdVector16Short,    short,          32)
-SEQAN_DEFINE_SIMD_VECTOR_(SimdVector16UShort,   unsigned short, 32)
-SEQAN_DEFINE_SIMD_VECTOR_(SimdVector8Int,       int,            32)
-SEQAN_DEFINE_SIMD_VECTOR_(SimdVector8UInt,      unsigned int,   32)
-SEQAN_DEFINE_SIMD_VECTOR_(SimdVector4Int64,     int64_t,        32)
-SEQAN_DEFINE_SIMD_VECTOR_(SimdVector4UInt64,    uint64_t,       32)
-SEQAN_DEFINE_SIMD_VECTOR_(SimdVector8Float,     float,          32)
-SEQAN_DEFINE_SIMD_VECTOR_(SimdVector4Double,    double,         32)
-#endif  // __AVX2__
-
-#ifdef SEQAN_SSE4
-SEQAN_DEFINE_SIMD_VECTOR_(SimdVector8Char,      char,           8)
-SEQAN_DEFINE_SIMD_VECTOR_(SimdVector8SChar,     signed char,    8)
-SEQAN_DEFINE_SIMD_VECTOR_(SimdVector8UChar,     unsigned char,  8)
-SEQAN_DEFINE_SIMD_VECTOR_(SimdVector4Short,     short,          8)
-SEQAN_DEFINE_SIMD_VECTOR_(SimdVector4UShort,    unsigned short, 8)
-SEQAN_DEFINE_SIMD_VECTOR_(SimdVector2Int,       int,            8)
-SEQAN_DEFINE_SIMD_VECTOR_(SimdVector2UInt,      unsigned int,   8)
-SEQAN_DEFINE_SIMD_VECTOR_(SimdVector2Float,     float,          8)
-
-SEQAN_DEFINE_SIMD_VECTOR_(SimdVector16Char,     char,           16)
-SEQAN_DEFINE_SIMD_VECTOR_(SimdVector16SChar,    signed char,    16)
-SEQAN_DEFINE_SIMD_VECTOR_(SimdVector16UChar,    unsigned char,  16)
-SEQAN_DEFINE_SIMD_VECTOR_(SimdVector8Short,     short,          16)
-SEQAN_DEFINE_SIMD_VECTOR_(SimdVector8UShort,    unsigned short, 16)
-SEQAN_DEFINE_SIMD_VECTOR_(SimdVector4Int,       int,            16)
-SEQAN_DEFINE_SIMD_VECTOR_(SimdVector4UInt,      unsigned int,   16)
-SEQAN_DEFINE_SIMD_VECTOR_(SimdVector2Int64,     int64_t,        16)
-SEQAN_DEFINE_SIMD_VECTOR_(SimdVector2UInt64,    uint64_t,       16)
-SEQAN_DEFINE_SIMD_VECTOR_(SimdVector4Float,     float,          16)
-SEQAN_DEFINE_SIMD_VECTOR_(SimdVector2Double,    double,         16)
-#endif  // SEQAN_SSE4
-
-// ============================================================================
-// Functions
-// ============================================================================
-
-// ============================================================================
-// AVX/AVX2 wrappers (256bit vectors)
-// ============================================================================
-
-#ifdef __AVX2__
-
-// --------------------------------------------------------------------------
-// _fillVector (256bit)
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector, typename ...TValue>
-inline void _fillVector(TSimdVector &vector, std::tuple<TValue...> const & x, std::index_sequence<0> const &, SimdParams_<32, 32>) { SEQAN_VECTOR_CAST_LVALUE_(__m256i&, vector) = _mm256_set1_epi8(std::get<0>(x)); }
-template <typename TSimdVector, typename ...TValue>
-inline void _fillVector(TSimdVector &vector, std::tuple<TValue...> const & x, std::index_sequence<0> const &, SimdParams_<32, 16>) { SEQAN_VECTOR_CAST_LVALUE_(__m256i&, vector) = _mm256_set1_epi16(std::get<0>(x)); }
-template <typename TSimdVector, typename ...TValue>
-inline void _fillVector(TSimdVector &vector, std::tuple<TValue...> const & x, std::index_sequence<0> const &, SimdParams_<32, 8>)  { SEQAN_VECTOR_CAST_LVALUE_(__m256i&, vector) = _mm256_set1_epi32(std::get<0>(x)); }
-template <typename TSimdVector, typename ...TValue>
-inline void _fillVector(TSimdVector &vector, std::tuple<TValue...> const & x, std::index_sequence<0> const &, SimdParams_<32, 4>)  { SEQAN_VECTOR_CAST_LVALUE_(__m256i&, vector) = _mm256_set1_epi64x(std::get<0>(x)); }
-template <typename TSimdVector>
-    inline void _fillVector(TSimdVector &vector, std::tuple<float> const & x,  std::index_sequence<0> const &, SimdParams_<32, 8>)  { SEQAN_VECTOR_CAST_LVALUE_(__m256i&, vector) = _mm256_set1_ps(std::get<0>(x)); }
-template <typename TSimdVector>
-inline void _fillVector(TSimdVector &vector, std::tuple<double> const & x, std::index_sequence<0> const &, SimdParams_<32, 4>)  { SEQAN_VECTOR_CAST_LVALUE_(__m256i&, vector) = _mm256_set1_pd(std::get<0>(x)); }
-
-template <typename TSimdVector, typename ...TValue, size_t ...INDICES>
-inline void _fillVector(TSimdVector &vector, std::tuple<TValue...> const & values, std::index_sequence<INDICES...> const &, SimdParams_<32, 32>)
-{
-    SEQAN_VECTOR_CAST_LVALUE_(__m256i&, vector) = _mm256_set_epi8(std::get<INDICES>(values)...);
-}
-
-template <typename TSimdVector, typename ...TValue, size_t ...INDICES>
-inline void _fillVector(TSimdVector &vector, std::tuple<TValue...> const & values, std::index_sequence<INDICES...> const &, SimdParams_<32, 16>)
-{
-    SEQAN_VECTOR_CAST_LVALUE_(__m256i&, vector) = _mm256_set_epi16(std::get<INDICES>(values)...);
-}
-template <typename TSimdVector, typename ...TValue, size_t ...INDICES>
-inline void _fillVector(TSimdVector &vector, std::tuple<TValue...> const & values, std::index_sequence<INDICES...> const &, SimdParams_<32, 8>)
-{
-    SEQAN_VECTOR_CAST_LVALUE_(__m256i&, vector) = _mm256_set_epi32(std::get<INDICES>(values)...);
-}
-
-template <typename TSimdVector, typename ...TValue, size_t ...INDICES>
-inline void _fillVector(TSimdVector &vector, std::tuple<TValue...> const & values, std::index_sequence<INDICES...> const &, SimdParams_<32, 4>)
-{
-    SEQAN_VECTOR_CAST_LVALUE_(__m256i&, vector) = _mm256_set_epi64x(std::get<INDICES>(values)...);
-}
-
-// --------------------------------------------------------------------------
-// _clearVector (256bit)
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector, int L>
-inline void _clearVector(TSimdVector &vector, SimdParams_<32, L>) { SEQAN_VECTOR_CAST_LVALUE_(__m256i&, vector) = _mm256_setzero_si256(); }
-template <typename TSimdVector>
-inline void _clearVector(TSimdVector &vector, SimdParams_<32, 8>) { SEQAN_VECTOR_CAST_LVALUE_(__m256&, vector) = _mm256_setzero_ps(); }
-template <typename TSimdVector>
-inline void _clearVector(TSimdVector &vector, SimdParams_<32, 4>) { SEQAN_VECTOR_CAST_LVALUE_(__m256d&, vector) = _mm256_setzero_pd(); }
-
-// --------------------------------------------------------------------------
-// _createVector (256bit)
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector, typename TValue>
-inline TSimdVector _createVector(TValue x, SimdParams_<32, 32>) { return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_set1_epi8(x)); }
-template <typename TSimdVector, typename TValue>
-inline TSimdVector _createVector(TValue x, SimdParams_<32, 16>) { return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_set1_epi16(x)); }
-template <typename TSimdVector, typename TValue>
-inline TSimdVector _createVector(TValue x, SimdParams_<32, 8>)  { return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_set1_epi32(x)); }
-template <typename TSimdVector, typename TValue>
-inline TSimdVector _createVector(TValue x, SimdParams_< 32, 4>)  { return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_set1_epi64x(x)); }
-template <typename TSimdVector>
-inline TSimdVector _createVector(float x,  SimdParams_<32, 8>)  { return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_set1_ps(x)); }
-template <typename TSimdVector>
-inline TSimdVector _createVector(double x, SimdParams_<32, 4>)  { return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_set1_pd(x)); }
-
-// --------------------------------------------------------------------------
-// _cmpEq (256bit)
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector>
-inline TSimdVector _cmpEq(TSimdVector &a, TSimdVector &b, SimdParams_<32, 32>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_cmpeq_epi8(SEQAN_VECTOR_CAST_(const __m256i&, a),
-                                                             SEQAN_VECTOR_CAST_(const __m256i&, b)));
-}
-
-template <typename TSimdVector>
-inline TSimdVector _cmpEq(TSimdVector &a, TSimdVector &b, SimdParams_<32, 16>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_cmpeq_epi16(SEQAN_VECTOR_CAST_(const __m256i&, a),
-                                                              SEQAN_VECTOR_CAST_(const __m256i&, b)));
-}
-
-template <typename TSimdVector>
-inline TSimdVector _cmpEq(TSimdVector &a, TSimdVector &b, SimdParams_<32, 8>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_cmpeq_epi32(SEQAN_VECTOR_CAST_(const __m256i&, a),
-                                                              SEQAN_VECTOR_CAST_(const __m256i&, b)));
-}
-
-template <typename TSimdVector>
-inline TSimdVector _cmpEq(TSimdVector &a, TSimdVector &b, SimdParams_<32, 4>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_cmpeq_epi64(SEQAN_VECTOR_CAST_(const __m256i&, a),
-                                                              SEQAN_VECTOR_CAST_(const __m256i&, b)));
-}
-
-// --------------------------------------------------------------------------
-// _cmpGt (256bit)
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector>
-inline TSimdVector _cmpGt(TSimdVector &a, TSimdVector &b, SimdParams_<32, 32>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_cmpgt_epi8(SEQAN_VECTOR_CAST_(const __m256i&, a),
-                                                             SEQAN_VECTOR_CAST_(const __m256i&, b)));
-}
-
-template <typename TSimdVector>
-inline TSimdVector _cmpGt(TSimdVector &a, TSimdVector &b, SimdParams_<32, 16>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_cmpgt_epi16(SEQAN_VECTOR_CAST_(const __m256i&, a),
-                                                              SEQAN_VECTOR_CAST_(const __m256i&, b)));
-}
-
-template <typename TSimdVector>
-inline TSimdVector _cmpGt(TSimdVector &a, TSimdVector &b, SimdParams_<32, 8>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_cmpgt_epi32(SEQAN_VECTOR_CAST_(const __m256i&, a),
-                                                              SEQAN_VECTOR_CAST_(const __m256i&, b)));
-}
-
-template <typename TSimdVector>
-inline TSimdVector _cmpGt(TSimdVector &a, TSimdVector &b, SimdParams_<32, 4>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_cmpgt_epi64(SEQAN_VECTOR_CAST_(const __m256i&, a),
-                                                              SEQAN_VECTOR_CAST_(const __m256i&, b)));
-}
-
-// --------------------------------------------------------------------------
-// _bitwiseOr (256bit)
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector, int L>
-inline TSimdVector _bitwiseOr(TSimdVector &a, TSimdVector &b, SimdParams_<32, L>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_or_si256(SEQAN_VECTOR_CAST_(const __m256i&, a),
-                                                           SEQAN_VECTOR_CAST_(const __m256i&, b)));
-}
-
-// --------------------------------------------------------------------------
-// _bitwiseAnd (256bit)
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector, int L>
-inline TSimdVector _bitwiseAnd(TSimdVector &a, TSimdVector &b, SimdParams_<32, L>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_and_si256(SEQAN_VECTOR_CAST_(const __m256i&, a),
-                                                            SEQAN_VECTOR_CAST_(const __m256i&, b)));
-}
-
-template <typename TSimdVector>
-inline TSimdVector _bitwiseAnd(TSimdVector &a, TSimdVector &b, SimdParams_<32, 8>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_and_ps(SEQAN_VECTOR_CAST_(const __m256&, a),
-                                                         SEQAN_VECTOR_CAST_(const __m256&, b)));
-}
-
-template <typename TSimdVector>
-inline TSimdVector _bitwiseAnd(TSimdVector &a, TSimdVector &b, SimdParams_<32, 4>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_and_pd(SEQAN_VECTOR_CAST_(const __m256d&, a),
-                                                         SEQAN_VECTOR_CAST_(const __m256d&, b)));
-}
-
-// --------------------------------------------------------------------------
-// _bitwiseAndNot (256bit)
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector, int L>
-inline TSimdVector _bitwiseAndNot(TSimdVector &a, TSimdVector &b, SimdParams_<32, L>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_andnot_si256(SEQAN_VECTOR_CAST_(const __m256i&, a),
-                                                               SEQAN_VECTOR_CAST_(const __m256i&, b)));
-}
-
-// --------------------------------------------------------------------------
-// _bitwiseNot (256bit)
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector>
-inline TSimdVector _bitwiseNot(TSimdVector &a, SimdParams_<32, 32>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm256_cmpeq_epi8(SEQAN_VECTOR_CAST_(const __m256i&, a), _mm256_setzero_si256()));
-}
-
-template <typename TSimdVector>
-inline TSimdVector _bitwiseNot(TSimdVector &a, SimdParams_<32, 16>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm256_cmpeq_epi16(SEQAN_VECTOR_CAST_(const __m256i&, a), _mm256_setzero_si256()));
-}
-
-template <typename TSimdVector>
-inline TSimdVector _bitwiseNot(TSimdVector &a, SimdParams_<32, 8>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm256_cmpeq_epi32(SEQAN_VECTOR_CAST_(const __m256i&, a), _mm256_setzero_si256()));
-
-}
-template <typename TSimdVector>
-inline TSimdVector _bitwiseNot(TSimdVector &a, SimdParams_<32, 4>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm256_cmpeq_epi64(SEQAN_VECTOR_CAST_(const __m256i&, a), _mm256_setzero_si256()));
-}
-
-// --------------------------------------------------------------------------
-// _divide (256bit)
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector>
-inline TSimdVector _divide(TSimdVector &a, int b, SimdParams_<32, 32>) { return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_div_epi8(a, _mm256_set1_epi8(b))); }
-
-template <typename TSimdVector>
-inline TSimdVector _divide(TSimdVector &a, int b, SimdParams_<32, 16>) { return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_div_epi16(a, _mm256_set1_epi16(b))); }
-
-template <typename TSimdVector>
-inline TSimdVector _divide(TSimdVector &a, int b, SimdParams_<32, 8>) { return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_div_epi32(a, _mm256_set1_epi32(b))); }
-
-template <typename TSimdVector>
-inline TSimdVector _divide(TSimdVector &a, int b, SimdParams_<32, 4>) { return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_div_epi64(a, _mm256_set1_epi64x(b))); }
-
-// --------------------------------------------------------------------------
-// _add (256bit)
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector>
-inline TSimdVector _add(TSimdVector &a, TSimdVector &b, SimdParams_<32, 32>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm256_add_epi8(SEQAN_VECTOR_CAST_(const __m256i&, a),
-                                              SEQAN_VECTOR_CAST_(const __m256i&, b)));
-}
-
-template <typename TSimdVector>
-inline TSimdVector _add(TSimdVector &a, TSimdVector &b, SimdParams_<32, 16>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm256_add_epi16(SEQAN_VECTOR_CAST_(const __m256i&, a),
-                                               SEQAN_VECTOR_CAST_(const __m256i&, b)));
-}
-
-template <typename TSimdVector>
-inline TSimdVector _add(TSimdVector &a, TSimdVector &b, SimdParams_<32, 8>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm256_add_epi32(SEQAN_VECTOR_CAST_(const __m256i&, a),
-                                               SEQAN_VECTOR_CAST_(const __m256i&, b)));
-}
-
-template <typename TSimdVector>
-inline TSimdVector _add(TSimdVector &a, TSimdVector &b, SimdParams_<32, 4>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm256_add_epi64(SEQAN_VECTOR_CAST_(const __m256i&, a),
-                                               SEQAN_VECTOR_CAST_(const __m256i&, b)));
-}
-
-// --------------------------------------------------------------------------
-// _sub (256bit)
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector>
-inline TSimdVector _sub(TSimdVector &a, TSimdVector &b, SimdParams_<32, 32>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm256_sub_epi8(SEQAN_VECTOR_CAST_(const __m256i&, a),
-                                              SEQAN_VECTOR_CAST_(const __m256i&, b)));
-}
-
-template <typename TSimdVector>
-inline TSimdVector _sub(TSimdVector &a, TSimdVector &b, SimdParams_<32, 16>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm256_sub_epi16(SEQAN_VECTOR_CAST_(const __m256i&, a),
-                                               SEQAN_VECTOR_CAST_(const __m256i&, b)));
-}
-
-template <typename TSimdVector>
-inline TSimdVector _sub(TSimdVector &a, TSimdVector &b, SimdParams_<32, 8>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm256_sub_epi32(SEQAN_VECTOR_CAST_(const __m256i&, a),
-                                               SEQAN_VECTOR_CAST_(const __m256i&, b)));
-}
-
-template <typename TSimdVector>
-inline TSimdVector _sub(TSimdVector &a, TSimdVector &b, SimdParams_<32, 4>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm256_sub_epi64(SEQAN_VECTOR_CAST_(const __m256i&, a),
-                                               SEQAN_VECTOR_CAST_(const __m256i&, b)));
-}
-
-// --------------------------------------------------------------------------
-// _mult (256bit)
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector>
-inline TSimdVector _mult(TSimdVector &a, TSimdVector &b, SimdParams_<32, 32>)
-{
-    SEQAN_ASSERT_FAIL("AVX2 intrinsics for multiplying 8 bit values not implemented!");
-    return a;
-}
-
-template <typename TSimdVector>
-inline TSimdVector _mult(TSimdVector &a, TSimdVector &b, SimdParams_<32, 16>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm256_mullo_epi16(SEQAN_VECTOR_CAST_(const __m256i&, a),
-                                                 SEQAN_VECTOR_CAST_(const __m256i&, b)));
-}
-
-template <typename TSimdVector>
-inline TSimdVector _mult(TSimdVector &a, TSimdVector &b, SimdParams_<32, 8>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm256_mullo_epi32(SEQAN_VECTOR_CAST_(const __m256i&, a),
-                                                 SEQAN_VECTOR_CAST_(const __m256i&, b)));
-}
-
-template <typename TSimdVector>
-inline TSimdVector _mult(TSimdVector &a, TSimdVector &b, SimdParams_<32, 4>)
-{
-    SEQAN_ASSERT_FAIL("AVX2 intrinsics for multiplying 64 bit values not implemented!");
-    return a;
-}
-
-// --------------------------------------------------------------------------
-// _max (256bit)
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector>
-inline TSimdVector _max(TSimdVector &a, TSimdVector &b, SimdParams_<32, 32>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm256_max_epi8(SEQAN_VECTOR_CAST_(const __m256i&, a),
-                                              SEQAN_VECTOR_CAST_(const __m256i&, b)));
-}
-
-template <typename TSimdVector>
-inline TSimdVector _max(TSimdVector &a, TSimdVector &b, SimdParams_<32, 16>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm256_max_epi16(SEQAN_VECTOR_CAST_(const __m256i&, a),
-                                               SEQAN_VECTOR_CAST_(const __m256i&, b)));
-}
-
-template <typename TSimdVector>
-inline TSimdVector _max(TSimdVector &a, TSimdVector &b, SimdParams_<32, 8>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm256_max_epi32(SEQAN_VECTOR_CAST_(const __m256i&, a),
-                                               SEQAN_VECTOR_CAST_(const __m256i&, b)));
-}
-
-template <typename TSimdVector>
-inline TSimdVector _max(TSimdVector &a, TSimdVector &b, SimdParams_<32, 4>)
-{
-    SEQAN_ASSERT_FAIL("AVX2 intrinsics for max on 64 bit values not implemented!");
-    return a;
-}
-
-// --------------------------------------------------------------------------
-// _blend (256bit)
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector, typename TSimdVectorMask, int L>
-inline TSimdVector _blend(TSimdVector const &a, TSimdVector const &b, TSimdVectorMask const &mask, SimdParams_<32, L>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm256_blendv_epi8(SEQAN_VECTOR_CAST_(const __m256i &, a),
-                                                 SEQAN_VECTOR_CAST_(const __m256i &, b),
-                                                 SEQAN_VECTOR_CAST_(const __m256i &, mask)));
-}
-
-// --------------------------------------------------------------------------
-// _storeu (256bit)
-// --------------------------------------------------------------------------
-
-template <typename T, typename TSimdVector, int L>
-inline void _storeu(T * memAddr, TSimdVector &vec, SimdParams_<32, L>)
-{
-    _mm256_storeu_si256((__m256i*)memAddr, SEQAN_VECTOR_CAST_(const __m256i&, vec));
-}
-
-// ----------------------------------------------------------------------------
-// Function _load() 256bit
-// ----------------------------------------------------------------------------
-
-template <typename TSimdVector, typename T, int L>
-inline TSimdVector _load(T const * memAddr, SimdParams_<32, L>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_load_si256((__m256i const *) memAddr));
-}
-
-// --------------------------------------------------------------------------
-// _shuffleVector (256bit)
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector1, typename TSimdVector2>
-inline TSimdVector1
-_shuffleVector(TSimdVector1 const &vector, TSimdVector2 const &indices, SimdParams_<32, 32>, SimdParams_<32, 32>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector1, _mm256_shuffle_epi8(SEQAN_VECTOR_CAST_(const __m256i &, vector),
-                                                                SEQAN_VECTOR_CAST_(const __m256i &, indices)));
-}
-template <typename TSimdVector1, typename TSimdVector2>
-inline TSimdVector1
-_shuffleVector(TSimdVector1 const &vector, TSimdVector2 const &indices, SimdParams_<32, 16>, SimdParams_<16, 16>)
-{
-    // copy 2nd 64bit word to 3rd, compute 2*idx
-    __m256i idx = _mm256_slli_epi16(_mm256_permute4x64_epi64(_mm256_castsi128_si256(SEQAN_VECTOR_CAST_(const __m128i &, indices)), 0x50), 1);
-
-    // interleave with 2*idx+1 and call shuffle
-    return SEQAN_VECTOR_CAST_(TSimdVector1, _mm256_shuffle_epi8(SEQAN_VECTOR_CAST_(const __m256i &, vector),
-                                                                _mm256_unpacklo_epi8(idx, _mm256_add_epi8(idx, _mm256_set1_epi8(1)))));
-}
-
-// --------------------------------------------------------------------------
-// _shiftRightLogical (256bit)
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector>
-inline TSimdVector _shiftRightLogical(TSimdVector const &vector, const int imm, SimdParams_<32, 32>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_srli_epi16(SEQAN_VECTOR_CAST_(const __m256i &, vector), imm) & _mm256_set1_epi8(0xff >> imm));
-}
-template <typename TSimdVector>
-inline TSimdVector _shiftRightLogical(TSimdVector const &vector, const int imm, SimdParams_<32, 16>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_srli_epi16(SEQAN_VECTOR_CAST_(const __m256i &, vector), imm));
-}
-template <typename TSimdVector>
-inline TSimdVector _shiftRightLogical(TSimdVector const &vector, const int imm, SimdParams_<32, 8>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_srli_epi32(SEQAN_VECTOR_CAST_(const __m256i &, vector), imm));
-}
-template <typename TSimdVector>
-inline TSimdVector _shiftRightLogical(TSimdVector const &vector, const int imm, SimdParams_<32, 4>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_srli_epi64(SEQAN_VECTOR_CAST_(const __m256i &, vector), imm));
-}
-
-// --------------------------------------------------------------------------
-// _gather (256bit)
-// --------------------------------------------------------------------------
-
-template <typename TValue, typename TSimdVector, typename TSize, TSize SCALE>
-inline TSimdVector _gather(TValue const * memAddr,
-                           TSimdVector const & idx,
-                           std::integral_constant<TSize, SCALE> const & /*scale*/,
-                           SimdParams_<32, 16>)
-{
-    // 1. Unpack low idx values and interleave with 0 and gather from memAddr.
-    // 2. Unpack high idx values and interleave with 0, than gather from memAddr.
-    // 3. Merge 2 8x32 vectors into 1x16 vector by signed saturation. This operation reverts the interleave by the unpack operations above.
-    return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_packs_epi32(_mm256_i32gather_epi32(static_cast<int32_t const *>(memAddr), _mm256_unpacklo_epi16(SEQAN_VECTOR_CAST_(__m256i const &, idx), _mm256_set1_epi16(0)), SCALE),
-                                                              _mm256_i32gather_epi32(static_cast<int32_t const *>(memAddr), _mm256_unpackhi_epi16(SEQAN_VECTOR_CAST_(__m256i const &, idx), _mm256_set1_epi16(0)), SCALE)));
-}
-
-// --------------------------------------------------------------------------
-// _transposeMatrix (256bit)
-// --------------------------------------------------------------------------
-
-// emulate missing _mm256_unpacklo_epi128/_mm256_unpackhi_epi128 instructions
-inline __m256i _mm256_unpacklo_epi128(__m256i const &a, __m256i const &b)
-{
-    return _mm256_permute2x128_si256(a, b, 0x20);
-//    return _mm256_inserti128_si256(a, _mm256_extracti128_si256(b, 0), 1);
-}
-
-inline __m256i _mm256_unpackhi_epi128(__m256i const &a, __m256i const &b)
-{
-    return _mm256_permute2x128_si256(a, b, 0x31);
-//    return _mm256_inserti128_si256(b, _mm256_extracti128_si256(a, 1), 0);
-}
-
-template <typename TSimdVector>
-inline void
-_transposeMatrix(TSimdVector matrix[], SimdMatrixParams_<32, 32, 8>)
-{
-    // we need a look-up table to reverse the lowest 4 bits
-    // in order to place the permute the transposed rows
-    static const unsigned char bitRev[] = { 0, 8, 4,12, 2,10, 6,14, 1, 9, 5,13, 3,11, 7,15,
-                                           16,24,20,28,18,26,22,30,17,25,21,29,19,27,23,31};
-
-    // transpose a 32x32 byte matrix
-    __m256i tmp1[32];
-    for (int i = 0; i < 16; ++i)
-    {
-        tmp1[i]    = _mm256_unpacklo_epi8(SEQAN_VECTOR_CAST_(const __m256i &, matrix[2*i]), SEQAN_VECTOR_CAST_(const __m256i &, matrix[2*i+1]));
-        tmp1[i+16] = _mm256_unpackhi_epi8(SEQAN_VECTOR_CAST_(const __m256i &, matrix[2*i]), SEQAN_VECTOR_CAST_(const __m256i &, matrix[2*i+1]));
-    }
-    __m256i  tmp2[32];
-    for (int i = 0; i < 16; ++i)
-    {
-        tmp2[i]    = _mm256_unpacklo_epi16(tmp1[2*i], tmp1[2*i+1]);
-        tmp2[i+16] = _mm256_unpackhi_epi16(tmp1[2*i], tmp1[2*i+1]);
-    }
-    for (int i = 0; i < 16; ++i)
-    {
-        tmp1[i]    = _mm256_unpacklo_epi32(tmp2[2*i], tmp2[2*i+1]);
-        tmp1[i+16] = _mm256_unpackhi_epi32(tmp2[2*i], tmp2[2*i+1]);
-    }
-    for (int i = 0; i < 16; ++i)
-    {
-        tmp2[i]    = _mm256_unpacklo_epi64(tmp1[2*i], tmp1[2*i+1]);
-        tmp2[i+16] = _mm256_unpackhi_epi64(tmp1[2*i], tmp1[2*i+1]);
-    }
-    for (int i = 0; i < 16; ++i)
-    {
-        matrix[bitRev[i]]    = SEQAN_VECTOR_CAST_(TSimdVector, _mm256_unpacklo_epi128(tmp2[2*i],tmp2[2*i+1]));
-        matrix[bitRev[i+16]] = SEQAN_VECTOR_CAST_(TSimdVector, _mm256_unpackhi_epi128(tmp2[2*i],tmp2[2*i+1]));
-    }
-}
-
-// --------------------------------------------------------------------------
-// Function _testAllZeros (256bit)
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector>
-SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, int)
-inline _testAllZeros(TSimdVector const &vector, TSimdVector const &mask, SimdParams_<32>)
-{
-    return _mm256_testz_si256(SEQAN_VECTOR_CAST_(const __m256i &, vector),
-                              SEQAN_VECTOR_CAST_(const __m256i &, mask));
-}
-
-// --------------------------------------------------------------------------
-// Function _testAllOnes (256bit)
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector>
-inline int _testAllOnes(TSimdVector const &vector, SimdParams_<32>)
-{
-    __m256i vec = SEQAN_VECTOR_CAST_(const __m256i &, vector);
-    return _mm256_testc_si256(vec, _mm256_cmpeq_epi32(vec, vec));
-}
-
-#endif  // #ifdef __AVX2__
-
-// ============================================================================
-// SSE3 wrappers (128bit vectors)
-// ============================================================================
-
-#ifdef SEQAN_SSE4
-
-// --------------------------------------------------------------------------
-// _fillVector (128bit)
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector, typename... TValue>
-inline void _fillVector(TSimdVector &vector, std::tuple<TValue...> const & x, std::index_sequence<0> const &, SimdParams_<16, 16>) { SEQAN_VECTOR_CAST_LVALUE_(__m128i&, vector) = _mm_set1_epi8(std::get<0>(x)); }
-template <typename TSimdVector, typename... TValue>
-inline void _fillVector(TSimdVector &vector, std::tuple<TValue...> const & x, std::index_sequence<0> const &, SimdParams_<16, 8>)  { SEQAN_VECTOR_CAST_LVALUE_(__m128i&, vector) = _mm_set1_epi16(std::get<0>(x)); }
-template <typename TSimdVector, typename... TValue>
-inline void _fillVector(TSimdVector &vector, std::tuple<TValue...> const & x, std::index_sequence<0> const &, SimdParams_<16, 4>)  { SEQAN_VECTOR_CAST_LVALUE_(__m128i&, vector) = _mm_set1_epi32(std::get<0>(x)); }
-template <typename TSimdVector, typename... TValue>
-inline void _fillVector(TSimdVector &vector, std::tuple<TValue...> const & x, std::index_sequence<0> const &, SimdParams_<16, 2>)  { SEQAN_VECTOR_CAST_LVALUE_(__m128i&, vector) = _mm_set1_epi64x(std::get<0>(x)); }
-template <typename TSimdVector>
-inline void _fillVector(TSimdVector &vector, std::tuple<float> const & x,  std::index_sequence<0> const &, SimdParams_<16, 4>)   { SEQAN_VECTOR_CAST_LVALUE_(__m128i&, vector) = _mm_set1_ps(std::get<0>(x)); }
-template <typename TSimdVector>
-inline void _fillVector(TSimdVector &vector, std::tuple<double> const & x, std::index_sequence<0> const &, SimdParams_<16, 2>)  { SEQAN_VECTOR_CAST_LVALUE_(__m128i&, vector) = _mm_set1_pd(std::get<0>(x)); }
-
-template <typename TSimdVector, typename ...TValue, size_t ...INDICES>
-inline void _fillVector(TSimdVector &vector, std::tuple<TValue...> const & args, std::index_sequence<INDICES...> const &, SimdParams_<16, 16>)
-{
-    SEQAN_VECTOR_CAST_LVALUE_(__m128i&, vector) = _mm_set_epi8(std::get<INDICES>(args)...);
-}
-
-template <typename TSimdVector, typename ...TValue, size_t ...INDICES>
-inline void _fillVector(TSimdVector &vector, std::tuple<TValue...> const & args, std::index_sequence<INDICES...> const &, SimdParams_<16, 8>)
-{
-    SEQAN_VECTOR_CAST_LVALUE_(__m128i&, vector) = _mm_set_epi16(std::get<INDICES>(args)...);
-}
-
-template <typename TSimdVector, typename ...TValue, size_t ...INDICES>
-inline void _fillVector(TSimdVector &vector, std::tuple<TValue...> const & args, std::index_sequence<INDICES...> const &, SimdParams_<16, 4>)
-{
-    SEQAN_VECTOR_CAST_LVALUE_(__m128i&, vector) = _mm_set_epi32(std::get<INDICES>(args)...);
-}
-
-template <typename TSimdVector, typename ...TValue, size_t ...INDICES>
-inline void _fillVector(TSimdVector &vector, std::tuple<TValue...> const & args, std::index_sequence<INDICES...> const &, SimdParams_<16, 2>)
-{
-    SEQAN_VECTOR_CAST_LVALUE_(__m128i&, vector) = _mm_set_epi64x(std::get<INDICES>(args)...);
-}
-
-// --------------------------------------------------------------------------
-// _clearVector (128bit)
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector, int L>
-inline void _clearVector(TSimdVector &vector, SimdParams_<16, L>) { SEQAN_VECTOR_CAST_LVALUE_(__m128i&, vector) = _mm_setzero_si128(); }
-template <typename TSimdVector>
-inline void _clearVector(TSimdVector &vector, SimdParams_<16, 4>)  { SEQAN_VECTOR_CAST_LVALUE_(__m128&, vector) = _mm_setzero_ps(); }
-template <typename TSimdVector>
-inline void _clearVector(TSimdVector &vector, SimdParams_<16, 2>)  { SEQAN_VECTOR_CAST_LVALUE_(__m128d&, vector) = _mm_setzero_pd(); }
-
-// --------------------------------------------------------------------------
-// _createVector (128bit)
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector, typename TValue>
-inline TSimdVector _createVector(TValue x, SimdParams_<16, 16>) { return SEQAN_VECTOR_CAST_(TSimdVector, _mm_set1_epi8(x)); }
-template <typename TSimdVector, typename TValue>
-inline TSimdVector _createVector(TValue x, SimdParams_<16, 8>)  { return SEQAN_VECTOR_CAST_(TSimdVector, _mm_set1_epi16(x)); }
-template <typename TSimdVector, typename TValue>
-inline TSimdVector _createVector(TValue x, SimdParams_<16, 4>)  { return SEQAN_VECTOR_CAST_(TSimdVector, _mm_set1_epi32(x)); }
-template <typename TSimdVector, typename TValue>
-inline TSimdVector _createVector(TValue x, SimdParams_<16, 2>)  { return SEQAN_VECTOR_CAST_(TSimdVector, _mm_set1_epi64x(x)); }
-template <typename TSimdVector>
-inline TSimdVector _createVector(float x,  SimdParams_<16, 4>)  { return SEQAN_VECTOR_CAST_(TSimdVector, _mm_set1_ps(x)); }
-template <typename TSimdVector>
-inline TSimdVector _createVector(double x, SimdParams_<16, 2>)  { return SEQAN_VECTOR_CAST_(TSimdVector, _mm_set1_pd(x)); }
-
-// --------------------------------------------------------------------------
-// cmpEq (128bit)
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector>
-inline TSimdVector _cmpEq(TSimdVector &a, TSimdVector &b, SimdParams_<16, 16>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm_cmpeq_epi8(SEQAN_VECTOR_CAST_(const __m128i&, a),
-                                             SEQAN_VECTOR_CAST_(const __m128i&, b)));
-}
-
-template <typename TSimdVector>
-inline TSimdVector _cmpEq(TSimdVector &a, TSimdVector &b, SimdParams_<16, 8>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm_cmpeq_epi16(SEQAN_VECTOR_CAST_(const __m128i&, a),
-                                              SEQAN_VECTOR_CAST_(const __m128i&, b)));
-}
-
-template <typename TSimdVector>
-inline TSimdVector _cmpEq(TSimdVector &a, TSimdVector &b, SimdParams_<16, 4>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm_cmpeq_epi32(SEQAN_VECTOR_CAST_(const __m128i&, a),
-                                              SEQAN_VECTOR_CAST_(const __m128i&, b)));
-}
-
-template <typename TSimdVector>
-inline TSimdVector _cmpEq(TSimdVector &a, TSimdVector &b, SimdParams_<16, 2>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm_cmpeq_epi64(SEQAN_VECTOR_CAST_(const __m128i&, a),
-                                              SEQAN_VECTOR_CAST_(const __m128i&, b)));
-}
-
-// --------------------------------------------------------------------------
-// _cmpGt (128bit)
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector>
-inline TSimdVector _cmpGt(TSimdVector &a, TSimdVector &b, SimdParams_<16, 16>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm_cmpgt_epi8(SEQAN_VECTOR_CAST_(const __m128i&, a),
-                                             SEQAN_VECTOR_CAST_(const __m128i&, b)));
-}
-
-template <typename TSimdVector>
-inline TSimdVector _cmpGt(TSimdVector &a, TSimdVector &b, SimdParams_<16, 8>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm_cmpgt_epi16(SEQAN_VECTOR_CAST_(const __m128i&, a),
-                                              SEQAN_VECTOR_CAST_(const __m128i&, b)));
-}
-
-template <typename TSimdVector>
-inline TSimdVector _cmpGt(TSimdVector &a, TSimdVector &b, SimdParams_<16, 4>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm_cmpgt_epi32(SEQAN_VECTOR_CAST_(const __m128i&, a),
-                                              SEQAN_VECTOR_CAST_(const __m128i&, b)));
-}
-
-template <typename TSimdVector>
-inline TSimdVector _cmpGt(TSimdVector &a, TSimdVector &b, SimdParams_<16, 2>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm_cmpgt_epi64(SEQAN_VECTOR_CAST_(const __m128i&, a),
-                                              SEQAN_VECTOR_CAST_(const __m128i&, b)));
-}
-
-// --------------------------------------------------------------------------
-// _bitwiseOr (128bit)
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector, int L>
-inline TSimdVector _bitwiseOr(TSimdVector &a, TSimdVector &b, SimdParams_<16, L>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm_or_si128(SEQAN_VECTOR_CAST_(const __m128i&, a),
-                                           SEQAN_VECTOR_CAST_(const __m128i&, b)));
-}
-
-// --------------------------------------------------------------------------
-// _bitwiseAnd (128bit)
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector, int L>
-inline TSimdVector _bitwiseAnd(TSimdVector &a, TSimdVector &b, SimdParams_<16, L>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm_and_si128(SEQAN_VECTOR_CAST_(const __m128i&, a),
-                                            SEQAN_VECTOR_CAST_(const __m128i&, b)));
-}
-
-// --------------------------------------------------------------------------
-// _bitwiseAndNot (128bit)
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector, int L>
-inline TSimdVector _bitwiseAndNot(TSimdVector &a, TSimdVector &b, SimdParams_<16, L>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm_andnot_si128(SEQAN_VECTOR_CAST_(const __m128i&, a),
-                                               SEQAN_VECTOR_CAST_(const __m128i&, b)));
-}
-
-// --------------------------------------------------------------------------
-// _bitwiseNot (128bit)
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector>
-inline TSimdVector _bitwiseNot(TSimdVector &a, SimdParams_<16, 16>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm_cmpeq_epi8(SEQAN_VECTOR_CAST_(const __m128i&, a),
-                                             _mm_setzero_si128()));
-}
-
-template <typename TSimdVector>
-inline TSimdVector _bitwiseNot(TSimdVector &a, SimdParams_<16, 8>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm_cmpeq_epi16(SEQAN_VECTOR_CAST_(const __m128i&, a),
-                                              _mm_setzero_si128()));
-}
-
-template <typename TSimdVector>
-inline TSimdVector _bitwiseNot(TSimdVector &a, SimdParams_<16, 4>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm_cmpeq_epi32(SEQAN_VECTOR_CAST_(const __m128i&, a),
-                                              _mm_setzero_si128()));
-}
-
-template <typename TSimdVector>
-inline TSimdVector _bitwiseNot(TSimdVector &a, SimdParams_<16, 2>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm_cmpeq_epi64(SEQAN_VECTOR_CAST_(const __m128i&, a),
-                                              _mm_setzero_si128()));
-}
-
-// --------------------------------------------------------------------------
-// _divide (128bit)
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector>
-inline TSimdVector _divide(TSimdVector &a, int b, SimdParams_<16, 16>) { return SEQAN_VECTOR_CAST_(TSimdVector, _mm_div_epi8(a, _mm_set1_epi8(b))); }
-
-template <typename TSimdVector>
-inline TSimdVector _divide(TSimdVector &a, int b, SimdParams_<16, 8>){ return SEQAN_VECTOR_CAST_(TSimdVector, _mm_div_epi16(a, _mm_set1_epi16(b))); }
-
-template <typename TSimdVector>
-inline TSimdVector _divide(TSimdVector &a, int b, SimdParams_<16, 4>) { return SEQAN_VECTOR_CAST_(TSimdVector, _mm_div_epi32(a, _mm_set1_epi32(b))); }
-
-template <typename TSimdVector>
-inline TSimdVector _divide(TSimdVector &a, int b, SimdParams_<16, 2>) { return SEQAN_VECTOR_CAST_(TSimdVector, _mm_div_epi64(a, _mm_set1_epi64x(b))); }
-
-// --------------------------------------------------------------------------
-// _add (128bit)
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector>
-inline TSimdVector _add(TSimdVector &a, TSimdVector &b, SimdParams_<16, 16>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm_add_epi8(SEQAN_VECTOR_CAST_(const __m128i&, a),
-                                           SEQAN_VECTOR_CAST_(const __m128i&, b)));
-}
-
-template <typename TSimdVector>
-inline TSimdVector _add(TSimdVector &a, TSimdVector &b, SimdParams_<16, 8>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm_add_epi16(SEQAN_VECTOR_CAST_(const __m128i&, a),
-                                            SEQAN_VECTOR_CAST_(const __m128i&, b)));
-}
-
-template <typename TSimdVector>
-inline TSimdVector _add(TSimdVector &a, TSimdVector &b, SimdParams_<16, 4>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm_add_epi32(SEQAN_VECTOR_CAST_(const __m128i&, a),
-                                            SEQAN_VECTOR_CAST_(const __m128i&, b)));
-}
-
-template <typename TSimdVector>
-inline TSimdVector _add(TSimdVector &a, TSimdVector &b, SimdParams_<16, 2>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm_add_epi64(SEQAN_VECTOR_CAST_(const __m128i&, a),
-                                            SEQAN_VECTOR_CAST_(const __m128i&, b)));
-}
-
-// --------------------------------------------------------------------------
-// _sub (128bit)
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector>
-inline TSimdVector _sub(TSimdVector &a, TSimdVector &b, SimdParams_<16, 16>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm_sub_epi8(SEQAN_VECTOR_CAST_(const __m128i&, a),
-                                           SEQAN_VECTOR_CAST_(const __m128i&, b)));
-}
-
-template <typename TSimdVector>
-inline TSimdVector _sub(TSimdVector &a, TSimdVector &b, SimdParams_<16, 8>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm_sub_epi16(SEQAN_VECTOR_CAST_(const __m128i&, a),
-                                            SEQAN_VECTOR_CAST_(const __m128i&, b)));
-}
-
-template <typename TSimdVector>
-inline TSimdVector _sub(TSimdVector &a, TSimdVector &b, SimdParams_<16, 4>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm_sub_epi32(SEQAN_VECTOR_CAST_(const __m128i&, a),
-                                            SEQAN_VECTOR_CAST_(const __m128i&, b)));
-}
-
-template <typename TSimdVector>
-inline TSimdVector _sub(TSimdVector &a, TSimdVector &b, SimdParams_<16, 2>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm_sub_epi64(SEQAN_VECTOR_CAST_(const __m128i&, a),
-                                            SEQAN_VECTOR_CAST_(const __m128i&, b)));
-}
-
-// --------------------------------------------------------------------------
-// _mult (128bit)
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector>
-inline TSimdVector _mult(TSimdVector &a, TSimdVector &/*b*/, SimdParams_<16, 16>)
-{
-    SEQAN_ASSERT_FAIL("SSE intrinsics for multiplying 8 bit values not implemented!");
-    return a;
-}
-
-template <typename TSimdVector>
-inline TSimdVector _mult(TSimdVector &a, TSimdVector &b, SimdParams_<16, 8>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm_mullo_epi16(SEQAN_VECTOR_CAST_(const __m128i&, a),
-                                              SEQAN_VECTOR_CAST_(const __m128i&, b)));
-}
-
-template <typename TSimdVector>
-inline TSimdVector _mult(TSimdVector &a, TSimdVector &b, SimdParams_<16, 4>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm_mullo_epi32(SEQAN_VECTOR_CAST_(const __m128i&, a),
-                                              SEQAN_VECTOR_CAST_(const __m128i&, b)));
-}
-
-template <typename TSimdVector>
-inline TSimdVector _mult(TSimdVector &a, TSimdVector &/*b*/, SimdParams_<16, 2>)
-{
-    SEQAN_ASSERT_FAIL("SSE intrinsics for multiplying 64 bit values not implemented!");
-    return a;
-}
-
-// --------------------------------------------------------------------------
-// _max (128bit)
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector>
-inline TSimdVector _max(TSimdVector &a, TSimdVector &b, SimdParams_<16, 8>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm_max_epi16(SEQAN_VECTOR_CAST_(const __m128i&, a),
-                                            SEQAN_VECTOR_CAST_(const __m128i&, b)));
-}
-
-template <typename TSimdVector>
-inline TSimdVector _max(TSimdVector &a, TSimdVector &b, SimdParams_<16, 16>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm_max_epi8(SEQAN_VECTOR_CAST_(const __m128i&, a),
-                                           SEQAN_VECTOR_CAST_(const __m128i&, b)));
-}
-
-template <typename TSimdVector>
-inline TSimdVector _max(TSimdVector &a, TSimdVector &b, SimdParams_<16, 4>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm_max_epi32(SEQAN_VECTOR_CAST_(const __m128i&, a),
-                                            SEQAN_VECTOR_CAST_(const __m128i&, b)));
-}
-
-// --------------------------------------------------------------------------
-// _blend (128bit)
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector, typename TSimdVectorMask, int L>
-inline TSimdVector _blend(TSimdVector const &a, TSimdVector const &b, TSimdVectorMask const &mask, SimdParams_<16, L>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector,
-                              _mm_blendv_epi8(SEQAN_VECTOR_CAST_(const __m128i&, a),
-                                              SEQAN_VECTOR_CAST_(const __m128i&, b),
-                                              SEQAN_VECTOR_CAST_(const __m128i&, mask)));
-}
-
-// --------------------------------------------------------------------------
-// _storeu (128bit)
-// --------------------------------------------------------------------------
-
-template <typename T, typename TSimdVector, int L>
-inline void _storeu(T * memAddr, TSimdVector &vec, SimdParams_<16, L>)
-{
-    _mm_storeu_si128((__m128i*)memAddr, reinterpret_cast<const __m128i &>(vec));
-}
-
-// ----------------------------------------------------------------------------
-// Function _load() 128bit
-// ----------------------------------------------------------------------------
-
-template <typename TSimdVector, typename T, int L>
-inline TSimdVector _load(T const * memAddr, SimdParams_<16, L>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector, _mm_load_si128((__m128i const *) memAddr));
-}
-
-// --------------------------------------------------------------------------
-// _shuffleVector (128bit)
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector1, typename TSimdVector2>
-inline TSimdVector1
-_shuffleVector(TSimdVector1 const &vector, TSimdVector2 const &indices, SimdParams_<16, 16>, SimdParams_<16, 16>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector1, _mm_shuffle_epi8(SEQAN_VECTOR_CAST_(const __m128i &, vector),
-                                                             SEQAN_VECTOR_CAST_(const __m128i &, indices)));
-}
-
-template <typename TSimdVector1, typename TSimdVector2>
-inline TSimdVector1
-_shuffleVector(TSimdVector1 const &vector, TSimdVector2 const &indices, SimdParams_<16, 8>, SimdParams_<8, 8>)
-{
-#if SEQAN_IS_32_BIT
-    __m128i idx = _mm_slli_epi16(_mm_unpacklo_epi32(_mm_cvtsi32_si128(reinterpret_cast<const uint32_t &>(indices)),
-                                                    _mm_cvtsi32_si128(reinterpret_cast<const uint64_t &>(indices) >> 32)), 1);
-#else
-    __m128i idx = _mm_slli_epi16(_mm_cvtsi64_si128(reinterpret_cast<const uint64_t &>(indices)), 1);
-#endif  // SEQAN_IS_32_BIT
-    return SEQAN_VECTOR_CAST_(TSimdVector1, _mm_shuffle_epi8(SEQAN_VECTOR_CAST_(const __m128i &, vector),
-                                                             _mm_unpacklo_epi8(idx, _mm_add_epi8(idx, _mm_set1_epi8(1)))));
-}
-
-// --------------------------------------------------------------------------
-// _shiftRightLogical (128bit)
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector>
-inline TSimdVector _shiftRightLogical(TSimdVector const &vector, const int imm, SimdParams_<16, 16>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector, _mm_srli_epi16(SEQAN_VECTOR_CAST_(const __m128i &, vector), imm) & _mm_set1_epi8(0xff >> imm));
-}
-template <typename TSimdVector>
-inline TSimdVector _shiftRightLogical(TSimdVector const &vector, const int imm, SimdParams_<16, 8>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector, _mm_srli_epi16(SEQAN_VECTOR_CAST_(const __m128i &, vector), imm));
-}
-template <typename TSimdVector>
-inline TSimdVector _shiftRightLogical(TSimdVector const &vector, const int imm, SimdParams_<16, 4>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector, _mm_srli_epi32(SEQAN_VECTOR_CAST_(const __m128i &, vector), imm));
-}
-template <typename TSimdVector>
-inline TSimdVector _shiftRightLogical(TSimdVector const &vector, const int imm, SimdParams_<16, 2>)
-{
-    return SEQAN_VECTOR_CAST_(TSimdVector, _mm_srli_epi64(SEQAN_VECTOR_CAST_(const __m128i &, vector), imm));
-}
-
-// --------------------------------------------------------------------------
-// _transposeMatrix (128bit)
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector>
-inline void
-_transposeMatrix(TSimdVector matrix[], SimdMatrixParams_<8, 8, 8>)
-{
-    // we need a look-up table to reverse the lowest 4 bits
-    // in order to place the permute the transposed rows
-    static const unsigned char bitRev[] = {0,4,2,6,1,5,3,7};
-
-    // transpose a 8x8 byte matrix
-    __m64 tmp1[8];
-    for (int i = 0; i < 4; ++i)
-    {
-        tmp1[i]   = _mm_unpacklo_pi8(SEQAN_VECTOR_CAST_(const __m64 &, matrix[2*i]), SEQAN_VECTOR_CAST_(const __m64 &, matrix[2*i+1]));
-        tmp1[i+4] = _mm_unpackhi_pi8(SEQAN_VECTOR_CAST_(const __m64 &, matrix[2*i]), SEQAN_VECTOR_CAST_(const __m64 &, matrix[2*i+1]));
-    }
-    __m64 tmp2[8];
-    for (int i = 0; i < 4; ++i)
-    {
-        tmp2[i]   = _mm_unpacklo_pi16(tmp1[2*i], tmp1[2*i+1]);
-        tmp2[i+4] = _mm_unpackhi_pi16(tmp1[2*i], tmp1[2*i+1]);
-    }
-    for (int i = 0; i < 4; ++i)
-    {
-        matrix[bitRev[i]]   = SEQAN_VECTOR_CAST_(TSimdVector, _mm_unpacklo_pi32(tmp2[2*i], tmp2[2*i+1]));
-        matrix[bitRev[i+4]] = SEQAN_VECTOR_CAST_(TSimdVector, _mm_unpackhi_pi32(tmp2[2*i], tmp2[2*i+1]));
-    }
-}
-
-template <typename TSimdVector>
-inline void
-_transposeMatrix(TSimdVector matrix[], SimdMatrixParams_<16, 16, 8>)
-{
-    // we need a look-up table to reverse the lowest 4 bits
-    // in order to place the permute the transposed rows
-    static const unsigned char bitRev[] = {0,8,4,12,2,10,6,14,1,9,5,13,3,11,7,15};
-
-    // transpose a 16x16 byte matrix
-    //
-    // matrix =
-    // A0 A1 A2 ... Ae Af
-    // B0 B1 B2 ... Be Bf
-    // ...
-    // P0 P1 P2 ... Pe Pf
-    __m128i tmp1[16];
-    for (int i = 0; i < 8; ++i)
-    {
-        tmp1[i]   = _mm_unpacklo_epi8(SEQAN_VECTOR_CAST_(const __m128i &, matrix[2*i]), SEQAN_VECTOR_CAST_(const __m128i &, matrix[2*i+1]));
-        tmp1[i+8] = _mm_unpackhi_epi8(SEQAN_VECTOR_CAST_(const __m128i &, matrix[2*i]), SEQAN_VECTOR_CAST_(const __m128i &, matrix[2*i+1]));
-    }
-    // tmp1[0]  = A0 B0 A1 B1 ... A7 B7
-    // tmp1[1]  = C0 D0 C1 D1 ... C7 D7
-    // ...
-    // tmp1[7]  = O0 P0 O1 P1 ... O7 P7
-    // tmp1[8]  = A8 B8 A9 B9 ... Af Bf
-    // ...
-    // tmp1[15] = O8 P8 O9 P9 ... Of Pf
-    __m128i tmp2[16];
-    for (int i = 0; i < 8; ++i)
-    {
-        tmp2[i]   = _mm_unpacklo_epi16(tmp1[2*i], tmp1[2*i+1]);
-        tmp2[i+8] = _mm_unpackhi_epi16(tmp1[2*i], tmp1[2*i+1]);
-    }
-    // tmp2[0]  = A0 B0 C0 D0 ... A3 B3 C3 D3
-    // tmp2[1]  = E0 F0 G0 H0 ... E3 F3 G3 H3
-    // ...
-    // tmp2[3]  = M0 N0 O0 P0 ... M3 N3 O3 P3
-    // tmp2[4]  = A8 B8 C8 D8 ... Ab Bb Cb Db
-    // ...
-    // tmp2[7]  = M8 N8 O8 P8 ... Mb Nb Ob Pb
-    // tmp2[8]  = A4 B4 C4 D4 ... A7 B7 C7 D7
-    // ..
-    // tmp2[12] = Ac Bc Cc Dc ... Af Bf Cf Df
-    // ...
-    // tmp2[15] = Mc Nc Oc Pc ... Mf Nf Of Pf
-    for (int i = 0; i < 8; ++i)
-    {
-        tmp1[i]   = _mm_unpacklo_epi32(tmp2[2*i], tmp2[2*i+1]);
-        tmp1[i+8] = _mm_unpackhi_epi32(tmp2[2*i], tmp2[2*i+1]);
-    }
-    // tmp1[0]  = A0 B0 .... H0 A1 B1 .... H1
-    // tmp1[1]  = I0 J0 .... P0 I1 J1 .... P1
-    // ...
-    // tmp1[4]  = A0 B0 .... H0 A1 B1 .... H1
-    // tmp1[1]  = I0 J0 .... P0 I1 J1 .... P1
-    for (int i = 0; i < 8; ++i)
-    {
-        matrix[bitRev[i]]   = SEQAN_VECTOR_CAST_(TSimdVector, _mm_unpacklo_epi64(tmp1[2*i], tmp1[2*i+1]));
-        matrix[bitRev[i+8]] = SEQAN_VECTOR_CAST_(TSimdVector, _mm_unpackhi_epi64(tmp1[2*i], tmp1[2*i+1]));
-    }
-}
-
-// --------------------------------------------------------------------------
-// Function _testAllZeros (128bit)
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector>
-SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, int)
-inline _testAllZeros(TSimdVector const &vector, TSimdVector const &mask, SimdParams_<16>)
-{
-    return _mm_testz_si128(vector, mask);
-}
-
-// --------------------------------------------------------------------------
-// Function _testAllOnes (128bit)
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector>
-inline
-SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, int)
-_testAllOnes(TSimdVector const &vector, SimdParams_<16>)
-{
-    return _mm_test_all_ones(SEQAN_VECTOR_CAST_(const __m128i &, vector));
-}
-#endif  // #ifdef SEQAN_SSE4
-
-// ============================================================================
-//
-// INTERFACE FUNCTIONS
-// - these should be used in the actual code, they will call one of the wrapper
-//   functions defined above based on the vector type
-//
-// ============================================================================
-
-// --------------------------------------------------------------------------
-// Function transpose()
-// --------------------------------------------------------------------------
-
-template <int ROWS, typename TSimdVector>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, void)
-transpose(TSimdVector matrix[ROWS])
-{
-    typedef typename Value<TSimdVector>::Type TValue;
-    _transposeMatrix(matrix, SimdMatrixParams_<ROWS, LENGTH<TSimdVector>::VALUE, BitsPerValue<TValue>::VALUE>());
-}
-
-// --------------------------------------------------------------------------
-// Function clearVector()
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, void)
-clearVector(TSimdVector &vector)
-{
-    typedef typename Value<TSimdVector>::Type TValue;
-    _clearVector(vector, SimdParams_<sizeof(TSimdVector), sizeof(TSimdVector) / sizeof(TValue)>());
-}
-
-// --------------------------------------------------------------------------
-// Function createVector()
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector, typename TValue>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
-createVector(TValue x)
-{
-    typedef typename Value<TSimdVector>::Type TIVal;
-    return _createVector<TSimdVector>(x, SimdParams_<sizeof(TSimdVector), sizeof(TSimdVector) / sizeof(TIVal)>());
-}
-
-// --------------------------------------------------------------------------
-// Function fillVector()
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector, typename ...TValue>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, void)
-fillVector(TSimdVector &vector, TValue const... args)
-{
-    typedef typename Value<TSimdVector>::Type TIVal;
-    _fillVector(vector, std::make_tuple(args...),
-                std::make_index_sequence<sizeof...(args)>{},
-                SimdParams_<sizeof(TSimdVector), sizeof(TSimdVector) / sizeof(TIVal)>());
-}
-
-// --------------------------------------------------------------------------
-// Function cmpEq()
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
-cmpEq (TSimdVector const &a, TSimdVector const &b)
-{
-    typedef typename Value<TSimdVector>::Type TValue;
-    return _cmpEq(a, b, SimdParams_<sizeof(TSimdVector), sizeof(TSimdVector) / sizeof(TValue)>());
-}
-
-// --------------------------------------------------------------------------
-// Function operator==()
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
-operator == (TSimdVector const &a, TSimdVector const &b)
-{
-    typedef typename Value<TSimdVector>::Type TValue;
-    return _cmpEq(a, b, SimdParams_<sizeof(TSimdVector), sizeof(TSimdVector) / sizeof(TValue)>());
-}
-
-// --------------------------------------------------------------------------
-// Function operatorGt()
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
-cmpGt (TSimdVector const &a, TSimdVector const &b)
-{
-    typedef typename Value<TSimdVector>::Type TValue;
-    return _cmpGt(a, b, SimdParams_<sizeof(TSimdVector), sizeof(TSimdVector) / sizeof(TValue)>());
-}
-
-// --------------------------------------------------------------------------
-// Function operator>()
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
-operator > (TSimdVector const &a, TSimdVector const &b)
-{
-    typedef typename Value<TSimdVector>::Type TValue;
-    return _cmpGt(a, b, SimdParams_<sizeof(TSimdVector), sizeof(TSimdVector) / sizeof(TValue)>());
-}
-
-// --------------------------------------------------------------------------
-// Function max()
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
-max(TSimdVector const &a, TSimdVector const &b)
-{
-    typedef typename Value<TSimdVector>::Type TValue;
-    return _max(a, b, SimdParams_<sizeof(TSimdVector), sizeof(TSimdVector) / sizeof(TValue)>());
-}
-
-// --------------------------------------------------------------------------
-// Function operator|()
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
-operator | (TSimdVector const &a, TSimdVector const &b)
-{
-    typedef typename Value<TSimdVector>::Type TValue;
-    return _bitwiseOr(a, b, SimdParams_<sizeof(TSimdVector), sizeof(TSimdVector) / sizeof(TValue)>());
-}
-
-// --------------------------------------------------------------------------
-// Function operator|=()
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector &)
-operator |= (TSimdVector &a, TSimdVector const &b)
-{
-    a = a | b;
-    return a;
-}
-
-// --------------------------------------------------------------------------
-// Function operator&()
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
-operator & (TSimdVector const &a, TSimdVector const &b)
-{
-    typedef typename Value<TSimdVector>::Type TValue;
-    return _bitwiseAnd(a, b, SimdParams_<sizeof(TSimdVector), sizeof(TSimdVector) / sizeof(TValue)>());
-}
-
-// --------------------------------------------------------------------------
-// Function operator&=()
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector &)
-operator &= (TSimdVector &a, TSimdVector const &b)
-{
-    a = a & b;
-    return a;
-}
-
-// --------------------------------------------------------------------------
-// Function operator~()
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
-operator ~ (TSimdVector const &a)
-{
-    typedef typename Value<TSimdVector>::Type TValue;
-    return _bitwiseNot(a, SimdParams_<sizeof(TSimdVector), sizeof(TSimdVector) / sizeof(TValue)>());
-}
-
-// --------------------------------------------------------------------------
-// Function operator+()
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
-operator + (TSimdVector const &a, TSimdVector const &b)
-{
-    typedef typename Value<TSimdVector>::Type TValue;
-    return _add(a, b, SimdParams_<sizeof(TSimdVector), sizeof(TSimdVector) / sizeof(TValue)>());
-}
-
-// --------------------------------------------------------------------------
-// Function operator-()
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
-operator - (TSimdVector const &a, TSimdVector const &b)
-{
-    typedef typename Value<TSimdVector>::Type TValue;
-    return _sub(a, b, SimdParams_<sizeof(TSimdVector), sizeof(TSimdVector) / sizeof(TValue)>());
-}
-
-// --------------------------------------------------------------------------
-// Function operator*()
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
-operator * (TSimdVector const &a, TSimdVector const &b)
-{
-    typedef typename Value<TSimdVector>::Type TValue;
-    return _mult(a, b, SimdParams_<sizeof(TSimdVector), sizeof(TSimdVector) / sizeof(TValue)>());
-}
-
-// --------------------------------------------------------------------------
-// Function operator/()
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
-operator/ (TSimdVector const &a, TSimdVector const &b)
-{
-    typedef typename Value<TSimdVector>::Type TValue;
-    return _div(a, b, SimdParams_<sizeof(TSimdVector), sizeof(TSimdVector) / sizeof(TValue)>());
-}
-
-// --------------------------------------------------------------------------
-// Function andNot
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
-andNot(TSimdVector const &a, TSimdVector const &b)
-{
-    typedef typename Value<TSimdVector>::Type TValue;
-    return _bitwiseAndNot(a, b, SimdParams_<sizeof(TSimdVector), sizeof(TSimdVector) / sizeof(TValue)>());
-}
-
-// --------------------------------------------------------------------------
-// Function shuffleVector()
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector1, typename TSimdVector2>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector1> >, TSimdVector1)
-shuffleVector(TSimdVector1 const &vector, TSimdVector2 const &indices)
-{
-    typedef typename Value<TSimdVector1>::Type TValue1;
-    typedef typename Value<TSimdVector2>::Type TValue2;
-    return _shuffleVector(
-                vector,
-                indices,
-                SimdParams_<sizeof(TSimdVector1), sizeof(TSimdVector1) / sizeof(TValue1)>(),
-                SimdParams_<sizeof(TSimdVector2), sizeof(TSimdVector2) / sizeof(TValue2)>());
-}
-
-// --------------------------------------------------------------------------
-// Function shiftRightLogical()
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
-shiftRightLogical(TSimdVector const &vector, const int imm)
-{
-    typedef typename Value<TSimdVector>::Type TValue;
-    return _shiftRightLogical(vector, imm, SimdParams_<sizeof(TSimdVector), sizeof(TSimdVector) / sizeof(TValue)>());
-}
-
-// --------------------------------------------------------------------------
-// Function blend()
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector, typename TSimdVectorMask>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
-blend(TSimdVector const &a, TSimdVector const &b, TSimdVectorMask const & mask)
-{
-    typedef typename Value<TSimdVector>::Type TValue;
-    return _blend(a, b, mask, SimdParams_<sizeof(TSimdVector), sizeof(TSimdVector) / sizeof(TValue)>());
-}
-
-// --------------------------------------------------------------------------
-// Function storeu()
-// --------------------------------------------------------------------------
-
-template <typename T, typename TSimdVector>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, void)
-storeu(T * memAddr, TSimdVector const &vec)
-{
-    typedef typename Value<TSimdVector>::Type TValue;
-    _storeu(memAddr, vec, SimdParams_<sizeof(TSimdVector), sizeof(TSimdVector) / sizeof(TValue)>());
-}
-
-// --------------------------------------------------------------------------
-// Function load()
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector, typename T>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
-load(T const * memAddr)
-{
-    typedef typename Value<TSimdVector>::Type TValue;
-    return _load<TSimdVector>(memAddr, SimdParams_<sizeof(TSimdVector), sizeof(TSimdVector) / sizeof(TValue)>());
-}
-
-// --------------------------------------------------------------------------
-// Function gather()
-// --------------------------------------------------------------------------
-
-template <typename TValue, typename TSimdVector>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
-gather(TValue const * memAddr, TSimdVector const & idx)
-{
-    typedef typename Value<TSimdVector>::Type TInnerValue;
-    return _gather(memAddr, idx, std::integral_constant<size_t, sizeof(TValue)>(), SimdParams_<sizeof(TSimdVector), sizeof(TSimdVector) / sizeof(TInnerValue)>());
-}
-
-#endif  // SEQAN_SIMD_ENABLED
-
-// NOTE(rmaerker): Make this function available, also if SIMD is not enabled.
-template <typename TSimdVector, typename TValue>
-inline SEQAN_FUNC_DISABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
-createVector(TValue x)
-{
-    return x;
-}
-
-// --------------------------------------------------------------------------
-// Function print()
-// --------------------------------------------------------------------------
-
-template <typename TSimdVector>
-inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, std::ostream &)
-print(std::ostream &stream, TSimdVector const &vector)
-{
-    stream << '<';
-    for (int i = 0; i < LENGTH<TSimdVector>::VALUE; ++i)
-    stream << '\t' << vector[i];
-    stream << "\t>\n";
-    return stream;
-}
-
-} // namespace seqan
-
-#endif // SEQAN_INCLUDE_SEQAN_BASIC_SIMD_VECTOR_H_
diff --git a/include/seqan/basic/basic_smart_pointer.h b/include/seqan/basic/basic_smart_pointer.h
index deca95f..d28544d 100644
--- a/include/seqan/basic/basic_smart_pointer.h
+++ b/include/seqan/basic/basic_smart_pointer.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/basic_stream.h b/include/seqan/basic/basic_stream.h
index e03dca2..b570852 100644
--- a/include/seqan/basic/basic_stream.h
+++ b/include/seqan/basic/basic_stream.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -813,8 +813,9 @@ writeValue(TTargetValue * & iter, TValue val)
 template <typename TTarget, typename TFwdIterator, typename TSize, typename TIChunk, typename TOChunk>
 inline void _write(TTarget &target, TFwdIterator &iter, TSize n, TIChunk, TOChunk)
 {
+    typedef typename GetValue<TFwdIterator>::Type TValue;
     for (; n > (TSize)0; --n, ++iter)
-        writeValue(target, getValue(iter));
+        writeValue(target, static_cast<TValue>(*iter));
 }
 
 // ----------------------------------------------------------------------------
@@ -1190,18 +1191,38 @@ formattedNumber(const char *format, TValue const & val)
 
 template <typename TTarget, typename TValue>
 inline void
-appendRawPod(TTarget & target, TValue const & val)
+appendRawPodImpl(TTarget & target, TValue const & val)
 {
     write(target, (unsigned char*)&val, sizeof(TValue));
 }
 
 template <typename TTargetValue, typename TValue>
 inline void
-appendRawPod(TTargetValue * &ptr, TValue const & val)
+appendRawPodImpl(TTargetValue * &ptr, TValue const & val)
 {
     *reinterpret_cast<TValue* &>(ptr)++ = val;
 }
 
+template <typename TTarget, typename TValue>
+inline std::enable_if_t<std::is_arithmetic<TValue>::value>
+appendRawPod(TTarget & target, TValue val)
+{
+    enforceLittleEndian(val);
+    appendRawPodImpl(target, val);
+}
+
+template <typename TTarget, typename TValue>
+inline std::enable_if_t<!std::is_arithmetic<TValue>::value>
+appendRawPod(SEQAN_UNUSED TTarget & target, SEQAN_UNUSED TValue const & val)
+{
+#if SEQAN_BIG_ENDIAN
+    static_assert(std::is_arithmetic<TValue>::value /*false*/,
+                  "You are serialising a data structure on big endian architecture that needs a custom writer. THIS IS A BUG!");
+#else
+    appendRawPodImpl(target, val);
+#endif
+}
+
 // ----------------------------------------------------------------------------
 // Function write(TNumber); write fundamental type
 // ----------------------------------------------------------------------------
@@ -1258,7 +1279,7 @@ read(TTarget &target, TFwdIterator &iter, TSize n)
 {
     TSize i;
     for (i = 0; !atEnd(iter) && i < n; ++i, ++iter)
-        writeValue(target, value(iter));
+        writeValue(target, *iter);
     return i;
 }
 
diff --git a/include/seqan/basic/basic_tangle.h b/include/seqan/basic/basic_tangle.h
index 4190559..d3c06ac 100644
--- a/include/seqan/basic/basic_tangle.h
+++ b/include/seqan/basic/basic_tangle.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                               basic_tangle.h
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/basic_type.h b/include/seqan/basic/basic_type.h
index 1039a24..61d6837 100644
--- a/include/seqan/basic/basic_type.h
+++ b/include/seqan/basic/basic_type.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // Copyright (c) 2013 NVIDIA Corporation
 // All rights reserved.
 //
diff --git a/include/seqan/basic/boost_preprocessor_subset.h b/include/seqan/basic/boost_preprocessor_subset.h
index 634568a..e7c1988 100644
--- a/include/seqan/basic/boost_preprocessor_subset.h
+++ b/include/seqan/basic/boost_preprocessor_subset.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -4821,12 +4821,12 @@
 // ==> boost/config/suffix.hpp <==
 // --------------------------------------------------------------------------
 
-//  Copyright (c) 2001-2003 John Maddock
+//  Copyright (c) 2001-2018 John Maddock
 //  Copyright (c) 2001 Darin Adler
 //  Copyright (c) 2001 Peter Dimov
 //  Copyright (c) 2002 Bill Kempf
 //  Copyright (c) 2002 Jens Maurer
-//  Copyright (c) 2002-2003 David Abrahams
+//  Copyright (c) 2002-2018 David Abrahams
 //  Copyright (c) 2003 Gennaro Prota
 //  Copyright (c) 2003 Eric Friedman
 //  Copyright (c) 2010 Eric Jourdanneau, Joel Falcou
diff --git a/include/seqan/basic/builtin_functions.h b/include/seqan/basic/builtin_functions.h
index a16edfb..d9688ed 100644
--- a/include/seqan/basic/builtin_functions.h
+++ b/include/seqan/basic/builtin_functions.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                            builtin_functions.h
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/concept_checking.h b/include/seqan/basic/concept_checking.h
index 96dcc8a..18a3bd6 100644
--- a/include/seqan/basic/concept_checking.h
+++ b/include/seqan/basic/concept_checking.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/container_concept.h b/include/seqan/basic/container_concept.h
index 0836eda..1213dd2 100644
--- a/include/seqan/basic/container_concept.h
+++ b/include/seqan/basic/container_concept.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/debug_helper.h b/include/seqan/basic/debug_helper.h
index c171d7f..97f7e73 100644
--- a/include/seqan/basic/debug_helper.h
+++ b/include/seqan/basic/debug_helper.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/debug_test_system.h b/include/seqan/basic/debug_test_system.h
index d98d4e2..e2a121b 100644
--- a/include/seqan/basic/debug_test_system.h
+++ b/include/seqan/basic/debug_test_system.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // Copyright (c) 2013 NVIDIA Corporation
 // All rights reserved.
 //
@@ -114,7 +114,11 @@
 
 // Set default for SEQAN_ENABLE_DEBUG.
 #ifndef SEQAN_ENABLE_DEBUG
+#ifdef NDEBUG
 #define SEQAN_ENABLE_DEBUG 0
+#else
+#define SEQAN_ENABLE_DEBUG 1
+#endif
 #endif  // #ifndef SEQAN_ENABLE_DEBUG
 
 #if !SEQAN_ENABLE_DEBUG
@@ -1731,10 +1735,10 @@ inline void fail()
 
 // This macro returns from the current function and logs a "skipped"
 // event for the current test.
-#define SEQAN_SKIP_TEST                         \
-    do {                                        \
-        ::seqan::ClassTest::skipCurrentTest();  \
-        return;                                 \
+#define SEQAN_SKIP_TEST                                       \
+    do {                                                      \
+        ::seqan::ClassTest::skipCurrentTest();                \
+        throw ::seqan::ClassTest::AssertionFailedException(); \
     } while (false)
 #endif  // #if SEQAN_ENABLE_TESTING
 
@@ -2316,7 +2320,6 @@ inline void fail()
 #define SEQAN_PATH_TO_ROOT()                      \
     ::seqan::ClassTest::StaticData::pathToRoot()
 
-
 // Returns the POSIX int file handle to an open file.
 // TODO(holtgrewe): Uncomment if openTempFile has been implemented.
 // #define SEQAN_OPEN_TEMP_FILE() (::seqan::ClassTest::openTempFile())
@@ -2384,7 +2387,7 @@ inline void fail()
 
 inline std::string getAbsolutePath(const char * path)
 {
-    return std::string(SEQAN_PATH_TO_ROOT()) + "/" + path;
+    return std::string(::seqan::ClassTest::StaticData::pathToRoot()) + "/" + path;
 }
 
 }  // namespace seqan
diff --git a/include/seqan/basic/fundamental_chunking.h b/include/seqan/basic/fundamental_chunking.h
index 9a58559..428343c 100644
--- a/include/seqan/basic/fundamental_chunking.h
+++ b/include/seqan/basic/fundamental_chunking.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/fundamental_comparison.h b/include/seqan/basic/fundamental_comparison.h
index ca13458..3dff852 100644
--- a/include/seqan/basic/fundamental_comparison.h
+++ b/include/seqan/basic/fundamental_comparison.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/fundamental_concepts.h b/include/seqan/basic/fundamental_concepts.h
index 5cf7646..d820741 100644
--- a/include/seqan/basic/fundamental_concepts.h
+++ b/include/seqan/basic/fundamental_concepts.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -277,6 +277,7 @@ struct Is<Convertible<T, S const> > :
  * @endcode
  *
  * @see DefaultConstructibleConcept
+ * @see MoveConstructibleConcept
  */
 
 SEQAN_CONCEPT(CopyConstructible,(T))
@@ -299,6 +300,33 @@ private:
     T b;
 };
 
+/*!
+ * @concept MoveConstructibleConcept
+ * @brief A type with a move-constructor.
+ *
+ * @headerfile <seqan/basic.h>
+ *
+ * @signature MoveConstructible<T>
+ *
+ * @section Valid Expressions
+ *
+ * @code{.cpp}
+ * T a(rv);  // rv is an rvalue expression of type T
+ * @endcode
+ *
+ * @see DefaultConstructibleConcept
+ * @see CopyConstructibleConcept
+ */
+
+SEQAN_CONCEPT(MoveConstructible,(T))
+{
+    SEQAN_CONCEPT_USAGE(MoveConstructible)
+    {
+        T a{T{}};               // require move constructor
+        ignoreUnusedVariableWarning(a);
+    }
+};
+
 
 // ============================================================================
 // Relation Concepts
@@ -680,10 +708,10 @@ struct IsSignedInteger : Is< SignedIntegerConcept<T> > {};
 template <typename T>
 struct IsUnsignedInteger : Is< UnsignedIntegerConcept<T> > {};
 template <typename T>
-struct IsInteger : Is< IntegerConcept<T> > {};
+struct [[deprecated("Please use Is<IntegerConcept<T> >::Type.")]] IsInteger : Is< IntegerConcept<T> > {};
 
 template <typename T>
-struct IsIntegral : IsInteger<T> {};
+struct [[deprecated("Please use Is<IntegerConcept<T> >::Type.")]] IsIntegral : Is< IntegerConcept<T> > {};
 
 // ============================================================================
 // Concepts for integers
diff --git a/include/seqan/basic/fundamental_conversion.h b/include/seqan/basic/fundamental_conversion.h
index 6508247..af0b730 100644
--- a/include/seqan/basic/fundamental_conversion.h
+++ b/include/seqan/basic/fundamental_conversion.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/fundamental_metafunctions.h b/include/seqan/basic/fundamental_metafunctions.h
index 7f3a702..86c9a3f 100644
--- a/include/seqan/basic/fundamental_metafunctions.h
+++ b/include/seqan/basic/fundamental_metafunctions.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -202,12 +202,24 @@ struct Spec
     typedef void Type;
 };
 
-// Case for one template argument.
+// Case for variable number of template arguments.
+// Note, that a spec by default should be the last template argument in SeqAn.
+// This helper recursively reduces the template argument list to the last template argument.
+template <size_t REMAINING, typename T1, typename ...TRemainingTypes>
+struct GetSpecHelper_ : GetSpecHelper_<sizeof...(TRemainingTypes), TRemainingTypes...>
+{};
+
+// Recursion anchor.
+template <typename T1>
+struct GetSpecHelper_<1, T1>
+{
+    using Type = T1;
+};
 
-template <template <typename> class T, typename TSpec>
-struct Spec<T<TSpec> >
+template <template <typename ...> class T, typename ...TArgs>
+struct Spec<T<TArgs...> >
 {
-    typedef TSpec Type;
+    using Type = typename GetSpecHelper_<sizeof...(TArgs), TArgs...>::Type;
 };
 
 template <typename T>
diff --git a/include/seqan/basic/fundamental_tags.h b/include/seqan/basic/fundamental_tags.h
index ce6dd76..d8e48c6 100644
--- a/include/seqan/basic/fundamental_tags.h
+++ b/include/seqan/basic/fundamental_tags.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -549,7 +549,7 @@ inline bool tagSelectIntersect(TagSelector<TOutTagList> & outTagList, Tag<TagSpe
 {
     typedef typename TOutTagList::Type TFormat;
 
-    if (IsSameType<Tag<TagSpec>, TFormat>::VALUE)
+    SEQAN_IF_CONSTEXPR (IsSameType<Tag<TagSpec>, TFormat>::VALUE)
     {
         outTagList.tagId = LENGTH<TOutTagList>::VALUE - 1;
         return true;
diff --git a/include/seqan/basic/fundamental_transport.h b/include/seqan/basic/fundamental_transport.h
index 116a6ba..0457dc6 100644
--- a/include/seqan/basic/fundamental_transport.h
+++ b/include/seqan/basic/fundamental_transport.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -127,7 +127,7 @@ inline void
 assign(Proxy<TTargetSpec> & target,
        TSource & source)
 {
-    assignValue(iter(target), source);
+    *iter(target) = source;
 }
 
 template<typename TTargetSpec, typename TSource>
@@ -135,7 +135,7 @@ inline void
 assign(Proxy<TTargetSpec> & target,
        TSource const & source)
 {
-    assignValue(iter(target), source);
+    *iter(target) = source;
 }
 
 // ----------------------------------------------------------------------------
diff --git a/include/seqan/basic/holder_base.h b/include/seqan/basic/holder_base.h
index f27bd7a..83b2f64 100644
--- a/include/seqan/basic/holder_base.h
+++ b/include/seqan/basic/holder_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/holder_simple.h b/include/seqan/basic/holder_simple.h
index dfd2f61..c4bb831 100644
--- a/include/seqan/basic/holder_simple.h
+++ b/include/seqan/basic/holder_simple.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/holder_tristate.h b/include/seqan/basic/holder_tristate.h
index 0849a0a..e6e893d 100644
--- a/include/seqan/basic/holder_tristate.h
+++ b/include/seqan/basic/holder_tristate.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -936,15 +936,15 @@ assign(Holder<TValue const, Tristate> & target_,
        Holder<TValue const, Tristate> const & source_)
 {
     switch(source_.data_state) {
-        case Holder<TValue, Tristate>::EMPTY:
+        case Holder<TValue const, Tristate>::EMPTY:
             clear(target_);
             break;
 
-        case Holder<TValue, Tristate>::OWNER:
+        case Holder<TValue const, Tristate>::OWNER:
             create(target_, value(source_));
             break;
 
-        default:  // case Holder<TValue, Tristate>::DEPENDENT
+        default:  // case Holder<TValue const, Tristate>::DEPENDENT
             setValue(target_, value(source_));
             break;
     }
diff --git a/include/seqan/basic/hosted_type_interface.h b/include/seqan/basic/hosted_type_interface.h
index 3f931b0..ddf04aa 100644
--- a/include/seqan/basic/hosted_type_interface.h
+++ b/include/seqan/basic/hosted_type_interface.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/iterator_adapt_pointer.h b/include/seqan/basic/iterator_adapt_pointer.h
index 137159a..b8e627e 100644
--- a/include/seqan/basic/iterator_adapt_pointer.h
+++ b/include/seqan/basic/iterator_adapt_pointer.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/iterator_adapt_std.h b/include/seqan/basic/iterator_adapt_std.h
index 19cb783..88ea13e 100644
--- a/include/seqan/basic/iterator_adapt_std.h
+++ b/include/seqan/basic/iterator_adapt_std.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/iterator_adaptor.h b/include/seqan/basic/iterator_adaptor.h
index 006906e..e86497d 100644
--- a/include/seqan/basic/iterator_adaptor.h
+++ b/include/seqan/basic/iterator_adaptor.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -378,14 +378,14 @@ template <typename TContainer, typename TIterator, typename TSpec>
 inline typename Reference<Iter<TContainer, AdaptorIterator<TIterator, TSpec> > >::Type
 value(Iter<TContainer, AdaptorIterator<TIterator, TSpec> > & me)
 {
-    return value(hostIterator(me));
+    return *hostIterator(me);
 }
 
 template <typename TContainer, typename TIterator, typename TSpec>
 inline typename Reference<Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const>::Type
 value(Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & me)
 {
-    return value(hostIterator(me));
+    return *hostIterator(me);
 }
 
 // ----------------------------------------------------------------------------
@@ -396,14 +396,14 @@ template <typename TContainer, typename TIterator, typename TSpec>
 inline typename GetValue<Iter<TContainer, AdaptorIterator<TIterator, TSpec> > >::Type
 getValue(Iter<TContainer, AdaptorIterator<TIterator, TSpec> > & me)
 {
-    return getValue(hostIterator(me));
+    return *hostIterator(me);
 }
 
 template <typename TContainer, typename TIterator, typename TSpec>
 inline typename GetValue<Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const>::Type
 getValue(Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & me)
 {
-    return getValue(hostIterator(me));
+    return *hostIterator(me);
 }
 
 // ----------------------------------------------------------------------------
@@ -415,7 +415,7 @@ inline void
 assignValue(Iter<TContainer, AdaptorIterator<TIterator, TSpec> > & me,
             TValue const & _value)
 {
-    assignValue(hostIterator(me), _value);
+    *hostIterator(me) = _value;
 }
 
 template <typename TContainer, typename TIterator, typename TSpec, typename TValue>
@@ -423,7 +423,7 @@ inline void
 assignValue(Iter<TContainer, AdaptorIterator<TIterator, TSpec> > const & me,
             TValue const & _value)
 {
-    assignValue(hostIterator(me), _value);
+    *hostIterator(me) = _value;
 }
 
 // ----------------------------------------------------------------------------
diff --git a/include/seqan/basic/iterator_base.h b/include/seqan/basic/iterator_base.h
index 64535e3..7a92d4d 100644
--- a/include/seqan/basic/iterator_base.h
+++ b/include/seqan/basic/iterator_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/iterator_concept.h b/include/seqan/basic/iterator_concept.h
index 4d040ac..78d01a3 100644
--- a/include/seqan/basic/iterator_concept.h
+++ b/include/seqan/basic/iterator_concept.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/iterator_counting.h b/include/seqan/basic/iterator_counting.h
index b7107d5..fd59687 100644
--- a/include/seqan/basic/iterator_counting.h
+++ b/include/seqan/basic/iterator_counting.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/iterator_interface.h b/include/seqan/basic/iterator_interface.h
index 3cc7c0b..d147226 100644
--- a/include/seqan/basic/iterator_interface.h
+++ b/include/seqan/basic/iterator_interface.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -183,6 +183,7 @@ struct Container
 // ---------------------------------------------------------------------------
 
 template <typename T>
+[[deprecated("Use operator*() instead.")]]
 inline typename Reference<T>::Type
 value(T & me)
 {
@@ -190,6 +191,7 @@ value(T & me)
 }
 
 template <typename T>
+[[deprecated("Use operator*() instead.")]]
 inline typename Reference<T const>::Type
 value(T const & me)
 {
@@ -201,17 +203,19 @@ value(T const & me)
 // ---------------------------------------------------------------------------
 
 template <typename T>
+[[deprecated("Use operator*() instead.")]]
 inline typename GetValue<T>::Type
 getValue(T & me)
 {
-    return value(me);
+    return *me;
 }
 
 template <typename T>
+[[deprecated("Use operator*() instead.")]]
 inline typename GetValue<T const>::Type
 getValue(T const & me)
 {
-    return value(me);
+    return *me;
 }
 
 // ---------------------------------------------------------------------------
@@ -226,20 +230,22 @@ getValue(T const & me)
 // ---------------------------------------------------------------------------
 
 template <typename T, typename TValue>
+[[deprecated("Use dereferencement and assignment instead.")]]
 inline void
 assignValue(T & me,
             TValue const & _value)
 {
-    assign(value(me), _value);
+    assign(*me, _value);
 }
 
 //const version for iterators as targets
 template <typename T, typename TValue>
+[[deprecated("Use dereferencement and assignment instead.")]]
 inline void
 assignValue(T const & me,
             TValue const & _value)
 {
-    assign(value(me), _value);
+    assign(*me, _value);
 }
 
 // ---------------------------------------------------------------------------
diff --git a/include/seqan/basic/iterator_position.h b/include/seqan/basic/iterator_position.h
index 68eec86..b400edd 100644
--- a/include/seqan/basic/iterator_position.h
+++ b/include/seqan/basic/iterator_position.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/iterator_range.h b/include/seqan/basic/iterator_range.h
index 74e7c23..eb2c80b 100644
--- a/include/seqan/basic/iterator_range.h
+++ b/include/seqan/basic/iterator_range.h
@@ -80,19 +80,19 @@ public:
     // Range Constructors
     // ------------------------------------------------------------------------
 
-   
+
     Range():
         begin(),
         end()
     {}
 
-   
+
     Range(Range const & range) :
         begin(range.begin),
         end(range.end)
     {}
 
-   
+
     Range(TIterator const & begin, TIterator const & end):
         begin(begin),
         end(end)
@@ -102,10 +102,18 @@ public:
     // Operator =
     // ------------------------------------------------------------------------
 
+    Range &
+    operator=(Range const & other)
+    {
+        begin = other.begin;
+        end = other.end;
+        return *this;
+    }
+
     template <typename TOtherContainer>
-   
+
     Range &
-    operator= (TOtherContainer &other)
+    operator= (TOtherContainer & other)
     {
         assign(*this, other);
         return *this;
@@ -116,7 +124,7 @@ public:
     // ------------------------------------------------------------------------
 
     template <typename TPos>
-   
+
     typename Reference<Range>::Type
     operator[] (TPos pos)
     {
@@ -124,7 +132,7 @@ public:
     }
 
     template <typename TPos>
-   
+
     typename GetValue<Range>::Type
     operator[] (TPos pos) const
     {
@@ -321,6 +329,14 @@ assign(Range<TIterator> &range, TContainer &cont)
     range.end = end(cont, Standard());
 }
 
+template <typename TIterator, typename TContainer>
+inline void
+assign(Range<TIterator> &range, TContainer const &cont)
+{
+    range.begin = begin(cont, Standard());
+    range.end = end(cont, Standard());
+}
+
 // ----------------------------------------------------------------------------
 // toRange()
 // ----------------------------------------------------------------------------
diff --git a/include/seqan/basic/iterator_zip.h b/include/seqan/basic/iterator_zip.h
index 4e1cc39..b22089d 100644
--- a/include/seqan/basic/iterator_zip.h
+++ b/include/seqan/basic/iterator_zip.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/macro_deprecated.h b/include/seqan/basic/macro_deprecated.h
index 9fc5a0c..d96b93b 100644
--- a/include/seqan/basic/macro_deprecated.h
+++ b/include/seqan/basic/macro_deprecated.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/math_functions.h b/include/seqan/basic/math_functions.h
index c88c6c6..0f1bf35 100644
--- a/include/seqan/basic/math_functions.h
+++ b/include/seqan/basic/math_functions.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/math_log_space_value.h b/include/seqan/basic/math_log_space_value.h
index a945003..a245fc3 100644
--- a/include/seqan/basic/math_log_space_value.h
+++ b/include/seqan/basic/math_log_space_value.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -140,7 +140,7 @@ class LogProb
     inline
     operator TValue2() const
     {
-        return _convert<TValue2>(typename IsInteger<TValue2>::Type());
+        return _convert<TValue2>(typename Is<IntegerConcept<TValue2> >::Type());
     }
 /*
     inline
diff --git a/include/seqan/basic/metaprogramming_control.h b/include/seqan/basic/metaprogramming_control.h
index 79f0672..cdfbfca 100644
--- a/include/seqan/basic/metaprogramming_control.h
+++ b/include/seqan/basic/metaprogramming_control.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/metaprogramming_enable_if.h b/include/seqan/basic/metaprogramming_enable_if.h
index f44a4fa..55caed3 100644
--- a/include/seqan/basic/metaprogramming_enable_if.h
+++ b/include/seqan/basic/metaprogramming_enable_if.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/metaprogramming_logic.h b/include/seqan/basic/metaprogramming_logic.h
index 3bf70b8..b4ff8b5 100644
--- a/include/seqan/basic/metaprogramming_logic.h
+++ b/include/seqan/basic/metaprogramming_logic.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/metaprogramming_math.h b/include/seqan/basic/metaprogramming_math.h
index b7eab12..634c9ea 100644
--- a/include/seqan/basic/metaprogramming_math.h
+++ b/include/seqan/basic/metaprogramming_math.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // Copyright (c) 2013 NVIDIA Corporation
 // All rights reserved.
 //
diff --git a/include/seqan/basic/metaprogramming_type.h b/include/seqan/basic/metaprogramming_type.h
index 7543e91..e5f3023 100644
--- a/include/seqan/basic/metaprogramming_type.h
+++ b/include/seqan/basic/metaprogramming_type.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/metaprogramming_type_algebra.h b/include/seqan/basic/metaprogramming_type_algebra.h
index 3eb2780..1af616e 100644
--- a/include/seqan/basic/metaprogramming_type_algebra.h
+++ b/include/seqan/basic/metaprogramming_type_algebra.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/pair_base.h b/include/seqan/basic/pair_base.h
index da173ad..e3132a9 100644
--- a/include/seqan/basic/pair_base.h
+++ b/include/seqan/basic/pair_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/pair_bit_compressed.h b/include/seqan/basic/pair_bit_compressed.h
index 6d7e5d5..3c0a6d5 100644
--- a/include/seqan/basic/pair_bit_compressed.h
+++ b/include/seqan/basic/pair_bit_compressed.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -86,16 +86,23 @@ struct Pair<T1, T2, BitPacked<BITSIZE1, BITSIZE2> >
     // Constructors
     // ------------------------------------------------------------------------
 
-    inline Pair() : i1(T1()), i2(T2()) {}
-
-    inline Pair(Pair const & _p) : i1(_p.i1), i2(_p.i2) {}
+    // bitfield member cannot have an in-class initializer, thus
+    // `inline Pair() = default;` is not possible
+    // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65132
+    inline Pair() : i1(T1{}), i2(T2{}) {};
+    inline Pair(Pair const &) = default;
+    inline Pair(Pair &&) = default;
+    inline Pair & operator=(Pair const &) = default;
+    inline Pair & operator=(Pair &&) = default;
+    inline ~Pair() = default;
 
     inline Pair(T1 const & _i1, T2 const & _i2) : i1(_i1), i2(_i2) {}
 
     template <typename T1_, typename T2_, typename TSpec__>
     // TODO(holtgrew): explicit?
-    inline Pair(Pair<T1_, T2_, TSpec__> const &_p)
-            : i1(getValueI1(_p)), i2(getValueI2(_p)) {}
+    inline Pair(Pair<T1_, T2_, TSpec__> const &_p) :
+        i1(getValueI1(_p)), i2(getValueI2(_p))
+    {}
 };
 #pragma pack(pop)
 
diff --git a/include/seqan/basic/pair_packed.h b/include/seqan/basic/pair_packed.h
index 429e54f..6af97e6 100644
--- a/include/seqan/basic/pair_packed.h
+++ b/include/seqan/basic/pair_packed.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -78,24 +78,43 @@ struct Pair<T1, T2, Pack>
     // ------------------------------------------------------------------------
     // Members
     // ------------------------------------------------------------------------
-
-    T1 i1;
-    T2 i2;
+    T1 i1{};
+    T2 i2{};
 
     // ------------------------------------------------------------------------
     // Constructors
     // ------------------------------------------------------------------------
 
-    Pair() : i1(T1()), i2(T2()) {}
-
-    Pair(Pair const &_p) : i1(_p.i1), i2(_p.i2) {}
+    // Pair() = default; does not work on gcc4.9, it issues warnings if T1/T2
+    // have no proper default constructor. >=gcc5.0 reports no warnings.
+    // Caused by yara_indexer build, demo_tutorial_indices_base and
+    // demo_tutorial_index_iterators_index_bidirectional_search.
+#if defined(COMPILER_GCC) && (__GNUC__ <= 4)
+    Pair() : i1(T1()), i2(T2()) {};
+#else
+    Pair() = default;
+#endif
+
+    // NOTE(marehr) intel compiler bug in 17.x and 18.x: defaulted copy-constructor
+    // in classes with `#pragma pack(push, 1)` seg-faults. This leads to a
+    // seg-fault in yara-mapper (app test case yara).
+#if defined(COMPILER_LINTEL) || defined(COMPILER_WINTEL)
+    Pair(Pair const & p) : i1(p.i1), i2(p.i2) {};
+#else
+    Pair(Pair const &) = default;
+#endif
+    Pair(Pair &&) = default;
+    ~Pair() = default;
+    Pair & operator=(Pair const &) = default;
+    Pair & operator=(Pair &&) = default;
 
     Pair(T1 const & _i1, T2 const & _i2) : i1(_i1), i2(_i2) {}
 
     template <typename T1_, typename T2_, typename TSpec__>
     // TODO(holtgrew): explicit?
-    Pair(Pair<T1_, T2_, TSpec__> const &_p)
-            : i1(getValueI1(_p)), i2(getValueI2(_p)) {}
+    Pair(Pair<T1_, T2_, TSpec__> const &_p) :
+        i1(getValueI1(_p)), i2(getValueI2(_p))
+    {}
 };
 #pragma pack(pop)
 
diff --git a/include/seqan/basic/profiling.h b/include/seqan/basic/profiling.h
index 63d1a20..fdb99df 100644
--- a/include/seqan/basic/profiling.h
+++ b/include/seqan/basic/profiling.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -37,6 +37,7 @@
 // TODO(holtgrew): This could use some cleanup.
 
 #include <ctime>
+#include <chrono>
 
 //SEQAN_NO_GENERATED_FORWARDS: no forwards are generated for this file
 
@@ -240,42 +241,11 @@ namespace seqan
  *
  * @see cpuTime
  */
-
-    #ifdef STDLIB_VS
-//        inline _proFloat sysTime() { return GetTickCount() * 1e-3; }
-        inline _proFloat sysTime() { return ( (_proFloat) clock() ) / CLOCKS_PER_SEC; }
-    #else
-
-        #include <unistd.h>
-        #if _POSIX_TIMERS > 0
-            #ifndef SEQAN_USE_CLOCKGETTIME
-            #define SEQAN_USE_CLOCKGETTIME
-            #endif
-        #endif
-
-        #ifndef SEQAN_USE_CLOCKGETTIME
-        /* some systems e.g. darwin have no clock_gettime */
-
-            #include <sys/time.h>
-
-            inline _proFloat sysTime() {
-                struct timeval tp;
-                gettimeofday(&tp, NULL);
-                return tp.tv_sec + tp.tv_usec * 1e-6;
-            }
-
-        #else
-
-            inline _proFloat sysTime() {
-                struct timespec tp;
-                clock_gettime(CLOCK_MONOTONIC, &tp);
-                return tp.tv_sec + tp.tv_nsec * 1e-9;
-            }
-
-        #endif
-
-    #endif
-
+    inline _proFloat sysTime()
+    {
+        return static_cast<_proFloat>(std::chrono::system_clock::now().time_since_epoch() /
+                                      std::chrono::duration<_proFloat>(1));
+    }
 
     struct ProfileFile_ {
 //IOREV not generic, uses FILE* instead of File() and custom IO
diff --git a/include/seqan/basic/property_map_concept.h b/include/seqan/basic/property_map_concept.h
index 24671d2..9824c17 100644
--- a/include/seqan/basic/property_map_concept.h
+++ b/include/seqan/basic/property_map_concept.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/proxy_base.h b/include/seqan/basic/proxy_base.h
index 446bb74..f2e2744 100644
--- a/include/seqan/basic/proxy_base.h
+++ b/include/seqan/basic/proxy_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -429,7 +429,7 @@ operator>>(TStream & strm,
     typedef typename Value<TProxy>::Type TValue;
     TValue temp;
     strm >> temp;
-    assignValue(iter(proxy), temp);
+    *iter(proxy) = temp;
     return strm;
 }
 
@@ -442,7 +442,7 @@ operator>>(TStream & strm,
     typedef typename Value<TProxy>::Type TValue;
     TValue temp;
     strm >> temp;
-    assignValue(iter(proxy), temp);
+    *iter(proxy) = temp;
     return strm;
 }
 
diff --git a/include/seqan/basic/proxy_iterator.h b/include/seqan/basic/proxy_iterator.h
index 2d3d27e..25deec9 100644
--- a/include/seqan/basic/proxy_iterator.h
+++ b/include/seqan/basic/proxy_iterator.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/test_system.h b/include/seqan/basic/test_system.h
index 00fd27b..839b077 100644
--- a/include/seqan/basic/test_system.h
+++ b/include/seqan/basic/test_system.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/triple_base.h b/include/seqan/basic/triple_base.h
index 93bfc3b..ca76446 100644
--- a/include/seqan/basic/triple_base.h
+++ b/include/seqan/basic/triple_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/triple_packed.h b/include/seqan/basic/triple_packed.h
index f9b2b6e..e1f5456 100644
--- a/include/seqan/basic/triple_packed.h
+++ b/include/seqan/basic/triple_packed.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/tuple_base.h b/include/seqan/basic/tuple_base.h
index 6cf1085..f0bceac 100644
--- a/include/seqan/basic/tuple_base.h
+++ b/include/seqan/basic/tuple_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // Copyright (c) 2013 NVIDIA Corporation
 // All rights reserved.
 //
diff --git a/include/seqan/basic/tuple_bit_compressed.h b/include/seqan/basic/tuple_bit_compressed.h
index 3a84fa6..2e5fcf4 100644
--- a/include/seqan/basic/tuple_bit_compressed.h
+++ b/include/seqan/basic/tuple_bit_compressed.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/basic/volatile_ptr.h b/include/seqan/basic/volatile_ptr.h
index bacb25d..72edae1 100644
--- a/include/seqan/basic/volatile_ptr.h
+++ b/include/seqan/basic/volatile_ptr.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/bed_io.h b/include/seqan/bed_io.h
index ddb3ddd..13cf206 100644
--- a/include/seqan/bed_io.h
+++ b/include/seqan/bed_io.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/bed_io/bed_file.h b/include/seqan/bed_io/bed_file.h
index eb7af74..e800c22 100644
--- a/include/seqan/bed_io/bed_file.h
+++ b/include/seqan/bed_io/bed_file.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/bed_io/bed_record.h b/include/seqan/bed_io/bed_record.h
index 0902fd1..d31c19e 100644
--- a/include/seqan/bed_io/bed_record.h
+++ b/include/seqan/bed_io/bed_record.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -89,7 +89,7 @@ typedef Tag<Bed12_> Bed12;
  * @var CharString BedRecord::ref;
  * @brief Name of the interval's reference name.
  *
- * @var int32_t BedRecord::beginPosition;
+ * @var int32_t BedRecord::beginPos;
  * @brief Begin position on the reference.
  *
  * @var int32_t BedRecord::rID;
@@ -99,7 +99,7 @@ typedef Tag<Bed12_> Bed12;
  * @brief Constant for invalid references.
  * @signature static const int32_t BedRecord::INVALID_REFID = -1;
  *
- * @var int32_t BedRecord::endPosition;
+ * @var int32_t BedRecord::endPos;
  * @brief End position on the reference.
  *
  * @var int32_t BedRecord::INVALID_POS;
diff --git a/include/seqan/bed_io/read_bed.h b/include/seqan/bed_io/read_bed.h
index 7ca1e50..78f82da 100644
--- a/include/seqan/bed_io/read_bed.h
+++ b/include/seqan/bed_io/read_bed.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/bed_io/write_bed.h b/include/seqan/bed_io/write_bed.h
index fc9d50f..345c0a5 100644
--- a/include/seqan/bed_io/write_bed.h
+++ b/include/seqan/bed_io/write_bed.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/blast.h b/include/seqan/blast.h
index 851f73b..18925b7 100644
--- a/include/seqan/blast.h
+++ b/include/seqan/blast.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/blast/blast_base.h b/include/seqan/blast/blast_base.h
index 3d6c502..b14fa48 100644
--- a/include/seqan/blast/blast_base.h
+++ b/include/seqan/blast/blast_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/blast/blast_io_context.h b/include/seqan/blast/blast_io_context.h
index 1ef4ad5..ec477ab 100644
--- a/include/seqan/blast/blast_io_context.h
+++ b/include/seqan/blast/blast_io_context.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/blast/blast_record.h b/include/seqan/blast/blast_record.h
index 2e7e3ad..50cb74d 100644
--- a/include/seqan/blast/blast_record.h
+++ b/include/seqan/blast/blast_record.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/blast/blast_report_out.h b/include/seqan/blast/blast_report_out.h
index 59c45f7..8b8068f 100644
--- a/include/seqan/blast/blast_report_out.h
+++ b/include/seqan/blast/blast_report_out.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/blast/blast_statistics.h b/include/seqan/blast/blast_statistics.h
index 98624ac..d8897bf 100644
--- a/include/seqan/blast/blast_statistics.h
+++ b/include/seqan/blast/blast_statistics.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -1117,9 +1117,11 @@ computeEValue(uint64_t rawScore,
 /*!
  * @fn BlastMatch#computeEValue
  * @brief Compute the E-Value for a @link BlastMatch @endlink.
- * @signature double computeEValue(blastMatch, context);
+ * @signature double computeEValue(blastMatch, qLength, context);
+ * [[deprecated]] double computeEValue(blastMatch, context);
  *
  * @param[in,out]   blastMatch  A @link BlastMatch @endlink that has a valid align member.
+ * @param[in]       qLength     The length of the query sequence (pass @link BlastRecord::qLength @endlink).
  * @param[in,out]   context     A @link BlastIOContext @endlink with parameters and buffers.
  *
  * @return double blastMatch. at link BlastMatch::eValue @endlink after computation
@@ -1132,7 +1134,7 @@ computeEValue(uint64_t rawScore,
  * <li> blastMatch. at link BlastMatch::alignStats @endlink. at link AlignmentStats::alignmentScore @endlink (if you have valid
  * alignRow-members (@link BlastMatch::alignRow0 @endlink, @link BlastMatch::alignRow1 @endlink), you can call
  * @link BlastMatch#computeAlignmentStats @endlink to compute the stats member). </li>
- * <li> blastMatch. at link BlastMatch::qLength @endlink </li>
+ * <li> blastMatch. at link BlastMatch::qLength @endlink (only in the deprecated interface)</li>
  * <li> context. at link BlastIOContext::dbTotalLength @endlink </li>
  *
  * Note, that in contrast to the general interface (@link BlastScoringScheme#computeEValue @endlink), this interface
@@ -1145,10 +1147,13 @@ template <typename TBlastMatch,
           BlastTabularSpec h>
 inline double
 computeEValue(TBlastMatch & match,
+              uint64_t ql,
               BlastIOContext<TScore, p, h> & context)
 {
+    SEQAN_ASSERT_GT(ql, 0ull);
+
     // convert to 64bit and divide for translated sequences
-    uint64_t ql = match.qLength / (qIsTranslated(context.blastProgram) ? 3 : 1);
+    ql = ql / (qIsTranslated(context.blastProgram) ? 3 : 1);
     // length adjustment not yet computed
     if (context._cachedLengthAdjustments.find(ql) == context._cachedLengthAdjustments.end())
         context._cachedLengthAdjustments[ql] = _lengthAdjustment(context.dbTotalLength, ql, context.scoringScheme);
@@ -1162,6 +1167,18 @@ computeEValue(TBlastMatch & match,
     return match.eValue;
 }
 
+template <typename TBlastMatch,
+          typename TScore,
+          BlastProgram p,
+          BlastTabularSpec h>
+[[deprecated("Use the interface with an explicit query length parameter instead (use the record's member).")]]
+inline double
+computeEValue(TBlastMatch & match,
+              BlastIOContext<TScore, p, h> & context)
+{
+    return computeEValue(match, match.qLength, context);
+}
+
 }
 
 #endif // ndef __BLAST_STATISTICS_H__
diff --git a/include/seqan/blast/blast_tabular.h b/include/seqan/blast/blast_tabular.h
index 0a487ee..e28fa22 100644
--- a/include/seqan/blast/blast_tabular.h
+++ b/include/seqan/blast/blast_tabular.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/blast/blast_tabular_in.h b/include/seqan/blast/blast_tabular_in.h
index 9b508f3..4d52859 100644
--- a/include/seqan/blast/blast_tabular_in.h
+++ b/include/seqan/blast/blast_tabular_in.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/blast/blast_tabular_lowlevel.h b/include/seqan/blast/blast_tabular_lowlevel.h
index d658210..4aea518 100644
--- a/include/seqan/blast/blast_tabular_lowlevel.h
+++ b/include/seqan/blast/blast_tabular_lowlevel.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -322,4 +322,4 @@ writeMatch(TFwdIterator & stream,
 
 }
 
-#endif // SEQAN_BLAST_BLAST_TABULAR_LOWLEVEL_H_
\ No newline at end of file
+#endif // SEQAN_BLAST_BLAST_TABULAR_LOWLEVEL_H_
diff --git a/include/seqan/blast/blast_tabular_out.h b/include/seqan/blast/blast_tabular_out.h
index 37f5b22..a75c6c2 100644
--- a/include/seqan/blast/blast_tabular_out.h
+++ b/include/seqan/blast/blast_tabular_out.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/consensus.h b/include/seqan/consensus.h
index 45e3128..233228f 100644
--- a/include/seqan/consensus.h
+++ b/include/seqan/consensus.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/consensus/consensus_aligner.h b/include/seqan/consensus/consensus_aligner.h
index cc77577..7d02a3a 100644
--- a/include/seqan/consensus/consensus_aligner.h
+++ b/include/seqan/consensus/consensus_aligner.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/consensus/consensus_aligner_interface.h b/include/seqan/consensus/consensus_aligner_interface.h
index af61fd5..0d92e73 100644
--- a/include/seqan/consensus/consensus_aligner_interface.h
+++ b/include/seqan/consensus/consensus_aligner_interface.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/consensus/consensus_alignment_options.h b/include/seqan/consensus/consensus_alignment_options.h
index 2ec5f1b..e0101c6 100644
--- a/include/seqan/consensus/consensus_alignment_options.h
+++ b/include/seqan/consensus/consensus_alignment_options.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/consensus/consensus_base.h b/include/seqan/consensus/consensus_base.h
index b71c368..bc55a71 100644
--- a/include/seqan/consensus/consensus_base.h
+++ b/include/seqan/consensus/consensus_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -1354,7 +1354,7 @@ return;
 //
 //    // Parse the file and convert the internal ids
 //    TPos maxPos = 0;
-//    TPos minPos = MaxValue<TPos>::VALUE;
+//    TPos minPos = std::numeric_limits<TPos>::max();
 //    TId count = 0;
 //    if (atEnd(reader))
 //        return false;
diff --git a/include/seqan/consensus/consensus_builder.h b/include/seqan/consensus/consensus_builder.h
index 8d6b27a..765a2d0 100644
--- a/include/seqan/consensus/consensus_builder.h
+++ b/include/seqan/consensus/consensus_builder.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/consensus/consensus_library.h b/include/seqan/consensus/consensus_library.h
index 433ed84..49ff69d 100644
--- a/include/seqan/consensus/consensus_library.h
+++ b/include/seqan/consensus/consensus_library.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -483,7 +483,7 @@ appendSegmentMatches(StringSet<TString, TSpec> const & str,
     typedef typename Iterator<TBegEndPos const, Standard>::Type TBegEndIter;
     TBegEndIter begEndIt = begin(begEndPos, Standard());
     TBegEndIter begEndItEnd = end(begEndPos, Standard());
-    TSize minVal = maxValue<TSize>();
+    TSize minVal = std::numeric_limits<TSize>::max();
     TSize maxVal = 0;
     for(;begEndIt != begEndItEnd; ++begEndIt) {
         TSize pos1 = begEndIt->i1;
diff --git a/include/seqan/consensus/consensus_realign.h b/include/seqan/consensus/consensus_realign.h
index c970e74..69c1bac 100644
--- a/include/seqan/consensus/consensus_realign.h
+++ b/include/seqan/consensus/consensus_realign.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -590,7 +590,7 @@ reAlign(FragmentStore<TSpec, TConfig> & fragStore,
     // Copy all reads belonging to this contig and reverse complement them if necessary.
     TAlignedReadStore contigReads;  // TODO(holtgrew): Rather contigAlignedReads?
     TReadPos maxPos = 0;
-    TReadPos minPos = MaxValue<TReadPos>::VALUE;
+    TReadPos minPos = std::numeric_limits<TReadPos>::max();
     for (; alignIt != alignItEnd; ++alignIt) {
         if (alignIt->beginPos > alignIt->endPos) {
             reverseComplement(fragStore.readSeqStore[alignIt->readId]);
diff --git a/include/seqan/consensus/consensus_score.h b/include/seqan/consensus/consensus_score.h
index f33684d..c5a8bb4 100644
--- a/include/seqan/consensus/consensus_score.h
+++ b/include/seqan/consensus/consensus_score.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/consensus/overlap_info_computation.h b/include/seqan/consensus/overlap_info_computation.h
index 5250123..1bbbc94 100644
--- a/include/seqan/consensus/overlap_info_computation.h
+++ b/include/seqan/consensus/overlap_info_computation.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -184,7 +184,7 @@ inline OverlapInfo_ OverlapInfoComputation_<TFragmentStore>::computeOverlapInfo(
 
     AlignConfig<true, true, true, true> alignConfig;
 
-    if (lDiag != seqan::minValue<int>() && uDiag != seqan::minValue<int>())
+    if (lDiag != std::numeric_limits<int>::min() && uDiag != std::numeric_limits<int>::min())
     {
         if (options.verbosity >= 2)
             std::cerr << "global alignment with bands " << lDiag << ", " << uDiag << "\n";
@@ -244,7 +244,7 @@ inline void OverlapInfoComputation_<TFragmentStore>::buildGlobalAlignmentOverlap
         for (unsigned j = i + 1; j < length(store.readStore); ++j)
         {
             OverlapInfo_ info = computeOverlapInfo(i, j,
-                                                   seqan::minValue<int>(), seqan::minValue<int>());
+                                                   std::numeric_limits<int>::min(), std::numeric_limits<int>::min());
             int ovlLen = length(store.readSeqStore[info.seq0]) - info.pos1;
             // if (ovlLen < options.overlapMinLength || 100.0 * info.numErrors / ovlLen > options.overlapMaxErrorRate)
             // {
diff --git a/include/seqan/consensus/overlapper.h b/include/seqan/consensus/overlapper.h
index 52cf68a..7b58bc3 100644
--- a/include/seqan/consensus/overlapper.h
+++ b/include/seqan/consensus/overlapper.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -253,7 +253,7 @@ Overlap_ Overlapper_<TFragments, TSequence>::overlapFromAlignment(
     unsigned len1 = length(strings[1]);
 
     typedef int TPos;
-    std::pair<TPos, TPos> range0(seqan::maxValue<TPos>(), seqan::minValue<TPos>());
+    std::pair<TPos, TPos> range0(std::numeric_limits<TPos>::max(), std::numeric_limits<TPos>::min());
     std::pair<TPos, TPos> range1 = range0;
     int errors = 0;
     typedef typename Iterator<TFragments, Standard>::Type TFragmentsIter;
diff --git a/include/seqan/file.h b/include/seqan/file.h
index 95520e4..c9ace72 100644
--- a/include/seqan/file.h
+++ b/include/seqan/file.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/file/file_base.h b/include/seqan/file/file_base.h
index 8852d03..7c5f94f 100644
--- a/include/seqan/file/file_base.h
+++ b/include/seqan/file/file_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -597,6 +597,7 @@ inline typename Position< File<TSpec> >::Type seek(File<TSpec> &me, TPos const f
 
     // deprecated
     template < typename TSpec, typename AsyncRequest >
+    [[deprecated]]
     inline void release(File<TSpec> &, AsyncRequest &)
     {
 //IOREV _noop_ see general discussion about AsynRequest
diff --git a/include/seqan/file/file_cstyle.h b/include/seqan/file/file_cstyle.h
index aa1fc7a..7bccaed 100644
--- a/include/seqan/file/file_cstyle.h
+++ b/include/seqan/file/file_cstyle.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/file/file_forwards.h b/include/seqan/file/file_forwards.h
index 88ce202..3cd9898 100644
--- a/include/seqan/file/file_forwards.h
+++ b/include/seqan/file/file_forwards.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/file/file_interface.h b/include/seqan/file/file_interface.h
index 3df0245..9a337d0 100644
--- a/include/seqan/file/file_interface.h
+++ b/include/seqan/file/file_interface.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/file/file_mapping.h b/include/seqan/file/file_mapping.h
index 61b9c68..2cfd32b 100644
--- a/include/seqan/file/file_mapping.h
+++ b/include/seqan/file/file_mapping.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // Copyright (c) 2013 NVIDIA Corporation
 // All rights reserved.
 //
diff --git a/include/seqan/file/file_page.h b/include/seqan/file/file_page.h
index 177f6c3..3fe238f 100644
--- a/include/seqan/file/file_page.h
+++ b/include/seqan/file/file_page.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -358,7 +358,7 @@ struct MMap;
         Buffer():
             TBase(),
             dirty(false),
-            pageNo(MaxValue<unsigned>::VALUE),
+            pageNo(std::numeric_limits<unsigned>::max()),
             status(READY),
             next(NULL) {}
 
@@ -505,7 +505,7 @@ struct MMap;
 
         PageFrame():
             TBase(),
-            pageNo(MaxValue<unsigned>::VALUE),
+            pageNo(std::numeric_limits<unsigned>::max()),
             next(NULL) {}
     };
 */
diff --git a/include/seqan/file/string_external.h b/include/seqan/file/string_external.h
index 19abcf4..af967c9 100644
--- a/include/seqan/file/string_external.h
+++ b/include/seqan/file/string_external.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/file/string_mmap.h b/include/seqan/file/string_mmap.h
index b4fb7ca..4b35239 100644
--- a/include/seqan/file/string_mmap.h
+++ b/include/seqan/file/string_mmap.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/find.h b/include/seqan/find.h
index c2e6ac2..e99fcc0 100644
--- a/include/seqan/find.h
+++ b/include/seqan/find.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/find/find_abndm.h b/include/seqan/find/find_abndm.h
index d244771..639395d 100644
--- a/include/seqan/find/find_abndm.h
+++ b/include/seqan/find/find_abndm.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/find/find_ahocorasick.h b/include/seqan/find/find_ahocorasick.h
index 47f21fa..0dbcc02 100644
--- a/include/seqan/find/find_ahocorasick.h
+++ b/include/seqan/find/find_ahocorasick.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/find/find_base.h b/include/seqan/find/find_base.h
index 2792722..c674b32 100644
--- a/include/seqan/find/find_base.h
+++ b/include/seqan/find/find_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/find/find_begin.h b/include/seqan/find/find_begin.h
index 7647195..5325017 100644
--- a/include/seqan/find/find_begin.h
+++ b/include/seqan/find/find_begin.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/find/find_bndm.h b/include/seqan/find/find_bndm.h
index 093f5e7..54e52c9 100644
--- a/include/seqan/find/find_bndm.h
+++ b/include/seqan/find/find_bndm.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/find/find_bom.h b/include/seqan/find/find_bom.h
index e499646..48453b1 100644
--- a/include/seqan/find/find_bom.h
+++ b/include/seqan/find/find_bom.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -98,6 +98,7 @@ struct Trie {}; //Trie Tag => "BTM"
 template <typename TSpec = Oracle>
 struct Bfam; //backward factor automaton searching
 
+[[deprecated]]
 typedef Bfam<Oracle> BomAlgo; //deprecated, still there for compatibility reasons
 
 //////////////////////////////////////////////////////////////////////////////
diff --git a/include/seqan/find/find_hamming_simple.h b/include/seqan/find/find_hamming_simple.h
index e0c50f5..ff37289 100644
--- a/include/seqan/find/find_hamming_simple.h
+++ b/include/seqan/find/find_hamming_simple.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/find/find_horspool.h b/include/seqan/find/find_horspool.h
index 9607bf6..6ce6eb6 100644
--- a/include/seqan/find/find_horspool.h
+++ b/include/seqan/find/find_horspool.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/find/find_lambda.h b/include/seqan/find/find_lambda.h
index 2aa1787..8442b85 100644
--- a/include/seqan/find/find_lambda.h
+++ b/include/seqan/find/find_lambda.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/find/find_multi.h b/include/seqan/find/find_multi.h
index d84e86a..d78a857 100644
--- a/include/seqan/find/find_multi.h
+++ b/include/seqan/find/find_multi.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/find/find_multiple_bfam.h b/include/seqan/find/find_multiple_bfam.h
index ffd2111..91a81ef 100644
--- a/include/seqan/find/find_multiple_bfam.h
+++ b/include/seqan/find/find_multiple_bfam.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -76,6 +76,7 @@ namespace seqan
 template <typename TSpec = Oracle>
 struct MultiBfam; //multiple backward factor automaton searching
 
+[[deprecated]]
 typedef MultiBfam<Oracle> SBomAlgo; //deprecated
 
 //////////////////////////////////////////////////////////////////////////////
diff --git a/include/seqan/find/find_multiple_shiftand.h b/include/seqan/find/find_multiple_shiftand.h
index e21fe9d..3512526 100644
--- a/include/seqan/find/find_multiple_shiftand.h
+++ b/include/seqan/find/find_multiple_shiftand.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/find/find_myers_ukkonen.h b/include/seqan/find/find_myers_ukkonen.h
index 3d30e1b..81e6945 100644
--- a/include/seqan/find/find_myers_ukkonen.h
+++ b/include/seqan/find/find_myers_ukkonen.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -833,9 +833,9 @@ _myersAdjustBitmask(PatternState_<TNeedle, Myers<AlignTextBanded<TSpec, TFinderC
             state.bitMasks[ordValue(value)] |= (TWord)1 << (BitsPerValue<TWord>::VALUE - 1);
     }
 
-    if (IsSameType<TFinderCSP, NMatchesAll_>::VALUE)
+    SEQAN_IF_CONSTEXPR (IsSameType<TFinderCSP, NMatchesAll_>::VALUE)
         state.bitMasks[ordValue(unknownValue<TValue>())] |= (TWord)1 << (BitsPerValue<TWord>::VALUE - 1);
-    if (IsSameType<TFinderCSP, NMatchesNone_>::VALUE)
+    SEQAN_IF_CONSTEXPR (IsSameType<TFinderCSP, NMatchesNone_>::VALUE)
         state.bitMasks[ordValue(unknownValue<TValue>())] &= ~((TWord)1 << (BitsPerValue<TWord>::VALUE - 1));
 }
 
@@ -904,7 +904,7 @@ _myersGetBitmask(PatternState_<TNeedle, Myers<AlignTextBanded<TSpec, TFinderCSP,
     else
         res = 0;
 
-    if (IsSameType<TPatternCSP, NMatchesAll_>::VALUE)
+    SEQAN_IF_CONSTEXPR (IsSameType<TPatternCSP, NMatchesAll_>::VALUE)
     {
         ord = ordValue(unknownValue<TValue>());
         x = shift - state.shift[ord];
@@ -960,7 +960,7 @@ _patternInitSmallStateBanded(
     //  VP = 100...      VP = 111...
     //
 
-    TWord VP = (MyersUkkonenHP0_<TSpec>::VALUE == 1)? (TWord)1 << ((int)BitsPerValue<TWord>::VALUE-1): maxValue<TWord>(); // HP[0]==1 <-> global, HP[0]==0 <-> local
+    TWord VP = (MyersUkkonenHP0_<TSpec>::VALUE == 1)? (TWord)1 << ((int)BitsPerValue<TWord>::VALUE-1): std::numeric_limits<TWord>::max(); // HP[0]==1 <-> global, HP[0]==0 <-> local
     TWord VN = 0;
 
     // Errors are counted along the lowest diagonal and the
@@ -1047,7 +1047,7 @@ _patternInitSmallStateBanded(
 
         // adjust bitmasks (errors = number of needle chars to preprocess)
         for (; shift < errors; ++ndlIter, ++shift)
-            _myersAdjustBitmask(state, getValue(ndlIter), shift, typename MyersSmallAlphabet_<TValue>::Type());
+            _myersAdjustBitmask(state, *ndlIter, shift, typename MyersSmallAlphabet_<TValue>::Type());
 
         // initialise left column with
         //
@@ -1073,7 +1073,7 @@ _patternInitSmallStateBanded(
         //////////////////////////////////////////////////////////////////
 
         // adjust bitmask
-        _myersAdjustBitmask(state, getValue(ndlIter), shift, typename MyersSmallAlphabet_<TValue>::Type());
+        _myersAdjustBitmask(state, *ndlIter, shift, typename MyersSmallAlphabet_<TValue>::Type());
 
         /////////////////////////
         // DIAGONAL MYERS CORE
@@ -1301,7 +1301,7 @@ inline bool _findMyersLargePatterns (TFinder & finder,
         if ((largeState.scoreMask == largePattern.finalScoreMask) && (largeState.lastBlock == largePattern.blockCount - 1))
         {
             _setFinderEnd(finder);
-            if (IsSameType<TSpec, FindPrefix>::VALUE)
+            SEQAN_IF_CONSTEXPR (IsSameType<TSpec, FindPrefix>::VALUE)
             {
                 _setFinderLength(finder, endPosition(finder));
             }
@@ -1363,14 +1363,14 @@ _findMyersSmallPatterns(
         if (state.errors <= state.maxErrors)
         {
             _setFinderEnd(finder);
-            if (IsSameType<TSpec, FindPrefix>::VALUE)
+            SEQAN_IF_CONSTEXPR (IsSameType<TSpec, FindPrefix>::VALUE)
             {
                 _setFinderLength(finder, endPosition(finder));
             }
             return true;
         }
         //
-        // if (IsSameType<TSpec, FindPrefix>::VALUE)
+        // SEQAN_IF_CONSTEXPR (IsSameType<TSpec, FindPrefix>::VALUE)
         // {//limit haystack length during prefix search
         //
         // }
@@ -1481,7 +1481,7 @@ _findMyersSmallPatternsBanded(
                 state.VN0 = VN;
                 state.errors = errors;
                 _setFinderEnd(finder);
-                if (IsSameType<TSpec, FindPrefix>::VALUE)
+                SEQAN_IF_CONSTEXPR (IsSameType<TSpec, FindPrefix>::VALUE)
                 {
                     _setFinderLength(finder, endPosition(finder));
                 }
@@ -1542,7 +1542,7 @@ inline bool find (TFinder & finder,
         {
             goPrevious(finder);
             _setFinderEnd(finder);
-            if (IsSameType<TSpec, FindPrefix>::VALUE)
+            SEQAN_IF_CONSTEXPR (IsSameType<TSpec, FindPrefix>::VALUE)
             {
                 _setFinderLength(finder, endPosition(finder));
             }
@@ -1581,7 +1581,7 @@ inline bool find (TFinder & finder,
     typedef typename Haystack<TFinder>::Type THaystack;
     typedef typename Size<THaystack>::Type TSize;
 
-    TSize prefix_begin_position; //for prefix search: the position where the prefix begins
+    SEQAN_UNUSED TSize prefix_begin_position; //for prefix search: the position where the prefix begins
 
     if (empty(finder))
     {
@@ -1602,7 +1602,7 @@ inline bool find (TFinder & finder,
 
     TSize haystack_length = length(container(finder));
     // limit search width for prefix search
-    if (IsSameType<TSpec, FindPrefix>::VALUE)
+    SEQAN_IF_CONSTEXPR (IsSameType<TSpec, FindPrefix>::VALUE)
     {
         TSize maxlen = prefix_begin_position + pattern.needleSize - scoreLimit(state) + 1;
         if (haystack_length > maxlen)
diff --git a/include/seqan/find/find_pattern_base.h b/include/seqan/find/find_pattern_base.h
index af4f4ef..f0ce4c4 100644
--- a/include/seqan/find/find_pattern_base.h
+++ b/include/seqan/find/find_pattern_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/find/find_pex.h b/include/seqan/find/find_pex.h
index ea4a4fa..b762a60 100644
--- a/include/seqan/find/find_pex.h
+++ b/include/seqan/find/find_pex.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/find/find_score.h b/include/seqan/find/find_score.h
index bde4aa7..2791ffe 100644
--- a/include/seqan/find/find_score.h
+++ b/include/seqan/find/find_score.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -311,7 +311,7 @@ inline void _patternInit (Pattern<TNeedle, DPSearch<TScore, TSpec, TFindBeginPat
         x += score_gap;
     }
 
-    if (IsSameType<TSpec, FindPrefix>::VALUE)
+    SEQAN_IF_CONSTEXPR (IsSameType<TSpec, FindPrefix>::VALUE)
     {//compute data_maxscore
         me.data_maxscore = 0;
         TNeedleIterator it = begin(needle(me), Standard());
@@ -375,12 +375,15 @@ _findScoreSimpleProportional(TFinder & finder, Pattern<TNeedle, DPSearch<TScore,
     TSize haystack_length = length(container(hostIterator(finder)));
 
     //limit search width for prefix search
-    if (IsSameType<TSpec, FindPrefix>::VALUE && (score_gap < 0))
+    SEQAN_IF_CONSTEXPR (IsSameType<TSpec, FindPrefix>::VALUE)
     {
-        TSize maxlen = prefix_begin_position + length(needle(me)) + ((scoreLimit(me) - me.data_maxscore) / score_gap) + 1;
-        if (haystack_length > maxlen)
+        if (score_gap < 0)
         {
-            haystack_length = maxlen;
+            TSize maxlen = prefix_begin_position + length(needle(me)) + ((scoreLimit(me) - me.data_maxscore) / score_gap) + 1;
+            if (haystack_length > maxlen)
+            {
+                haystack_length = maxlen;
+            }
         }
     }
 
@@ -424,7 +427,7 @@ _findScoreSimpleProportional(TFinder & finder, Pattern<TNeedle, DPSearch<TScore,
         if (*tab >= scoreLimit(me) )
         {//found a hit
             _setFinderEnd(finder);
-            if (IsSameType<TSpec, FindPrefix>::VALUE)
+            SEQAN_IF_CONSTEXPR (IsSameType<TSpec, FindPrefix>::VALUE)
             {
                 _setFinderLength(finder, endPosition(finder));
             }
diff --git a/include/seqan/find/find_set_horspool.h b/include/seqan/find/find_set_horspool.h
index f21668e..c0f94c9 100644
--- a/include/seqan/find/find_set_horspool.h
+++ b/include/seqan/find/find_set_horspool.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/find/find_shiftand.h b/include/seqan/find/find_shiftand.h
index 4c5d5cd..026e9d4 100644
--- a/include/seqan/find/find_shiftand.h
+++ b/include/seqan/find/find_shiftand.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -161,7 +161,7 @@ _findShiftAndSmallNeedle(TFinder & finder, Pattern<TNeedle, ShiftAnd> & me)
     TWord compare = (TWord)1 << (me.needleLength - 1);
     while (!atEnd(finder))
     {
-        TWord pos = ordValue(convert<TValue>(getValue(finder)));
+        TWord pos = ordValue(convert<TValue>(*finder));
         me.prefSufMatch[0] = ((me.prefSufMatch[0] << 1) | (TWord)1) & me.bitMasks[pos];
         if ((me.prefSufMatch[0] & compare) != 0)
         {
@@ -184,7 +184,7 @@ _findShiftAndLargeNeedle(TFinder & finder, Pattern<TNeedle, ShiftAnd> & me)
     TWord compare = (TWord)1 << ((me.needleLength - 1) % BitsPerValue<TWord>::VALUE);
     while (!atEnd(finder))
     {
-        TWord pos = ordValue(convert<TValue>(getValue(finder)));
+        TWord pos = ordValue(convert<TValue>(*finder));
         TWord carry = 1;
         for(TWord block = 0; block < me.blockCount; ++block)
         {
diff --git a/include/seqan/find/find_shiftor.h b/include/seqan/find/find_shiftor.h
index 4e41811..b5ed9eb 100644
--- a/include/seqan/find/find_shiftor.h
+++ b/include/seqan/find/find_shiftor.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -221,7 +221,7 @@ _findShiftOrLargeNeedle(TFinder & finder, Pattern<TNeedle, ShiftOr> & me)
     TWord compare = ~((TWord)1 << ((me.needleLength - 1) % BitsPerValue<TWord>::VALUE));
     while (!atEnd(finder))
     {
-        TWord pos = ordValue(convert<TValue>(getValue(finder)));
+        TWord pos = ordValue(convert<TValue>(*finder));
         TWord carry = 0;
         for(TWord block = 0; block < me.blockCount; ++block)
         {
diff --git a/include/seqan/find/find_simple.h b/include/seqan/find/find_simple.h
index 1776fd0..dd511a9 100644
--- a/include/seqan/find/find_simple.h
+++ b/include/seqan/find/find_simple.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/find/find_wild_shiftand.h b/include/seqan/find/find_wild_shiftand.h
index 94bf172..4e18ea2 100644
--- a/include/seqan/find/find_wild_shiftand.h
+++ b/include/seqan/find/find_wild_shiftand.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/find/find_wumanber.h b/include/seqan/find/find_wumanber.h
index cf4417b..83de025 100644
--- a/include/seqan/find/find_wumanber.h
+++ b/include/seqan/find/find_wumanber.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -360,11 +360,11 @@ void _reinitPattern(Pattern<TNeedle, WuManber> & me)
     typedef typename Size<TKeyword>::Type TSize;
 
     //determine lmin
-    me.lmin = maxValue<TSize>();
+    me.lmin = std::numeric_limits<TSize>::max();
     for (TNeedleIterator it = begin(needle(me)); it != end(needle(me)); ++it)
         if (!empty(*it) && length(*it) < me.lmin)  // skipping empty needles
             me.lmin = length(*it);
-    if (me.lmin == maxValue<TSize>())
+    if (me.lmin == std::numeric_limits<TSize>::max())
         return;  // only empty needles
 
     //compute q:
diff --git a/include/seqan/gff_io.h b/include/seqan/gff_io.h
index 1b3365e..2654977 100644
--- a/include/seqan/gff_io.h
+++ b/include/seqan/gff_io.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                                   gff_io
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/gff_io/gff_file.h b/include/seqan/gff_io/gff_file.h
index 2ec78f8..e8e5c97 100644
--- a/include/seqan/gff_io/gff_file.h
+++ b/include/seqan/gff_io/gff_file.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/gff_io/gff_io_base.h b/include/seqan/gff_io/gff_io_base.h
index 8f2e8c0..e256d56 100644
--- a/include/seqan/gff_io/gff_io_base.h
+++ b/include/seqan/gff_io/gff_io_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -129,7 +129,7 @@ struct GffRecord
      * @var int32_t GffRecord::INVALID_IDX;
      * @brief Static member with invalid/sentinel rID value.
      */
-    static int32_t const INVALID_POS = 2147483647;  // TODO(singer): Should be MaxValue<int32_t>::VALUE, but that is not a constant expression :(
+    static int32_t const INVALID_POS = 2147483647;  // TODO(singer): Should be std::numeric_limits<int32_t>::max(), but that is not a constant expression :(
 
     /*!
      * @var CharString GffRecord::ref;
@@ -349,12 +349,13 @@ void readRecord(GffRecord & record, CharString & buffer, TFwdIterator & iter)
 {
     IsNewline isNewline;
 
-    // skip commented lines
+    // skip commented lines as well as ## directives
+    skipUntil(iter, NotFunctor<IsWhitespace>());  //skip empty lines
     while (!atEnd(iter) && value(iter) == '#')
         skipLine(iter);
+    skipUntil(iter, NotFunctor<IsWhitespace>());  //skip empty lines
 
     clear(record);
-    skipUntil(iter, NotFunctor<IsWhitespace>());  //skip empty lines
 
     // read column 1: seqid
     readUntil(record.ref, iter, OrFunctor<IsTab, AssertFunctor<NotFunctor<IsNewline>, ParseError, Gff> >());
@@ -436,6 +437,14 @@ void readRecord(GffRecord & record, CharString & buffer, TFwdIterator & iter)
             break;
         }
     }
+
+    // The last line might be a "### directive" specifically in GFF3
+    // Need to skip it to avoid another call of readRecords
+    skipUntil(iter, NotFunctor<IsWhitespace>());  //skip empty lines
+    while (!atEnd(iter) && value(iter) == '#')
+        skipLine(iter);
+    skipUntil(iter, NotFunctor<IsWhitespace>());  //skip empty lines
+
     return;
 }
 
diff --git a/include/seqan/graph_algorithms.h b/include/seqan/graph_algorithms.h
index 46f0659..f436185 100644
--- a/include/seqan/graph_algorithms.h
+++ b/include/seqan/graph_algorithms.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_algorithms/all_pairs_shortest_path.h b/include/seqan/graph_algorithms/all_pairs_shortest_path.h
index a28117c..0d5768e 100644
--- a/include/seqan/graph_algorithms/all_pairs_shortest_path.h
+++ b/include/seqan/graph_algorithms/all_pairs_shortest_path.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_algorithms/bellman_ford.h b/include/seqan/graph_algorithms/bellman_ford.h
index 94d1bda..dd2830d 100644
--- a/include/seqan/graph_algorithms/bellman_ford.h
+++ b/include/seqan/graph_algorithms/bellman_ford.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_algorithms/bipartite_matching.h b/include/seqan/graph_algorithms/bipartite_matching.h
index de0d16b..b6a5426 100644
--- a/include/seqan/graph_algorithms/bipartite_matching.h
+++ b/include/seqan/graph_algorithms/bipartite_matching.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_algorithms/breadth_first_search.h b/include/seqan/graph_algorithms/breadth_first_search.h
index 22cfe89..e6e9c84 100644
--- a/include/seqan/graph_algorithms/breadth_first_search.h
+++ b/include/seqan/graph_algorithms/breadth_first_search.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_algorithms/connected_components.h b/include/seqan/graph_algorithms/connected_components.h
index 183477e..64d9492 100644
--- a/include/seqan/graph_algorithms/connected_components.h
+++ b/include/seqan/graph_algorithms/connected_components.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_algorithms/depth_first_search.h b/include/seqan/graph_algorithms/depth_first_search.h
index 10ef260..4c62728 100644
--- a/include/seqan/graph_algorithms/depth_first_search.h
+++ b/include/seqan/graph_algorithms/depth_first_search.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_algorithms/dijkstra.h b/include/seqan/graph_algorithms/dijkstra.h
index 1d28547..ca26c2e 100644
--- a/include/seqan/graph_algorithms/dijkstra.h
+++ b/include/seqan/graph_algorithms/dijkstra.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_algorithms/floyd_warshall.h b/include/seqan/graph_algorithms/floyd_warshall.h
index d8ab1c8..5ca6546 100644
--- a/include/seqan/graph_algorithms/floyd_warshall.h
+++ b/include/seqan/graph_algorithms/floyd_warshall.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_algorithms/ford_fulkerson.h b/include/seqan/graph_algorithms/ford_fulkerson.h
index 4f7c66d..b7e35b7 100644
--- a/include/seqan/graph_algorithms/ford_fulkerson.h
+++ b/include/seqan/graph_algorithms/ford_fulkerson.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_algorithms/graph_algorithm_heap_tree.h b/include/seqan/graph_algorithms/graph_algorithm_heap_tree.h
index 0284da4..4a35b8d 100644
--- a/include/seqan/graph_algorithms/graph_algorithm_heap_tree.h
+++ b/include/seqan/graph_algorithms/graph_algorithm_heap_tree.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_algorithms/graph_algorithm_hmm.h b/include/seqan/graph_algorithms/graph_algorithm_hmm.h
index a84d532..2aa2ba4 100644
--- a/include/seqan/graph_algorithms/graph_algorithm_hmm.h
+++ b/include/seqan/graph_algorithms/graph_algorithm_hmm.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_algorithms/graph_algorithm_lis_his.h b/include/seqan/graph_algorithms/graph_algorithm_lis_his.h
index b2cdf36..1330a0d 100644
--- a/include/seqan/graph_algorithms/graph_algorithm_lis_his.h
+++ b/include/seqan/graph_algorithms/graph_algorithm_lis_his.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_algorithms/kruskal.h b/include/seqan/graph_algorithms/kruskal.h
index b152b02..2022603 100644
--- a/include/seqan/graph_algorithms/kruskal.h
+++ b/include/seqan/graph_algorithms/kruskal.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_algorithms/maximum_weighted_matching.h b/include/seqan/graph_algorithms/maximum_weighted_matching.h
new file mode 100644
index 0000000..1b2aa71
--- /dev/null
+++ b/include/seqan/graph_algorithms/maximum_weighted_matching.h
@@ -0,0 +1,246 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Joerg Winkler <j.winkler at fu-berlin.de>
+// ==========================================================================
+// Implementation for maximum weighted matching for general graphs.
+// The implemented algorithm is the greedy algorithm with a look-ahead.
+// That means the weight is maximized among the BLOCKSIZE heaviest edges.
+// The performance ratio of this algorithm is 1/2.
+// ==========================================================================
+
+#ifndef INCLUDE_SEQAN_GRAPH_ALGORITHMS_MAXIMUM_WEIGHTED_MATCHING_H_
+#define INCLUDE_SEQAN_GRAPH_ALGORITHMS_MAXIMUM_WEIGHTED_MATCHING_H_
+
+#include <utility>
+#include <algorithm>
+
+namespace seqan {
+
+// ============================================================================
+// Forwards
+// ============================================================================
+
+// ============================================================================
+// Tags, Classes, Enums
+// ============================================================================
+
+// ============================================================================
+// Metafunctions
+// ============================================================================
+
+// ============================================================================
+// Functions
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// Function maximumWeightedMatchingGreedy()
+// ----------------------------------------------------------------------------
+
+typedef std::vector<std::pair<std::size_t, std::size_t> > TConflictVect;
+
+template <long unsigned BLOCKSIZE, typename TCargo>
+inline TCargo _evaluateConflicts(uint32_t & isUsed, std::array<TCargo, BLOCKSIZE> const & weights,
+                                 TConflictVect const & conflicts)
+{
+    // first variant (eliminate second element of pair, which is smaller)
+    std::size_t eliminate = conflicts.front().second;
+    TConflictVect remainingConflicts;
+    std::copy_if(conflicts.begin(), conflicts.end(), std::back_inserter(remainingConflicts),
+                 [&eliminate] (std::pair<std::size_t, std::size_t> const & conflict)
+    {
+        return conflict.first != eliminate && conflict.second != eliminate;
+    });
+    TCargo excludedWeight1 = weights[eliminate];
+    uint32_t isUsed1 = isUsed;
+    if (!remainingConflicts.empty())
+        excludedWeight1 += _evaluateConflicts(isUsed1, weights, remainingConflicts);
+
+    // second variant (eliminate first element of pair, which is larger)
+    eliminate = conflicts.front().first;
+    TCargo excludedWeight2 = weights[eliminate];
+
+    // trim traversion if weight2 is too high
+    if (excludedWeight1 <= excludedWeight2)
+    {
+        isUsed = isUsed1 & ~(1 << conflicts.front().second);  // delete bit for 2nd element
+        return excludedWeight1;
+    }
+
+    bool noDependency = conflicts.size() - remainingConflicts.size() == 1u;
+    remainingConflicts.clear();
+    std::copy_if(conflicts.begin(), conflicts.end(), std::back_inserter(remainingConflicts),
+                 [&eliminate] (std::pair<std::size_t, std::size_t> const & conflict)
+    {
+        return conflict.first != eliminate && conflict.second != eliminate;
+    });
+
+    // trim traversion if the removal of the first conflict does not influence any other conflict
+    if (noDependency && conflicts.size() - remainingConflicts.size() == 1u)
+    {
+        isUsed = isUsed1 & ~(1 << conflicts.front().second);  // delete bit for 2nd element
+        return excludedWeight1;
+    }
+
+    uint32_t isUsed2 = isUsed;
+    if (!remainingConflicts.empty())
+        excludedWeight2 += _evaluateConflicts(isUsed2, weights, remainingConflicts);
+
+    // evaluate variants
+    if (excludedWeight1 < excludedWeight2)
+    {  // use first variant
+        isUsed = isUsed1 & ~(1 << conflicts.front().second);  // take isUsed1 and delete bit (eliminate 2nd of pair)
+        return excludedWeight1;
+    }
+    else
+    {  // use second variant
+        isUsed = isUsed2 & ~(1 << conflicts.front().first);  // take isUsed2 and delete bit (eliminate 1st of pair)
+        return excludedWeight2;
+    }
+}
+
+// Compute greedy MWM (performance ratio 1/2)
+// look into BLOCKSIZE edges at once and maximize their weight
+template <long unsigned BLOCKSIZE = 1, typename TCargo>
+TCargo maximumWeightedMatchingGreedy(Graph<Undirected<TCargo> > const & graph)
+{
+    typedef Graph<Undirected<TCargo> > TUGraph;
+    typedef typename EdgeDescriptor<TUGraph>::Type TEdgeDescr;
+    typedef typename Iterator<TUGraph, EdgeIterator>::Type TEdgeIter;
+    typedef typename Iterator<TUGraph, AdjacencyIterator>::Type TAdjacIterator;
+    typedef typename VertexDescriptor<TUGraph>::Type TVertexDescr;
+
+    // set up edge vector and bit vector for conflicting edges
+    std::vector<TEdgeIter> edges;
+    std::vector<bool> conflictFree;
+    reserve(edges, numEdges(graph));
+    resize(conflictFree, numEdges(graph), true);
+
+    for (TEdgeIter edgeIt(graph); !atEnd(edgeIt); goNext(edgeIt))
+        edges.push_back(edgeIt);
+
+    // sort edges with respect to their weight, start with the highest
+    std::sort(edges.begin(), edges.end(), [] (auto a, auto b) { return getCargo(*a) >= getCargo(*b); });
+
+    TCargo maxWeight{};
+
+    if (BLOCKSIZE == 1)
+    {
+        for (std::size_t idx = 0u; idx < length(edges); ++idx)
+        {
+            auto const & edge = *edges[idx];
+            if (!conflictFree[edge->data_id])  // skip edge if conflict with a previous edge
+                continue;
+
+            maxWeight += getCargo(edge);  // edge is contained in the matching
+
+            // mark all adjacent edges
+            TVertexDescr const & src = getSource(edge);
+            for (TAdjacIterator ai(graph, src); !atEnd(ai); goNext(ai))
+            {
+                TEdgeDescr rmEdge = findEdge(graph, src, *ai);
+                conflictFree[rmEdge->data_id] = false;
+            }
+
+            TVertexDescr const & trg = getTarget(edge);
+            for (TAdjacIterator ai(graph, trg); !atEnd(ai); goNext(ai))
+            {
+                TEdgeDescr rmEdge = findEdge(graph, trg, *ai);
+                conflictFree[rmEdge->data_id] = false;
+            }
+
+            SEQAN_ASSERT(!conflictFree[edge->data_id]);
+        }
+    }
+    else
+    {
+        static_assert(BLOCKSIZE <= 32u, "BLOCKSIZE is only supported for values lower or equal 32.");
+        uint32_t isUsed;
+        std::array<TCargo, BLOCKSIZE> weights;
+        std::vector<std::size_t> selection;
+        selection.reserve(BLOCKSIZE);
+        std::size_t idx = 0u;
+
+        while (idx < length(edges))
+        {
+            for (selection.clear(); selection.size() < BLOCKSIZE && idx < length(edges); ++idx)
+            {
+                if (conflictFree[(*edges[idx])->data_id])
+                {
+                    weights[selection.size()] = getCargo(*edges[idx]);
+                    selection.push_back(idx);
+                }
+            }
+
+            // find conflicts
+            isUsed = 0xffffffff;
+            TConflictVect conflicts;
+            for (unsigned long i = 0u; i < selection.size(); ++i)
+            {
+                TVertexDescr const & src = getSource(*edges[selection[i]]);
+                TVertexDescr const & trg = getTarget(*edges[selection[i]]);
+                for (unsigned long j = i + 1u; j < selection.size(); ++j)
+                {
+                    if (src == getSource(*edges[selection[j]]) || trg == getSource(*edges[selection[j]]) ||
+                        src == getTarget(*edges[selection[j]]) || trg == getTarget(*edges[selection[j]]))
+                    {
+                        conflicts.push_back(std::make_pair(i, j));
+                    }
+                }
+            }
+
+            if (!conflicts.empty())
+                _evaluateConflicts<BLOCKSIZE, TCargo>(isUsed, weights, conflicts);
+
+            for (std::size_t i = 0u; i < selection.size(); ++i)
+            {
+                if (isUsed & (1 << i))  // i-th selection is in the MWM
+                {
+                    maxWeight += getCargo(*edges[selection[i]]);
+
+                    // mark all adjacent edges
+                    TVertexDescr const &src = getSource(*edges[selection[i]]);
+                    for (TAdjacIterator ai(graph, src); !atEnd(ai); goNext(ai))
+                        conflictFree[findEdge(graph, src, *ai)->data_id] = false;
+
+                    TVertexDescr const &trg = getTarget(*edges[selection[i]]);
+                    for (TAdjacIterator ai(graph, trg); !atEnd(ai); goNext(ai))
+                        conflictFree[findEdge(graph, trg, *ai)->data_id] = false;
+                }
+            }
+        }
+    }
+    return maxWeight;
+}
+
+}  // namespace seqan
+
+#endif  // #ifndef INCLUDE_SEQAN_GRAPH_ALGORITHMS_MAXIMUM_WEIGHTED_MATCHING_H_
diff --git a/include/seqan/graph_algorithms/path_growing.h b/include/seqan/graph_algorithms/path_growing.h
index 5eb05df..43fcc95 100644
--- a/include/seqan/graph_algorithms/path_growing.h
+++ b/include/seqan/graph_algorithms/path_growing.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_algorithms/prim.h b/include/seqan/graph_algorithms/prim.h
index 17f7d0d..dae873b 100644
--- a/include/seqan/graph_algorithms/prim.h
+++ b/include/seqan/graph_algorithms/prim.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_algorithms/single_source_shortest_path.h b/include/seqan/graph_algorithms/single_source_shortest_path.h
index 359c56e..e603433 100644
--- a/include/seqan/graph_algorithms/single_source_shortest_path.h
+++ b/include/seqan/graph_algorithms/single_source_shortest_path.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_algorithms/strongly_connected_compnents.h b/include/seqan/graph_algorithms/strongly_connected_compnents.h
index e61e6de..eff26e2 100644
--- a/include/seqan/graph_algorithms/strongly_connected_compnents.h
+++ b/include/seqan/graph_algorithms/strongly_connected_compnents.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_algorithms/topological_sort.h b/include/seqan/graph_algorithms/topological_sort.h
index 9b5bcc9..712ae76 100644
--- a/include/seqan/graph_algorithms/topological_sort.h
+++ b/include/seqan/graph_algorithms/topological_sort.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_algorithms/transitive_closure.h b/include/seqan/graph_algorithms/transitive_closure.h
index e75cd00..16f0f87 100644
--- a/include/seqan/graph_algorithms/transitive_closure.h
+++ b/include/seqan/graph_algorithms/transitive_closure.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_algorithms/weakly_connected_components.h b/include/seqan/graph_algorithms/weakly_connected_components.h
index 089d075..9c86fea 100644
--- a/include/seqan/graph_algorithms/weakly_connected_components.h
+++ b/include/seqan/graph_algorithms/weakly_connected_components.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_algorithms/weighted_bipartite_matching.h b/include/seqan/graph_algorithms/weighted_bipartite_matching.h
index 2c149e0..8ae57af 100644
--- a/include/seqan/graph_algorithms/weighted_bipartite_matching.h
+++ b/include/seqan/graph_algorithms/weighted_bipartite_matching.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_align.h b/include/seqan/graph_align.h
index 231c796..b3e1c95 100644
--- a/include/seqan/graph_align.h
+++ b/include/seqan/graph_align.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_align/graph_algorithm_refine_align.h b/include/seqan/graph_align/graph_algorithm_refine_align.h
index 510747b..39eeac0 100644
--- a/include/seqan/graph_align/graph_algorithm_refine_align.h
+++ b/include/seqan/graph_align/graph_algorithm_refine_align.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_align/graph_algorithm_refine_aligngraph.h b/include/seqan/graph_align/graph_algorithm_refine_aligngraph.h
index 4aa93d3..7819f52 100644
--- a/include/seqan/graph_align/graph_algorithm_refine_aligngraph.h
+++ b/include/seqan/graph_align/graph_algorithm_refine_aligngraph.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_align/graph_algorithm_refine_annotation.h b/include/seqan/graph_align/graph_algorithm_refine_annotation.h
index a01a598..5952d54 100644
--- a/include/seqan/graph_align/graph_algorithm_refine_annotation.h
+++ b/include/seqan/graph_align/graph_algorithm_refine_annotation.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_align/graph_algorithm_refine_exact.h b/include/seqan/graph_align/graph_algorithm_refine_exact.h
index a966147..82dba7c 100644
--- a/include/seqan/graph_align/graph_algorithm_refine_exact.h
+++ b/include/seqan/graph_align/graph_algorithm_refine_exact.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_align/graph_algorithm_refine_exact_iterative.h b/include/seqan/graph_align/graph_algorithm_refine_exact_iterative.h
index c2113fe..ee834f6 100644
--- a/include/seqan/graph_align/graph_algorithm_refine_exact_iterative.h
+++ b/include/seqan/graph_align/graph_algorithm_refine_exact_iterative.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_align/graph_algorithm_refine_fragment.h b/include/seqan/graph_align/graph_algorithm_refine_fragment.h
index 5d0370f..a39d690 100644
--- a/include/seqan/graph_align/graph_algorithm_refine_fragment.h
+++ b/include/seqan/graph_align/graph_algorithm_refine_fragment.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_align/graph_algorithm_refine_inexact.h b/include/seqan/graph_align/graph_algorithm_refine_inexact.h
index 924d92d..873609f 100644
--- a/include/seqan/graph_align/graph_algorithm_refine_inexact.h
+++ b/include/seqan/graph_align/graph_algorithm_refine_inexact.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_align/graph_algorithm_refine_scoring.h b/include/seqan/graph_align/graph_algorithm_refine_scoring.h
index 07cad8b..3621764 100644
--- a/include/seqan/graph_align/graph_algorithm_refine_scoring.h
+++ b/include/seqan/graph_align/graph_algorithm_refine_scoring.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_align/graph_impl_align.h b/include/seqan/graph_align/graph_impl_align.h
index d78aa7d..42c4fe3 100644
--- a/include/seqan/graph_align/graph_impl_align.h
+++ b/include/seqan/graph_align/graph_impl_align.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -1947,7 +1947,7 @@ heaviestCommonSubsequence(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g,
     // Remember for each vertex descriptor the position in the sequence
     typedef String<TSize> TMapVertexPos;
     TMapVertexPos map;
-    resize(map, getIdUpperBound(_getVertexIdManager(g)), MaxValue<TSize>::VALUE);
+    resize(map, getIdUpperBound(_getVertexIdManager(g)), std::numeric_limits<TSize>::max());
     typedef typename Iterator<TString const, Standard>::Type TStringIterConst;
     typedef typename Iterator<TVertexSet const, Standard>::Type TVertexSetIterConst;
     TStringIterConst itStr1 = begin(str1, Standard());
@@ -1978,7 +1978,7 @@ heaviestCommonSubsequence(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g,
             for(;!atEnd(itOut); ++itOut) {
                 // Target vertex must be in the map
                 pPos = map[targetVertex(itOut)];
-                if (pPos != MaxValue<TSize>::VALUE)
+                if (pPos != std::numeric_limits<TSize>::max())
                     appendValue(occupiedPositions, pPos * n + (TSize) (n - posItStr2 - 1), Generous());
             }
         }
@@ -1989,7 +1989,7 @@ heaviestCommonSubsequence(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g,
     typedef typename Iterator<TSlotToPos, Standard>::Type TSlotToPosIter;
     TSlotToPos slotToPos;
     TSize counter = 0;
-    TSize oldVal = MaxValue<TSize>::VALUE;
+    TSize oldVal = std::numeric_limits<TSize>::max();
     TOccIter occIt = begin(occupiedPositions, Standard());
     TOccIter occItEnd = end(occupiedPositions, Standard());
     for(;occIt != occItEnd; ++occIt) {
@@ -2015,7 +2015,7 @@ heaviestCommonSubsequence(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g,
             for(;!atEnd(itOut); ++itOut) {
                 // Target vertex must be in the map
                 pPos = map[targetVertex(itOut)];
-                if ( pPos != MaxValue<TSize>::VALUE)
+                if ( pPos != std::numeric_limits<TSize>::max())
                     weights[std::distance(begin(slotToPos, Standard()), std::lower_bound(begin(slotToPos, Standard()), end(slotToPos, Standard()), pPos * n + (TSize) (n - posItStr2 - 1)))] += (TCargo) cargo(*itOut);
             }
         }
diff --git a/include/seqan/graph_align/graph_impl_align_adapt.h b/include/seqan/graph_align/graph_impl_align_adapt.h
index 98522af..65173fd 100644
--- a/include/seqan/graph_align/graph_impl_align_adapt.h
+++ b/include/seqan/graph_align/graph_impl_align_adapt.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_msa.h b/include/seqan/graph_msa.h
index 8857c08..7c533f8 100644
--- a/include/seqan/graph_msa.h
+++ b/include/seqan/graph_msa.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_msa/graph_align_tcoffee_base.h b/include/seqan/graph_msa/graph_align_tcoffee_base.h
index c056ffa..6bf1253 100644
--- a/include/seqan/graph_msa/graph_align_tcoffee_base.h
+++ b/include/seqan/graph_msa/graph_align_tcoffee_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_msa/graph_align_tcoffee_distance.h b/include/seqan/graph_msa/graph_align_tcoffee_distance.h
index 1030855..95f231b 100644
--- a/include/seqan/graph_msa/graph_align_tcoffee_distance.h
+++ b/include/seqan/graph_msa/graph_align_tcoffee_distance.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_msa/graph_align_tcoffee_guidetree.h b/include/seqan/graph_msa/graph_align_tcoffee_guidetree.h
index 802205c..333d241 100644
--- a/include/seqan/graph_msa/graph_align_tcoffee_guidetree.h
+++ b/include/seqan/graph_msa/graph_align_tcoffee_guidetree.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -731,7 +731,7 @@ upgmaTree(Graph<Undirected<TValue, TSpec1> >& pairGraph,
     typedef typename Size<TPairGraph>::Type TSize;
 
     // First initialization
-    TCargo const maxVal = maxValue<TCargo>();
+    TCargo const maxVal = std::numeric_limits<TCargo>::max();
     TSize nseq = numVertices(pairGraph);
     TCargo infCargo = _getInfinity<TCargo>();
     clearVertices(g);
diff --git a/include/seqan/graph_msa/graph_align_tcoffee_io.h b/include/seqan/graph_msa/graph_align_tcoffee_io.h
index c10ce50..a4c0e9f 100644
--- a/include/seqan/graph_msa/graph_align_tcoffee_io.h
+++ b/include/seqan/graph_msa/graph_align_tcoffee_io.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_msa/graph_align_tcoffee_kmer.h b/include/seqan/graph_msa/graph_align_tcoffee_kmer.h
index ad99619..7e83438 100644
--- a/include/seqan/graph_msa/graph_align_tcoffee_kmer.h
+++ b/include/seqan/graph_msa/graph_align_tcoffee_kmer.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_msa/graph_align_tcoffee_library.h b/include/seqan/graph_msa/graph_align_tcoffee_library.h
index 29524b2..efee9ef 100644
--- a/include/seqan/graph_msa/graph_align_tcoffee_library.h
+++ b/include/seqan/graph_msa/graph_align_tcoffee_library.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_msa/graph_align_tcoffee_msa.h b/include/seqan/graph_msa/graph_align_tcoffee_msa.h
index 07c1cfb..7eb39e0 100644
--- a/include/seqan/graph_msa/graph_align_tcoffee_msa.h
+++ b/include/seqan/graph_msa/graph_align_tcoffee_msa.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_msa/graph_align_tcoffee_progressive.h b/include/seqan/graph_msa/graph_align_tcoffee_progressive.h
index 79866c9..d1aaec9 100644
--- a/include/seqan/graph_msa/graph_align_tcoffee_progressive.h
+++ b/include/seqan/graph_msa/graph_align_tcoffee_progressive.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_msa/graph_align_tcoffee_refinement.h b/include/seqan/graph_msa/graph_align_tcoffee_refinement.h
index b95b58b..110c2d7 100644
--- a/include/seqan/graph_msa/graph_align_tcoffee_refinement.h
+++ b/include/seqan/graph_msa/graph_align_tcoffee_refinement.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_types.h b/include/seqan/graph_types.h
index a73b31f..36e1602 100644
--- a/include/seqan/graph_types.h
+++ b/include/seqan/graph_types.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_types/graph_base.h b/include/seqan/graph_types/graph_base.h
index a6ad879..2f9e91f 100644
--- a/include/seqan/graph_types/graph_base.h
+++ b/include/seqan/graph_types/graph_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_types/graph_drawing.h b/include/seqan/graph_types/graph_drawing.h
index 15991c5..a5be46d 100644
--- a/include/seqan/graph_types/graph_drawing.h
+++ b/include/seqan/graph_types/graph_drawing.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_types/graph_edgestump.h b/include/seqan/graph_types/graph_edgestump.h
index 874cea8..22fc94a 100644
--- a/include/seqan/graph_types/graph_edgestump.h
+++ b/include/seqan/graph_types/graph_edgestump.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_types/graph_idmanager.h b/include/seqan/graph_types/graph_idmanager.h
index 2b02229..f9fb03e 100644
--- a/include/seqan/graph_types/graph_idmanager.h
+++ b/include/seqan/graph_types/graph_idmanager.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_types/graph_impl_automaton.h b/include/seqan/graph_types/graph_impl_automaton.h
index ce5128e..16db827 100644
--- a/include/seqan/graph_types/graph_impl_automaton.h
+++ b/include/seqan/graph_types/graph_impl_automaton.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_types/graph_impl_directed.h b/include/seqan/graph_types/graph_impl_directed.h
index 4fd7dc4..070f60b 100644
--- a/include/seqan/graph_types/graph_impl_directed.h
+++ b/include/seqan/graph_types/graph_impl_directed.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_types/graph_impl_hmm.h b/include/seqan/graph_types/graph_impl_hmm.h
index 98aa06d..8982a28 100644
--- a/include/seqan/graph_types/graph_impl_hmm.h
+++ b/include/seqan/graph_types/graph_impl_hmm.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_types/graph_impl_oracle.h b/include/seqan/graph_types/graph_impl_oracle.h
index da72321..d1a379b 100644
--- a/include/seqan/graph_types/graph_impl_oracle.h
+++ b/include/seqan/graph_types/graph_impl_oracle.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_types/graph_impl_tree.h b/include/seqan/graph_types/graph_impl_tree.h
index 121620c..95e4ec5 100644
--- a/include/seqan/graph_types/graph_impl_tree.h
+++ b/include/seqan/graph_types/graph_impl_tree.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_types/graph_impl_trie.h b/include/seqan/graph_types/graph_impl_trie.h
index 7e0de8d..d0bc3ad 100644
--- a/include/seqan/graph_types/graph_impl_trie.h
+++ b/include/seqan/graph_types/graph_impl_trie.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_types/graph_impl_undirected.h b/include/seqan/graph_types/graph_impl_undirected.h
index 8fa3e20..c527e5f 100644
--- a/include/seqan/graph_types/graph_impl_undirected.h
+++ b/include/seqan/graph_types/graph_impl_undirected.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_types/graph_impl_wordgraph.h b/include/seqan/graph_types/graph_impl_wordgraph.h
index ca02eb2..e9da27a 100644
--- a/include/seqan/graph_types/graph_impl_wordgraph.h
+++ b/include/seqan/graph_types/graph_impl_wordgraph.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_types/graph_interface.h b/include/seqan/graph_types/graph_interface.h
index efb38bf..249ff22 100644
--- a/include/seqan/graph_types/graph_interface.h
+++ b/include/seqan/graph_types/graph_interface.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -652,8 +652,7 @@ template <typename T>
 inline T
 _getInfinity()
 {
-    T * _tag = 0;
-    return supremumValueImpl(_tag);
+    return std::numeric_limits<T>::max();
 }
 
 //////////////////////////////////////////////////////////////////////////////
diff --git a/include/seqan/graph_types/graph_iterator.h b/include/seqan/graph_types/graph_iterator.h
index 760aa00..28853b2 100644
--- a/include/seqan/graph_types/graph_iterator.h
+++ b/include/seqan/graph_types/graph_iterator.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_types/graph_iterator_adjacency.h b/include/seqan/graph_types/graph_iterator_adjacency.h
index c020653..e494a88 100644
--- a/include/seqan/graph_types/graph_iterator_adjacency.h
+++ b/include/seqan/graph_types/graph_iterator_adjacency.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_types/graph_iterator_bfs.h b/include/seqan/graph_types/graph_iterator_bfs.h
index 521418e..98b9dcd 100644
--- a/include/seqan/graph_types/graph_iterator_bfs.h
+++ b/include/seqan/graph_types/graph_iterator_bfs.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_types/graph_iterator_dfs.h b/include/seqan/graph_types/graph_iterator_dfs.h
index 20097d4..61df9d8 100644
--- a/include/seqan/graph_types/graph_iterator_dfs.h
+++ b/include/seqan/graph_types/graph_iterator_dfs.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_types/graph_iterator_edge.h b/include/seqan/graph_types/graph_iterator_edge.h
index 1addb33..b4b5a86 100644
--- a/include/seqan/graph_types/graph_iterator_edge.h
+++ b/include/seqan/graph_types/graph_iterator_edge.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_types/graph_iterator_outedge.h b/include/seqan/graph_types/graph_iterator_outedge.h
index 4638d38..eb6498a 100644
--- a/include/seqan/graph_types/graph_iterator_outedge.h
+++ b/include/seqan/graph_types/graph_iterator_outedge.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_types/graph_iterator_vertex.h b/include/seqan/graph_types/graph_iterator_vertex.h
index bcc56da..abd4568 100644
--- a/include/seqan/graph_types/graph_iterator_vertex.h
+++ b/include/seqan/graph_types/graph_iterator_vertex.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_types/graph_utility_parsing.h b/include/seqan/graph_types/graph_utility_parsing.h
index 2667543..625c2ed 100644
--- a/include/seqan/graph_types/graph_utility_parsing.h
+++ b/include/seqan/graph_types/graph_utility_parsing.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_types/property_map_generic.h b/include/seqan/graph_types/property_map_generic.h
index a722493..b55831e 100644
--- a/include/seqan/graph_types/property_map_generic.h
+++ b/include/seqan/graph_types/property_map_generic.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_types/property_map_internal.h b/include/seqan/graph_types/property_map_internal.h
index 1dea116..205fc63 100644
--- a/include/seqan/graph_types/property_map_internal.h
+++ b/include/seqan/graph_types/property_map_internal.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/graph_types/property_map_internal_pointer.h b/include/seqan/graph_types/property_map_internal_pointer.h
index 33e5b1f..a0cf04b 100644
--- a/include/seqan/graph_types/property_map_internal_pointer.h
+++ b/include/seqan/graph_types/property_map_internal_pointer.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index.h b/include/seqan/index.h
index b296116..db5841b 100644
--- a/include/seqan/index.h
+++ b/include/seqan/index.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // Copyright (c) 2013 NVIDIA Corporation
 // All rights reserved.
 //
@@ -233,6 +233,7 @@
 #include <seqan/index/find2_vstree_factory.h>
 #include <seqan/index/find2_index_multi.h>
 #include <seqan/index/find2_functors.h>
+#include <seqan/index/find2_index_approx.h>
 
 // ----------------------------------------------------------------------------
 // Lambda interface.
diff --git a/include/seqan/index/find2_backtracking.h b/include/seqan/index/find2_backtracking.h
index e51608a..4bcbd9f 100644
--- a/include/seqan/index/find2_backtracking.h
+++ b/include/seqan/index/find2_backtracking.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -265,7 +265,7 @@ _updateVertexScore(TVertexScore current,
     TVertexScoreConstIterator previousIt = begin(previous, Standard());
 
     // Update first cell.
-    if (IsSameType<TStage, StageUpper_>::VALUE)
+    SEQAN_IF_CONSTEXPR (IsSameType<TStage, StageUpper_>::VALUE)
     {
         // C[0,j] = C[0,j-1] + 1 [Left]
         value(currentIt) = value(previousIt) + 1;
@@ -291,7 +291,7 @@ _updateVertexScore(TVertexScore current,
     }
 
     // Update last cell.
-    if (IsSameType<TStage, StageLower_>::VALUE)
+    SEQAN_IF_CONSTEXPR (IsSameType<TStage, StageLower_>::VALUE)
     {
         TScore score = ordEqual(textChar, value(patternIt)) ? 0 : 1;
 
diff --git a/include/seqan/index/find2_base.h b/include/seqan/index/find2_base.h
index 1ac4bf1..0db1ab1 100644
--- a/include/seqan/index/find2_base.h
+++ b/include/seqan/index/find2_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // Copyright (c) 2013 NVIDIA Corporation
 // All rights reserved.
 //
diff --git a/include/seqan/index/find2_functors.h b/include/seqan/index/find2_functors.h
index 61bd274..e4df72e 100644
--- a/include/seqan/index/find2_functors.h
+++ b/include/seqan/index/find2_functors.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // Copyright (c) 2013 NVIDIA Corporation
 // All rights reserved.
 //
diff --git a/include/seqan/index/find2_index.h b/include/seqan/index/find2_index.h
index bf3c356..d500fdd 100644
--- a/include/seqan/index/find2_index.h
+++ b/include/seqan/index/find2_index.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // Copyright (c) 2013 NVIDIA Corporation
 // All rights reserved.
 //
diff --git a/include/seqan/index/find2_index_approx.h b/include/seqan/index/find2_index_approx.h
new file mode 100644
index 0000000..3181d46
--- /dev/null
+++ b/include/seqan/index/find2_index_approx.h
@@ -0,0 +1,642 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of NVIDIA Corporation nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Christopher Pockrandt <github at cpockrandt.de>
+// ==========================================================================
+// Approximate String matching via search schemes on a substring index.
+// ==========================================================================
+
+#ifndef SEQAN_INDEX_FIND2_INDEX_APPROX_H_
+#define SEQAN_INDEX_FIND2_INDEX_APPROX_H_
+
+namespace seqan {
+
+template <size_t N>
+struct OptimalSearch
+{
+    std::array<uint8_t, N> pi; // order of the blocks. permutation of [1..n]
+    std::array<uint8_t, N> l; // minimum number of errors at the end of the corresponding block
+    std::array<uint8_t, N> u; // maximum number of errors at the end of the corresponding block
+
+    std::array<uint32_t, N> blocklength; // cumulated values / prefix sums
+    uint32_t startPos;
+};
+
+template <size_t min, size_t max, typename TVoidType = void>
+struct OptimalSearchSchemes;
+
+template <typename TVoidType>
+struct OptimalSearchSchemes<0, 0, TVoidType>
+{
+    static constexpr std::array<OptimalSearch<1>, 1> VALUE { {{ {{1}}, {{0}}, {{0}}, {{0}}, 0 }} };
+};
+
+template <typename TVoidType>
+constexpr std::array<OptimalSearch<1>, 1> OptimalSearchSchemes<0, 0, TVoidType>::VALUE;
+
+template <typename TVoidType>
+struct OptimalSearchSchemes<0, 1, TVoidType>
+{
+    static constexpr std::array<OptimalSearch<2>, 2> VALUE
+    {{
+        { {{1, 2}}, {{0, 0}}, {{0, 1}}, {{0, 0}}, 0 },
+        { {{2, 1}}, {{0, 1}}, {{0, 1}}, {{0, 0}}, 0 }
+    }};
+};
+
+template <typename TVoidType>
+constexpr std::array<OptimalSearch<2>, 2> OptimalSearchSchemes<0, 1, TVoidType>::VALUE;
+
+template <typename TVoidType>
+struct OptimalSearchSchemes<0, 2, TVoidType>
+{
+    static constexpr std::array<OptimalSearch<4>, 3> VALUE
+    {{
+        { {{2, 1, 3, 4}}, {{0, 0, 1, 1}}, {{0, 0, 2, 2}}, {{0, 0, 0, 0}}, 0 },
+        { {{3, 2, 1, 4}}, {{0, 0, 0, 0}}, {{0, 1, 1, 2}}, {{0, 0, 0, 0}}, 0 },
+        { {{4, 3, 2, 1}}, {{0, 0, 0, 2}}, {{0, 1, 2, 2}}, {{0, 0, 0, 0}}, 0 }
+    }};
+};
+
+template <typename TVoidType>
+constexpr std::array<OptimalSearch<4>, 3> OptimalSearchSchemes<0, 2, TVoidType>::VALUE;
+
+template <typename TVoidType>
+struct OptimalSearchSchemes<0, 3, TVoidType>
+{
+    static constexpr std::array<OptimalSearch<5>, 3> VALUE
+    {{
+        { {{1, 2, 3, 4, 5}}, {{0, 0, 0, 2, 2}}, {{0, 0, 3, 3, 3}}, {{0, 0, 0, 0, 0}}, 0 },
+        { {{4, 3, 2, 1, 5}}, {{0, 0, 0, 0, 0}}, {{1, 1, 2, 2, 3}}, {{0, 0, 0, 0, 0}}, 0 },
+        { {{5, 4, 3, 2, 1}}, {{0, 0, 0, 0, 3}}, {{0, 2, 2, 3, 3}}, {{0, 0, 0, 0, 0}}, 0 }
+    }};
+};
+
+template <typename TVoidType>
+constexpr std::array<OptimalSearch<5>, 3> OptimalSearchSchemes<0, 3, TVoidType>::VALUE;
+
+template <typename TVoidType>
+struct OptimalSearchSchemes<0, 4, TVoidType>
+{
+    static constexpr std::array<OptimalSearch<5>, 3> VALUE
+    {{
+        { {{1, 2, 3, 4, 5}}, {{0, 0, 0, 0, 4}}, {{0, 3, 3, 4, 4}}, {{0, 0, 0, 0, 0}}, 0 },
+        { {{2, 3, 4, 5, 1}}, {{0, 0, 0, 0, 0}}, {{2, 2, 3, 3, 4}}, {{0, 0, 0, 0, 0}}, 0 },
+        { {{5, 4, 3, 2, 1}}, {{0, 0, 0, 3, 3}}, {{0, 0, 4, 4, 4}}, {{0, 0, 0, 0, 0}}, 0 }
+    }};
+};
+
+template <typename TVoidType>
+constexpr std::array<OptimalSearch<5>, 3> OptimalSearchSchemes<0, 4, TVoidType>::VALUE;
+
+template <typename TVoidType>
+struct OptimalSearchSchemes<1, 1, TVoidType>
+{
+    static constexpr std::array<OptimalSearch<2>, 2> VALUE
+    {{
+        { {{1, 2}}, {{0, 1}}, {{0, 1}}, {{0, 0}}, 0 },
+        { {{2, 1}}, {{0, 1}}, {{0, 1}}, {{0, 0}}, 0 }
+    }};
+};
+
+template <typename TVoidType>
+constexpr std::array<OptimalSearch<2>, 2> OptimalSearchSchemes<1, 1, TVoidType>::VALUE;
+
+template <typename TVoidType>
+struct OptimalSearchSchemes<1, 2, TVoidType>
+{
+    static constexpr std::array<OptimalSearch<4>, 3> VALUE
+    {{
+        { {{1, 2, 3, 4}}, {{0, 0, 0, 2}}, {{0, 1, 2, 2}}, {{0, 0, 0, 0}}, 0 },
+        { {{2, 3, 4, 1}}, {{0, 0, 0, 1}}, {{0, 1, 1, 2}}, {{0, 0, 0, 0}}, 0 },
+        { {{4, 3, 2, 1}}, {{0, 0, 1, 1}}, {{0, 0, 2, 2}}, {{0, 0, 0, 0}}, 0 }
+    }};
+};
+
+template <typename TVoidType>
+constexpr std::array<OptimalSearch<4>, 3> OptimalSearchSchemes<1, 2, TVoidType>::VALUE;
+
+template <typename TVoidType>
+struct OptimalSearchSchemes<1, 3, TVoidType>
+{
+    static constexpr std::array<OptimalSearch<5>, 3> VALUE
+    {{
+        { {{1, 2, 3, 4, 5}}, {{0, 0, 0, 2, 2}}, {{0, 0, 3, 3, 3}}, {{0, 0, 0, 0, 0}}, 0 },
+        { {{4, 3, 2, 1, 5}}, {{0, 0, 0, 0, 1}}, {{1, 1, 2, 2, 3}}, {{0, 0, 0, 0, 0}}, 0 },
+        { {{5, 4, 3, 2, 1}}, {{0, 0, 0, 0, 3}}, {{0, 2, 2, 3, 3}}, {{0, 0, 0, 0, 0}}, 0 }
+    }};
+};
+
+template <typename TVoidType>
+constexpr std::array<OptimalSearch<5>, 3> OptimalSearchSchemes<1, 3, TVoidType>::VALUE;
+
+template <typename TVoidType>
+struct OptimalSearchSchemes<1, 4, TVoidType>
+{
+    static constexpr std::array<OptimalSearch<5>, 3> VALUE
+    {{
+        { {{1, 2, 3, 4, 5}}, {{0, 0, 0, 0, 4}}, {{0, 3, 3, 4, 4}}, {{0, 0, 0, 0, 0}}, 0 },
+        { {{2, 3, 4, 5, 1}}, {{0, 0, 0, 0, 1}}, {{2, 2, 3, 3, 4}}, {{0, 0, 0, 0, 0}}, 0 },
+        { {{5, 4, 3, 2, 1}}, {{0, 0, 0, 3, 3}}, {{0, 0, 4, 4, 4}}, {{0, 0, 0, 0, 0}}, 0 }
+    }};
+};
+
+template <typename TVoidType>
+constexpr std::array<OptimalSearch<5>, 3> OptimalSearchSchemes<1, 4, TVoidType>::VALUE;
+
+template <typename TVoidType>
+struct OptimalSearchSchemes<2, 2, TVoidType>
+{
+    static constexpr std::array<OptimalSearch<4>, 3> VALUE
+    {{
+        { {{1, 2, 3, 4}}, {{0, 0, 0, 2}}, {{0, 1, 2, 2}}, {{0, 0, 0, 0}}, 0 },
+        { {{2, 3, 4, 1}}, {{0, 0, 1, 2}}, {{0, 1, 1, 2}}, {{0, 0, 0, 0}}, 0 },
+        { {{4, 3, 2, 1}}, {{0, 0, 0, 2}}, {{0, 0, 2, 2}}, {{0, 0, 0, 0}}, 0 }
+    }};
+};
+
+template <typename TVoidType>
+constexpr std::array<OptimalSearch<4>, 3> OptimalSearchSchemes<2, 2, TVoidType>::VALUE;
+
+template <typename TVoidType>
+struct OptimalSearchSchemes<2, 3, TVoidType>
+{
+    static constexpr std::array<OptimalSearch<5>, 3> VALUE
+    {{
+        { {{1, 2, 3, 4, 5}}, {{0, 0, 0, 2, 2}}, {{0, 0, 3, 3, 3}}, {{0, 0, 0, 0, 0}}, 0 },
+        { {{4, 3, 2, 1, 5}}, {{0, 0, 0, 0, 2}}, {{1, 1, 2, 2, 3}}, {{0, 0, 0, 0, 0}}, 0 },
+        { {{5, 4, 3, 2, 1}}, {{0, 0, 0, 0, 3}}, {{0, 2, 2, 3, 3}}, {{0, 0, 0, 0, 0}}, 0 }
+    }};
+};
+
+template <typename TVoidType>
+constexpr std::array<OptimalSearch<5>, 3> OptimalSearchSchemes<2, 3, TVoidType>::VALUE;
+
+template <typename TVoidType>
+struct OptimalSearchSchemes<2, 4, TVoidType>
+{
+    static constexpr std::array<OptimalSearch<5>, 3> VALUE
+    {{
+        { {{1, 2, 3, 4, 5}}, {{0, 0, 0, 0, 4}}, {{0, 3, 3, 4, 4}}, {{0, 0, 0, 0, 0}}, 0 },
+        { {{2, 3, 4, 5, 1}}, {{0, 0, 0, 0, 2}}, {{2, 2, 3, 3, 4}}, {{0, 0, 0, 0, 0}}, 0 },
+        { {{5, 4, 3, 2, 1}}, {{0, 0, 0, 3, 3}}, {{0, 0, 4, 4, 4}}, {{0, 0, 0, 0, 0}}, 0 }
+    }};
+};
+
+template <typename TVoidType>
+constexpr std::array<OptimalSearch<5>, 3> OptimalSearchSchemes<2, 4, TVoidType>::VALUE;
+
+template <typename TVoidType>
+struct OptimalSearchSchemes<3, 3, TVoidType>
+{
+    static constexpr std::array<OptimalSearch<5>, 3> VALUE
+    {{
+        { {{1, 2, 3, 4, 5}}, {{0, 0, 0, 2, 3}}, {{0, 0, 3, 3, 3}}, {{0, 0, 0, 0, 0}}, 0 },
+        { {{4, 3, 2, 1, 5}}, {{0, 0, 0, 0, 3}}, {{1, 1, 2, 2, 3}}, {{0, 0, 0, 0, 0}}, 0 },
+        { {{5, 4, 3, 2, 1}}, {{0, 0, 0, 0, 3}}, {{0, 2, 2, 3, 3}}, {{0, 0, 0, 0, 0}}, 0 }
+    }};
+};
+
+template <typename TVoidType>
+constexpr std::array<OptimalSearch<5>, 3> OptimalSearchSchemes<3, 3, TVoidType>::VALUE;
+
+template <typename TVoidType>
+struct OptimalSearchSchemes<3, 4, TVoidType>
+{
+    static constexpr std::array<OptimalSearch<5>, 3> VALUE
+    {{
+        { {{1, 2, 3, 4, 5}}, {{0, 0, 0, 0, 4}}, {{0, 3, 3, 4, 4}}, {{0, 0, 0, 0, 0}}, 0 },
+        { {{2, 3, 4, 5, 1}}, {{0, 0, 0, 0, 3}}, {{2, 2, 3, 3, 4}}, {{0, 0, 0, 0, 0}}, 0 },
+        { {{5, 4, 3, 2, 1}}, {{0, 0, 0, 3, 3}}, {{0, 0, 4, 4, 4}}, {{0, 0, 0, 0, 0}}, 0 }
+    }};
+};
+
+template <typename TVoidType>
+constexpr std::array<OptimalSearch<5>, 3> OptimalSearchSchemes<3, 4, TVoidType>::VALUE;
+
+template <typename TVoidType>
+struct OptimalSearchSchemes<4, 4, TVoidType>
+{
+    static constexpr std::array<OptimalSearch<5>, 3> VALUE
+    {{
+        { {{1, 2, 3, 4, 5}}, {{0, 0, 0, 0, 4}}, {{0, 3, 3, 4, 4}}, {{0, 0, 0, 0, 0}}, 0 },
+        { {{2, 3, 4, 5, 1}}, {{0, 0, 0, 0, 4}}, {{2, 2, 3, 3, 4}}, {{0, 0, 0, 0, 0}}, 0 },
+        { {{5, 4, 3, 2, 1}}, {{0, 0, 0, 3, 4}}, {{0, 0, 4, 4, 4}}, {{0, 0, 0, 0, 0}}, 0 }
+    }};
+};
+
+template <typename TVoidType>
+constexpr std::array<OptimalSearch<5>, 3> OptimalSearchSchemes<4, 4, TVoidType>::VALUE;
+
+// Given the blocklengths (absolute, not cumulative values), assign it to all
+// OptimalSearches in a OptimalSearchScheme. The order of blocklength has to be from left to
+// right (regarding blocks)
+template <size_t nbrBlocks, size_t N>
+inline void _optimalSearchSchemeSetBlockLength(std::array<OptimalSearch<nbrBlocks>, N> & ss,
+                                               std::vector<uint32_t> const & blocklength)
+{
+    for (OptimalSearch<nbrBlocks> & s : ss)
+        for (uint8_t i = 0; i < s.blocklength.size(); ++i)
+            s.blocklength[i] = blocklength[s.pi[i]-1] + ((i > 0) ? s.blocklength[i-1] : 0);
+}
+
+// requires blocklength to be already set!
+template <size_t nbrBlocks, size_t N>
+inline void _optimalSearchSchemeInit(std::array<OptimalSearch<nbrBlocks>, N> & ss)
+{
+    // check whether 2nd block is on the left or right and choose initialDirection accordingly
+    // (more efficient since we do not have to switch directions and thus have better caching performance)
+    // for that we need to slightly modify search()
+    for (OptimalSearch<nbrBlocks> & s : ss)
+    {
+        s.startPos = 0;
+        for (uint8_t i = 0; i < s.pi.size(); ++i)
+            if (s.pi[i] < s.pi[0])
+                s.startPos += s.blocklength[i] - ((i > 0) ? s.blocklength[i-1] : 0);
+    }
+}
+
+template <size_t nbrBlocks, size_t N>
+inline void _optimalSearchSchemeComputeFixedBlocklength(std::array<OptimalSearch<nbrBlocks>, N> & ss, uint32_t const needleLength)
+{
+    uint8_t blocks = ss[0].pi.size();
+    uint32_t blocklength = needleLength / blocks;
+    uint8_t rest = needleLength - blocks * blocklength;
+    std::vector<uint32_t> blocklengths;
+    for (uint8_t i = 0; i < blocks; ++i)
+        blocklengths.push_back(blocklength + (i < rest));
+
+    _optimalSearchSchemeSetBlockLength(ss, blocklengths);
+    _optimalSearchSchemeInit(ss);
+}
+
+template <typename TDelegate,
+          typename TText, typename TIndex, typename TIndexSpec,
+          typename TNeedle,
+          size_t nbrBlocks,
+          typename TDir>
+inline void _optimalSearchSchemeDeletion(TDelegate & delegate,
+                                         Iter<Index<TText, BidirectionalIndex<TIndex> >, VSTree<TopDown<TIndexSpec> > > iter,
+                                         TNeedle const & needle,
+                                         uint32_t const needleLeftPos,
+                                         uint32_t const needleRightPos,
+                                         uint8_t const errors,
+                                         OptimalSearch<nbrBlocks> const & s,
+                                         uint8_t const blockIndex,
+                                         TDir const & /**/)
+{
+    uint8_t const maxErrorsLeftInBlock = s.u[blockIndex] - errors;
+    uint8_t const minErrorsLeftInBlock = (s.l[blockIndex] > errors) ? (s.l[blockIndex] - errors) : 0;
+
+    if (minErrorsLeftInBlock == 0)
+    {
+        uint8_t const blockIndex2 = std::min(blockIndex + 1, static_cast<uint8_t>(s.u.size()) - 1);
+        bool const goToRight2 = s.pi[blockIndex2] > s.pi[blockIndex2 - 1];
+
+        if (goToRight2)
+        {
+            _optimalSearchScheme(delegate, iter, needle, needleLeftPos, needleRightPos, errors, s, blockIndex2, Rev(),
+                                 EditDistance());
+        }
+        else
+        {
+            _optimalSearchScheme(delegate, iter, needle, needleLeftPos, needleRightPos, errors, s, blockIndex2, Fwd(),
+                                 EditDistance());
+        }
+    }
+
+    if (maxErrorsLeftInBlock > 0 && goDown(iter, TDir()))
+    {
+        do
+        {
+            _optimalSearchSchemeDeletion(delegate, iter, needle, needleLeftPos, needleRightPos, errors + 1, s,
+                                         blockIndex, TDir());
+        } while (goRight(iter, TDir()));
+    }
+}
+
+template <typename TDelegate,
+          typename TText, typename TIndex, typename TIndexSpec,
+          typename TNeedle,
+          size_t nbrBlocks,
+          typename TDir,
+          typename TDistanceTag>
+inline void _optimalSearchSchemeChildren(TDelegate & delegate,
+                                         Iter<Index<TText, BidirectionalIndex<TIndex> >, VSTree<TopDown<TIndexSpec> > > iter,
+                                         TNeedle const & needle,
+                                         uint32_t const needleLeftPos,
+                                         uint32_t const needleRightPos,
+                                         uint8_t const errors,
+                                         OptimalSearch<nbrBlocks> const & s,
+                                         uint8_t const blockIndex,
+                                         uint8_t const minErrorsLeftInBlock,
+                                         TDir const & /**/,
+                                         TDistanceTag const & /**/)
+{
+    bool goToRight = std::is_same<TDir, Rev>::value;
+    if (goDown(iter, TDir()))
+    {
+        uint32_t charsLeft = s.blocklength[blockIndex] - (needleRightPos - needleLeftPos - 1);
+        do
+        {
+            bool delta = !ordEqual(parentEdgeLabel(iter, TDir()),
+                                   needle[goToRight ? needleRightPos - 1 : needleLeftPos - 1]);
+
+            // NOTE (cpockrandt): this might not be optimal yet! we have more edges than in the theoretical model,
+            // since we go down an edge before we check whether it can even work out!
+            if (!std::is_same<TDistanceTag, EditDistance>::value && minErrorsLeftInBlock > 0 &&
+                charsLeft + delta < minErrorsLeftInBlock + 1u) // charsLeft - 1 < minErrorsLeftInBlock - delta
+            {
+                continue;
+            }
+
+            int32_t needleLeftPos2 = needleLeftPos - !goToRight;
+            uint32_t needleRightPos2 = needleRightPos + goToRight;
+
+            if (needleRightPos - needleLeftPos == s.blocklength[blockIndex])
+            {
+                // leave the possibility for one or multiple deletions! therefore, don't change direction, etc!
+                if (std::is_same<TDistanceTag, EditDistance>::value)
+                {
+                    _optimalSearchSchemeDeletion(delegate, iter, needle, needleLeftPos2, needleRightPos2,
+                                                 errors + delta, s, blockIndex, TDir());
+                }
+                else
+                {
+                    uint8_t blockIndex2 = std::min(blockIndex + 1, static_cast<uint8_t>(s.u.size()) - 1);
+                    bool goToRight2 = s.pi[blockIndex2] > s.pi[blockIndex2 - 1];
+                    if (goToRight2)
+                    {
+                        _optimalSearchScheme(delegate, iter, needle, needleLeftPos2, needleRightPos2, errors + delta, s,
+                                             blockIndex2, Rev(), TDistanceTag());
+                    }
+                    else
+                    {
+                        _optimalSearchScheme(delegate, iter, needle, needleLeftPos2, needleRightPos2, errors + delta, s,
+                                             blockIndex2, Fwd(), TDistanceTag());
+                    }
+                }
+            }
+            else
+            {
+                _optimalSearchScheme(delegate, iter, needle, needleLeftPos2, needleRightPos2, errors + delta, s,
+                                     blockIndex, TDir(), TDistanceTag());
+            }
+
+            // Deletion
+            if (std::is_same<TDistanceTag, EditDistance>::value)
+            {
+                _optimalSearchScheme(delegate, iter, needle, needleLeftPos, needleRightPos, errors + 1, s, blockIndex,
+                                     TDir(), TDistanceTag());
+            }
+        } while (goRight(iter, TDir()));
+    }
+}
+
+template <typename TDelegate,
+          typename TText, typename TIndex, typename TIndexSpec,
+          typename TNeedle,
+          size_t nbrBlocks,
+          typename TDir,
+          typename TDistanceTag>
+inline void _optimalSearchSchemeExact(TDelegate & delegate,
+                                      Iter<Index<TText, BidirectionalIndex<TIndex> >, VSTree<TopDown<TIndexSpec> > > iter,
+                                      TNeedle const & needle,
+                                      uint32_t const needleLeftPos,
+                                      uint32_t const needleRightPos,
+                                      uint8_t const errors,
+                                      OptimalSearch<nbrBlocks> const & s,
+                                      uint8_t const blockIndex,
+                                      TDir const & /**/,
+                                      TDistanceTag const & /**/)
+{
+    bool goToRight2 = (blockIndex < s.pi.size() - 1) && s.pi[blockIndex + 1] > s.pi[blockIndex];
+    if (std::is_same<TDir, Rev>::value)
+    {
+        uint32_t infixPosLeft = needleRightPos - 1;
+        uint32_t infixPosRight = needleLeftPos + s.blocklength[blockIndex] - 1;
+
+        if (!goDown(iter, infix(needle, infixPosLeft, infixPosRight + 1), TDir()))
+            return;
+
+        if (goToRight2)
+        {
+            _optimalSearchScheme(delegate, iter, needle, needleLeftPos, infixPosRight + 2, errors, s,
+                                 std::min(blockIndex + 1, static_cast<uint8_t>(s.u.size()) - 1), Rev(), TDistanceTag());
+        }
+        else
+        {
+            _optimalSearchScheme(delegate, iter, needle, needleLeftPos, infixPosRight + 2, errors, s,
+                                 std::min(blockIndex + 1, static_cast<uint8_t>(s.u.size()) - 1), Fwd(), TDistanceTag());
+        }
+    }
+    else
+    {
+        // has to be signed, otherwise we run into troubles when checking for -1 >= 0u
+        int32_t infixPosLeft = needleRightPos - s.blocklength[blockIndex] - 1;
+        int32_t infixPosRight = needleLeftPos - 1;
+
+        while (infixPosRight >= infixPosLeft)
+        {
+            if (!goDown(iter, needle[infixPosRight], TDir()))
+                return;
+            --infixPosRight;
+        }
+        if (goToRight2)
+        {
+            _optimalSearchScheme(delegate, iter, needle, infixPosLeft, needleRightPos, errors, s,
+                                 std::min(blockIndex + 1, static_cast<uint8_t>(s.u.size()) - 1), Rev(), TDistanceTag());
+        }
+        else
+        {
+            _optimalSearchScheme(delegate, iter, needle, infixPosLeft, needleRightPos, errors, s,
+                                 std::min(blockIndex + 1, static_cast<uint8_t>(s.u.size()) - 1), Fwd(), TDistanceTag());
+        }
+    }
+}
+
+template <typename TDelegate,
+          typename TText, typename TIndex, typename TIndexSpec,
+          typename TNeedle,
+          size_t nbrBlocks,
+          typename TDir,
+          typename TDistanceTag>
+inline void _optimalSearchScheme(TDelegate & delegate,
+                                 Iter<Index<TText, BidirectionalIndex<TIndex> >, VSTree<TopDown<TIndexSpec> > > iter,
+                                 TNeedle const & needle,
+                                 uint32_t const needleLeftPos,
+                                 uint32_t const needleRightPos,
+                                 uint8_t const errors,
+                                 OptimalSearch<nbrBlocks> const & s,
+                                 uint8_t const blockIndex,
+                                 TDir const & /**/,
+                                 TDistanceTag const & /**/)
+{
+    uint8_t const maxErrorsLeftInBlock = s.u[blockIndex] - errors;
+    uint8_t const minErrorsLeftInBlock = (s.l[blockIndex] > errors) ? (s.l[blockIndex] - errors) : 0;
+
+    // Done.
+    if (minErrorsLeftInBlock == 0 && needleLeftPos == 0 && needleRightPos == length(needle) + 1)
+    {
+        delegate(iter, needle, errors);
+    }
+    // Exact search in current block.
+    else if (maxErrorsLeftInBlock == 0 && needleRightPos - needleLeftPos - 1 != s.blocklength[blockIndex])
+    {
+        _optimalSearchSchemeExact(delegate, iter, needle, needleLeftPos, needleRightPos, errors, s, blockIndex, TDir(),
+                                  TDistanceTag());
+    }
+    // Approximate search in current block.
+    // (s.blocklength[blockIndex]-(needleRightPos-needleLeftPos-(needleLeftPos!=needleRightPos))>=minErrorsLeftInBlock)
+    else
+    {
+        // Insertion
+        if (std::is_same<TDistanceTag, EditDistance>::value)
+        {
+            bool const goToRight = std::is_same<TDir, Rev>::value;
+            int32_t const needleLeftPos2 = needleLeftPos - !goToRight;
+            uint32_t const needleRightPos2 = needleRightPos + goToRight;
+
+            if (needleRightPos - needleLeftPos == s.blocklength[blockIndex])
+            {
+                // leave the possibility for one or multiple deletions! therefore, don't change direction, etc!
+                _optimalSearchSchemeDeletion(delegate, iter, needle, needleLeftPos2, needleRightPos2, errors + 1, s,
+                                             blockIndex, TDir());
+            }
+            else
+            {
+                _optimalSearchScheme(delegate, iter, needle, needleLeftPos2, needleRightPos2, errors + 1, s, blockIndex,
+                                     TDir(), TDistanceTag());
+            }
+        }
+        _optimalSearchSchemeChildren(delegate, iter, needle, needleLeftPos, needleRightPos, errors, s, blockIndex,
+                                     minErrorsLeftInBlock, TDir(), TDistanceTag());
+    }
+}
+
+template <typename TDelegate,
+          typename TText, typename TIndex, typename TIndexSpec,
+          typename TNeedle,
+          size_t nbrBlocks,
+          typename TDistanceTag>
+inline void _optimalSearchScheme(TDelegate & delegate,
+                                 Iter<Index<TText, BidirectionalIndex<TIndex> >, VSTree<TopDown<TIndexSpec> > > it,
+                                 TNeedle const & needle,
+                                 OptimalSearch<nbrBlocks> const & s,
+                                 TDistanceTag const & /**/)
+{
+    _optimalSearchScheme(delegate, it, needle, s.startPos, s.startPos + 1, 0, s, 0, Rev(), TDistanceTag());
+}
+
+template <typename TDelegate,
+          typename TText, typename TIndex, typename TIndexSpec,
+          typename TNeedle,
+          size_t nbrBlocks, size_t N,
+          typename TDistanceTag>
+inline void _optimalSearchScheme(TDelegate & delegate,
+                                 Iter<Index<TText, BidirectionalIndex<TIndex> >, VSTree<TopDown<TIndexSpec> > > it,
+                                 TNeedle const & needle,
+                                 std::array<OptimalSearch<nbrBlocks>, N> const & ss,
+                                 TDistanceTag const & /**/)
+{
+    for (auto & s : ss)
+        _optimalSearchScheme(delegate, it, needle, s, TDistanceTag());
+}
+
+// ----------------------------------------------------------------------------
+// Function find()
+// ----------------------------------------------------------------------------
+
+template <size_t minErrors, size_t maxErrors,
+          typename TDelegate,
+          typename TText, typename TIndexSpec,
+          typename TChar, typename TStringSpec,
+          typename TDistanceTag>
+inline void
+find(TDelegate & delegate,
+     Index<TText, BidirectionalIndex<TIndexSpec> > & index,
+     String<TChar, TStringSpec> const & needle,
+     TDistanceTag const & /**/)
+{
+    auto scheme = OptimalSearchSchemes<minErrors, maxErrors>::VALUE;
+    _optimalSearchSchemeComputeFixedBlocklength(scheme, length(needle));
+    Iter<Index<TText, BidirectionalIndex<TIndexSpec> >, VSTree<TopDown<> > > it(index);
+    _optimalSearchScheme(delegate, it, needle, scheme, TDistanceTag());
+}
+
+// ----------------------------------------------------------------------------
+// Function find()
+// ----------------------------------------------------------------------------
+
+template <size_t minErrors, size_t maxErrors,
+          typename TDelegate,
+          typename TText, typename TIndexSpec,
+          typename TNeedle, typename TStringSetSpec,
+          typename TDistanceTag,
+          typename TParallelTag>
+inline void
+find(TDelegate & delegate,
+     Index<TText, BidirectionalIndex<TIndexSpec> > & index,
+     StringSet<TNeedle, TStringSetSpec> const & needles,
+     TDistanceTag const & /**/,
+     TParallelTag const & /**/)
+{
+    typedef typename Iterator<StringSet<TNeedle, TStringSetSpec> const, Rooted>::Type TNeedleIt;
+    typedef typename Reference<TNeedleIt>::Type                                       TNeedleRef;
+    iterate(needles, [&](TNeedleIt const & needleIt)
+    {
+        TNeedleRef needle = value(needleIt);
+        find<minErrors, maxErrors>(delegate, index, needle, TDistanceTag());
+    },
+    Rooted(), TParallelTag());
+}
+
+// ----------------------------------------------------------------------------
+// Function find()
+// ----------------------------------------------------------------------------
+
+template <size_t minErrors, size_t maxErrors,
+          typename TDelegate,
+          typename TText, typename TIndexSpec,
+          typename TNeedle, typename TStringSetSpec,
+          typename TDistanceTag>
+inline void
+find(TDelegate & delegate,
+     Index<TText, BidirectionalIndex<TIndexSpec> > & index,
+     StringSet<TNeedle, TStringSetSpec> const & needles,
+     TDistanceTag const & /**/)
+{
+    find<minErrors, maxErrors>(delegate, index, needles, TDistanceTag(), Serial());
+}
+
+}
+
+#endif  // #ifndef SEQAN_INDEX_FIND2_INDEX_APPROX_H_
diff --git a/include/seqan/index/find_backtracking.h b/include/seqan/index/find_backtracking.h
index d95798c..5eb3e47 100644
--- a/include/seqan/index/find_backtracking.h
+++ b/include/seqan/index/find_backtracking.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -284,7 +284,7 @@ template <typename TPrefix>
 inline unsigned
 getScore(PrefixAligner_<TPrefix, HammingDistance> const & me, bool atEnd)
 {
-    return atEnd ? me.errors : MaxValue<unsigned>::VALUE;
+    return atEnd ? me.errors : std::numeric_limits<unsigned>::max();
 }
 
 template <typename TPrefix>
diff --git a/include/seqan/index/find_index.h b/include/seqan/index/find_index.h
index b9bf544..23dc276 100644
--- a/include/seqan/index/find_index.h
+++ b/include/seqan/index/find_index.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index/find_index_approx.h b/include/seqan/index/find_index_approx.h
index 9e94e9a..ab7cd56 100644
--- a/include/seqan/index/find_index_approx.h
+++ b/include/seqan/index/find_index_approx.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index/find_index_binary.h b/include/seqan/index/find_index_binary.h
index 79edad5..25d6f51 100644
--- a/include/seqan/index/find_index_binary.h
+++ b/include/seqan/index/find_index_binary.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index/find_index_esa.h b/include/seqan/index/find_index_esa.h
index 344900b..596f245 100644
--- a/include/seqan/index/find_index_esa.h
+++ b/include/seqan/index/find_index_esa.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index/find_index_lambda.h b/include/seqan/index/find_index_lambda.h
index a39d498..2d84003 100644
--- a/include/seqan/index/find_index_lambda.h
+++ b/include/seqan/index/find_index_lambda.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -112,7 +112,7 @@ _findBacktracking(TIndexIt indexIt,
         else
         {
             // Insertion.
-            if (IsSameType<TDistance, EditDistance>::VALUE)
+            SEQAN_IF_CONSTEXPR (IsSameType<TDistance, EditDistance>::VALUE)
             {
                 _findBacktracking(indexIt, needle, needleIt + 1,
                                   static_cast<TThreshold>(errors + 1), threshold, delegate, TDistance());
@@ -128,7 +128,7 @@ _findBacktracking(TIndexIt indexIt,
                                       static_cast<TThreshold>(errors + delta), threshold, delegate, TDistance());
 
                     // Deletion.
-                    if (IsSameType<TDistance, EditDistance>::VALUE)
+                    SEQAN_IF_CONSTEXPR (IsSameType<TDistance, EditDistance>::VALUE)
                     {
                         _findBacktracking(indexIt, needle, needleIt,
                                           static_cast<TThreshold>(errors + 1), threshold, delegate, TDistance());
diff --git a/include/seqan/index/find_index_qgram.h b/include/seqan/index/find_index_qgram.h
index bd50496..b30df03 100644
--- a/include/seqan/index/find_index_qgram.h
+++ b/include/seqan/index/find_index_qgram.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -80,7 +80,7 @@ namespace seqan
         TDir const &dir = indexDir(index);
         TShape &shape = indexShape(index);
 
-        if (IsSameType<TBucketMap, Nothing>::VALUE)
+        SEQAN_IF_CONSTEXPR (IsSameType<TBucketMap, Nothing>::VALUE)
         {
             // hashUpper and patterns shorter than the shape can only be used for
             // direct addressing q-gram indices
diff --git a/include/seqan/index/find_pigeonhole.h b/include/seqan/index/find_pigeonhole.h
index 88e104f..96a3f48 100644
--- a/include/seqan/index/find_pigeonhole.h
+++ b/include/seqan/index/find_pigeonhole.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -468,7 +468,7 @@ inline void _patternInit(Pattern<TIndex, Pigeonhole<TSpec> > &pattern, TFloat er
 
         pattern._currentErrorRate = _newErrorRate;
 
-        TSize minDelta = MaxValue<TSize>::VALUE;
+        TSize minDelta = std::numeric_limits<TSize>::max();
         TSize maxDelta = 3;
         TSize maxSeqLen = 0;
         for(unsigned seqNo = 0; seqNo < seqCount; ++seqNo)
@@ -504,7 +504,7 @@ inline void _patternInit(Pattern<TIndex, Pigeonhole<TSpec> > &pattern, TFloat er
             minDelta = pattern.params.delta;
         }
 
-        if (minDelta == MaxValue<TSize>::VALUE)
+        if (minDelta == std::numeric_limits<TSize>::max())
         {
             // disable index
             minDelta = pattern.maxSeqLen + 1;
diff --git a/include/seqan/index/find_quasar.h b/include/seqan/index/find_quasar.h
index 402ce0d..3d50718 100644
--- a/include/seqan/index/find_quasar.h
+++ b/include/seqan/index/find_quasar.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index/find_swift.h b/include/seqan/index/find_swift.h
index 9c5d176..3af4eed 100644
--- a/include/seqan/index/find_swift.h
+++ b/include/seqan/index/find_swift.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index/index_base.h b/include/seqan/index/index_base.h
index bb74311..222c069 100644
--- a/include/seqan/index/index_base.h
+++ b/include/seqan/index/index_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // Copyright (c) 2013 NVIDIA Corporation
 // All rights reserved.
 //
@@ -201,6 +201,7 @@ SEQAN_CONCEPT_REFINE(StringTrieConcept, (TIndex), (StringIndexConcept)) {};
  * @headerfile <seqan/index.h>
  * @brief Default @link String @endlink specialization type of the @link Fibre
  *        @endlink of an @link Index @endlink.
+ * @deprecated Deprecated in favor of StringSpec.
  *
  * @signature DefaultIndexStringSpec<TIndex>::Type;
  *
@@ -1317,13 +1318,13 @@ template <
 
     template <typename TValue>
     inline void _setSizeInval(TValue &v) {
-        v = MaxValue<TValue>::VALUE;
+        v = std::numeric_limits<TValue>::max();
     }
 
     template <typename TValue>
     inline bool _isSizeInval(TValue const &v) {
 //IOREV _notio_
-        return v == MaxValue<TValue>::VALUE;
+        return v == std::numeric_limits<TValue>::max();
     }
 
 //////////////////////////////////////////////////////////////////////////////
diff --git a/include/seqan/index/index_bidirectional.h b/include/seqan/index/index_bidirectional.h
index 80b6104..c9dd97e 100644
--- a/include/seqan/index/index_bidirectional.h
+++ b/include/seqan/index/index_bidirectional.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index/index_bidirectional_stree.h b/include/seqan/index/index_bidirectional_stree.h
index 9f14588..a306017 100644
--- a/include/seqan/index/index_bidirectional_stree.h
+++ b/include/seqan/index/index_bidirectional_stree.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index/index_bifm.h b/include/seqan/index/index_bifm.h
index b1ae559..c091135 100644
--- a/include/seqan/index/index_bifm.h
+++ b/include/seqan/index/index_bifm.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index/index_bifm_stree.h b/include/seqan/index/index_bifm_stree.h
index 089f70d..fabb217 100644
--- a/include/seqan/index/index_bifm_stree.h
+++ b/include/seqan/index/index_bifm_stree.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -86,6 +86,9 @@ _goDownString(Iter<Index<TText, BidirectionalIndex<FMIndex<TOccSpec, TIndexSpec>
     TStringIter stringIt = begin(string, Standard());
     TStringIter stringEnd = end(string, Standard());
 
+    if (SEQAN_UNLIKELY(stringIt == stringEnd))
+        return true;
+
     _historyPush(_iter(it, TDirection()));
 
     for (lcp = 0; stringIt != stringEnd; ++stringIt, ++lcp)
diff --git a/include/seqan/index/index_bwt.h b/include/seqan/index/index_bwt.h
index 7844844..98c3c02 100644
--- a/include/seqan/index/index_bwt.h
+++ b/include/seqan/index/index_bwt.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index/index_childtab.h b/include/seqan/index/index_childtab.h
index 91e6af0..0f998c8 100644
--- a/include/seqan/index/index_childtab.h
+++ b/include/seqan/index/index_childtab.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -73,7 +73,7 @@ namespace seqan
         stack_updown.push(TPair(0, 0));
         stack_nextl.push(TPair(0, 0));
 
-        dest.undefinedValue = TPair(MaxValue<TSize>::VALUE, 0);        // undefined value for unused entries
+        dest.undefinedValue = TPair(std::numeric_limits<TSize>::max(), 0);        // undefined value for unused entries
         resize(dest, length(lcpIn));
         beginRead(lcpIn);
         beginWrite(dest);
diff --git a/include/seqan/index/index_dfi.h b/include/seqan/index/index_dfi.h
index f9bb471..5d6450c 100644
--- a/include/seqan/index/index_dfi.h
+++ b/include/seqan/index/index_dfi.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index/index_esa_algs.h b/include/seqan/index/index_esa_algs.h
index 339bca2..cdae012 100644
--- a/include/seqan/index/index_esa_algs.h
+++ b/include/seqan/index/index_esa_algs.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index/index_esa_algs_multi.h b/include/seqan/index/index_esa_algs_multi.h
index fde159d..03c4f40 100644
--- a/include/seqan/index/index_esa_algs_multi.h
+++ b/include/seqan/index/index_esa_algs_multi.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index/index_esa_base.h b/include/seqan/index/index_esa_base.h
index fd34dd4..35d29f7 100644
--- a/include/seqan/index/index_esa_base.h
+++ b/include/seqan/index/index_esa_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // Copyright (c) 2013 NVIDIA Corporation
 // All rights reserved.
 //
diff --git a/include/seqan/index/index_esa_drawing.h b/include/seqan/index/index_esa_drawing.h
index b86fb1a..9c2804c 100644
--- a/include/seqan/index/index_esa_drawing.h
+++ b/include/seqan/index/index_esa_drawing.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index/index_esa_stree.h b/include/seqan/index/index_esa_stree.h
index 60cfbf3..31e7e37 100644
--- a/include/seqan/index/index_esa_stree.h
+++ b/include/seqan/index/index_esa_stree.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // Copyright (c) 2013 NVIDIA Corporation
 // All rights reserved.
 //
@@ -1533,7 +1533,7 @@ SEQAN_CONCEPT_IMPL((Index<TText, IndexEsa<TSpec> > const), (StringTreeConcept));
 
         typename Iterator<Index<TText, TIndexSpec>, TSpec>::Type it(index);
 
-        if (IsSameType<typename TTraits::DfsOrder, Postorder_>::VALUE) {
+        SEQAN_IF_CONSTEXPR (IsSameType<typename TTraits::DfsOrder, Postorder_>::VALUE) {
             while (goDown(it)) ;
         }
 
@@ -1582,7 +1582,7 @@ SEQAN_CONCEPT_IMPL((Index<TText, IndexEsa<TSpec> > const), (StringTreeConcept));
 
         goRoot(it);
 
-        if (IsSameType<typename TTraits::DfsOrder, Postorder_>::VALUE) {
+        SEQAN_IF_CONSTEXPR (IsSameType<typename TTraits::DfsOrder, Postorder_>::VALUE) {
             while (goDown(it)) ;
             return;
         }
diff --git a/include/seqan/index/index_fm.h b/include/seqan/index/index_fm.h
index 6d40e05..c4e4ab6 100644
--- a/include/seqan/index/index_fm.h
+++ b/include/seqan/index/index_fm.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // Copyright (c) 2013 NVIDIA Corporation
 // All rights reserved.
 //
diff --git a/include/seqan/index/index_fm_compressed_sa.h b/include/seqan/index/index_fm_compressed_sa.h
index 784742b..af7b44c 100644
--- a/include/seqan/index/index_fm_compressed_sa.h
+++ b/include/seqan/index/index_fm_compressed_sa.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // Copyright (c) 2013 NVIDIA Corporation
 // All rights reserved.
 //
@@ -305,7 +305,7 @@ void createCompressedSa(CompressedSA<TText, TSpec, TConfig> & compressedSA, TSA
 
     for (TSASize pos = offset; saIt != saItEnd; ++saIt, ++pos)
     {
-        if (getSeqOffset(getValue(saIt)) % TConfig::SAMPLING == 0)
+        if (getSeqOffset(*saIt) % TConfig::SAMPLING == 0)
             setValue(indicators, pos, true);
         else
             setValue(indicators, pos, false);
@@ -319,7 +319,7 @@ void createCompressedSa(CompressedSA<TText, TSpec, TConfig> & compressedSA, TSA
     {
         if (getValue(indicators, pos))
         {
-            assignValue(values, counter, getValue(saIt));
+            assignValue(values, counter, *saIt);
             ++counter;
         }
     }
diff --git a/include/seqan/index/index_fm_compressed_sa_iterator.h b/include/seqan/index/index_fm_compressed_sa_iterator.h
index 3d02552..e873141 100644
--- a/include/seqan/index/index_fm_compressed_sa_iterator.h
+++ b/include/seqan/index/index_fm_compressed_sa_iterator.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // Copyright (c) 2013 NVIDIA Corporation
 // All rights reserved.
 //
diff --git a/include/seqan/index/index_fm_dox.h b/include/seqan/index/index_fm_dox.h
index fc091af..3eb435f 100644
--- a/include/seqan/index/index_fm_dox.h
+++ b/include/seqan/index/index_fm_dox.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index/index_fm_lf_table.h b/include/seqan/index/index_fm_lf_table.h
index 1ee81ef..de942c7 100644
--- a/include/seqan/index/index_fm_lf_table.h
+++ b/include/seqan/index/index_fm_lf_table.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // Copyright (c) 2013 NVIDIA Corporation
 // All rights reserved.
 //
@@ -494,13 +494,36 @@ _getCumulativeBwtRank(LF<TText, TSpec, TConfig> const & lf, TPos pos, TValue val
 // ----------------------------------------------------------------------------
 
 template <typename TText, typename TSpec, typename TConfig, typename TPos>
-inline
-typename Size<LF<TText, TSpec, TConfig> const>::Type
+inline std::enable_if_t<!isWaveletTree<typename TConfig::Bwt>::Value, typename Size<LF<TText, TSpec, TConfig> >::Type>
 _getBwtRank(LF<TText, TSpec, TConfig> const & lf, TPos pos)
 {
     return _getBwtRank(lf, pos, getValue(lf.bwt, pos));
 }
 
+template <typename TText, typename TSpec, typename TConfig, typename TPos>
+inline std::enable_if_t<isWaveletTree<typename TConfig::Bwt>::Value, typename Size<LF<TText, TSpec, TConfig> >::Type>
+_getBwtRank(LF<TText, TSpec, TConfig> const & lf, TPos pos)
+{
+    typedef typename Value<LF<TText, TSpec, TConfig> >::Type    TChar;
+    typedef typename Size<LF<TText, TSpec, TConfig> >::Type     TSize;
+
+    TChar val;
+    TSize rank = 0;
+
+    if (pos > 0)
+    {
+        rank = _getRankAndValue(lf.bwt, pos - 1, val);
+
+        if (ordEqual(lf.sentinelSubstitute, val))
+            rank -= _getSentinelsRank(lf, pos - 1);
+    }
+    else
+    {
+        val = getValue(lf.bwt, pos);
+    }
+    return rank + _getPrefixSum(lf, val);
+}
+
 template <typename TText, typename TSpec, typename TConfig, typename TPos, typename TValue>
 inline
 typename Size<LF<TText, TSpec, TConfig> >::Type
@@ -537,7 +560,7 @@ _setSentinelSubstitute(LF<TText, TSpec, TConfig> & lf)
     typedef typename Value<TPrefixSums>::Type           TValue;
     typedef typename Size<TPrefixSums>::Type            TSize;
 
-    TValue minOcc = MaxValue<TValue>::VALUE;
+    TValue minOcc = std::numeric_limits<TValue>::max();
     TSize ordVal = 0;
 
     for (TSize i = 0; i < length(lf.sums) - 1; ++i)
@@ -577,20 +600,20 @@ _createBwt(LF<TText, TSpec, TConfig> & lf, TBwt & bwt, TOtherText const & text,
     TSAIter saItEnd = end(sa, Standard());
     TBwtIter bwtIt = begin(bwt, Standard());
 
-    assignValue(bwtIt, back(text));
+    *bwtIt = back(text);
     ++bwtIt;
 
     for (; saIt != saItEnd; ++saIt, ++bwtIt)
     {
-        TSAValue pos = getValue(saIt);
+        TSAValue pos = *saIt;
 
         if (pos != 0)
         {
-            assignValue(bwtIt, getValue(text, pos - 1));
+            *bwtIt = getValue(text, pos - 1);
         }
         else
         {
-            assignValue(bwtIt, lf.sentinelSubstitute);
+            *bwtIt = lf.sentinelSubstitute;
             lf.sentinels = bwtIt - begin(bwt, Standard());
         }
     }
@@ -625,7 +648,7 @@ _createBwt(LF<StringSet<TText, TSSetSpec>, TSpec, TConfig> & lf, TBwt & bwt, TOt
     {
         if (length(text[seqNum - i]) > 0)
         {
-            assignValue(bwtIt, back(text[seqNum - i]));
+            *bwtIt = back(text[seqNum - i]);
             setValue(lf.sentinels, bwtIt - bwtItBeg, false);
         }
     }
@@ -634,16 +657,16 @@ _createBwt(LF<StringSet<TText, TSSetSpec>, TSpec, TConfig> & lf, TBwt & bwt, TOt
     for (; saIt != saItEnd; ++saIt, ++bwtIt)
     {
         TSAValue pos;    // = SA[i];
-        posLocalize(pos, getValue(saIt), stringSetLimits(text));
+        posLocalize(pos, *saIt, stringSetLimits(text));
 
         if (getSeqOffset(pos) != 0)
         {
-            assignValue(bwtIt, getValue(getValue(text, getSeqNo(pos)), getSeqOffset(pos) - 1));
+            *bwtIt = getValue(getValue(text, getSeqNo(pos)), getSeqOffset(pos) - 1);
             setValue(lf.sentinels, bwtIt - bwtItBeg, false);
         }
         else
         {
-            assignValue(bwtIt, lf.sentinelSubstitute);
+            *bwtIt = lf.sentinelSubstitute;
             setValue(lf.sentinels, bwtIt - bwtItBeg, true);
         }
     }
@@ -672,8 +695,36 @@ _createBwt(LF<StringSet<TText, TSSetSpec>, TSpec, TConfig> & lf, TBwt & bwt, TOt
  * @return TReturn Returns a <tt>bool</tt> which is <tt>true</tt> on successes and <tt>false</tt> otherwise.
  */
 // This function creates all table of the lf table given a text and a suffix array.
+
+template <typename TText, typename TSpec, typename TConfig, typename TOtherText, typename TSA>
+inline std::enable_if_t<!isWaveletTree<typename TConfig::Bwt>::Value, void>
+createLF(LF<TText, TSpec, TConfig> & lf, TOtherText const & text, TSA const & sa)
+{
+    typedef LF<TText, TSpec, TConfig>                          TLF;
+    typedef typename Value<TLF>::Type                          TValue;
+    typedef typename Size<TLF>::Type                           TSize;
+
+    // Clear assuming undefined state.
+    clear(lf);
+
+    // Compute prefix sum.
+    prefixSums<TValue>(lf.sums, text);
+
+    // Choose the sentinel substitute.
+    _setSentinelSubstitute(lf);
+
+    // Create and index BWT bwt for rank queries.
+    createRankDictionary(lf, text, sa);
+
+    // Add sentinels to prefix sum.
+    TSize sentinelsCount = countSequences(text);
+    for (TSize i = 0; i < length(lf.sums); ++i)
+        lf.sums[i] += sentinelsCount;
+}
+
 template <typename TText, typename TSpec, typename TConfig, typename TOtherText, typename TSA>
-inline void createLF(LF<TText, TSpec, TConfig> & lf, TOtherText const & text, TSA const & sa)
+inline std::enable_if_t<isWaveletTree<typename TConfig::Bwt>::Value, void>
+createLF(LF<TText, TSpec, TConfig> & lf, TOtherText const & text, TSA const & sa)
 {
     typedef LF<TText, TSpec, TConfig>                          TLF;
     typedef typename Fibre<TLF, FibreTempBwt>::Type            TBwt;
diff --git a/include/seqan/index/index_fm_rank_dictionary_base.h b/include/seqan/index/index_fm_rank_dictionary_base.h
index fd6b5a2..1b3425b 100644
--- a/include/seqan/index/index_fm_rank_dictionary_base.h
+++ b/include/seqan/index/index_fm_rank_dictionary_base.h
@@ -38,6 +38,13 @@
 namespace seqan {
 
 // ============================================================================
+// Forwards
+// ============================================================================
+
+template <typename TText, typename TSpec, typename TConfig>
+struct LF;
+
+// ============================================================================
 // Tags
 // ============================================================================
 
@@ -255,12 +262,91 @@ createRankDictionary(RankDictionary<TValue, TSpec> & dict, TText const & text)
     TTextIterator textBegin = begin(text, Standard());
     TTextIterator textEnd = end(text, Standard());
     for (TTextIterator textIt = textBegin; textIt != textEnd; ++textIt)
-        setValue(dict, textIt - textBegin, value(textIt));
+        setValue(dict, textIt - textBegin, *textIt);
 
     // Update all ranks.
     updateRanks(dict);
 }
 
+template <typename TText, typename TSpec, typename TConfig, typename TOtherText, typename TSA>
+inline void
+createRankDictionary(LF<TText, TSpec, TConfig> & lf, TOtherText const & text, TSA const & sa)
+{
+    typedef typename GetValue<TSA>::Type                    TSAValue;
+    typedef typename Size<TSA>::Type                        TSize;
+
+    // Resize the RankDictionary.
+    resize(lf.bwt, lengthSum(text) + 1, Exact());
+
+    // Assign the text value by value.
+    setValue(lf.bwt, 0, back(text));
+
+    for (TSize i = 0; i < length(sa); ++i)
+    {
+        TSAValue pos = sa[i];
+
+        if (pos != 0)
+        {
+            setValue(lf.bwt, i + 1, getValue(text, pos - 1));
+        }
+        else
+        {
+            setValue(lf.bwt, i + 1, lf.sentinelSubstitute);
+            lf.sentinels = i + 1;
+        }
+    }
+
+   // Update all ranks.
+   updateRanks(lf.bwt);
+}
+
+template <typename TText, typename TSSetSpec, typename TSpec, typename TConfig, typename TOtherText, typename TSA>
+inline void
+createRankDictionary(LF<StringSet<TText, TSSetSpec>, TSpec, TConfig> & lf, TOtherText const & text, TSA const & sa)
+{
+    typedef typename Value<TSA>::Type                       TSAValue;
+    typedef typename Size<TSA>::Type                        TSize;
+
+    // Resize the RankDictionary.
+    TSize seqNum = countSequences(text);
+    TSize totalLen = lengthSum(text);
+    resize(lf.sentinels, seqNum + totalLen, Exact());
+    resize(lf.bwt, seqNum + totalLen, Exact());
+
+    // Fill the sentinel positions (they are all at the beginning of the bwt).
+    for (TSize i = 0; i < seqNum; ++i)
+    {
+        if (length(text[seqNum - (i + 1)]) > 0)
+        {
+            setValue(lf.bwt, i, back(text[seqNum - (i + 1)]));
+            setValue(lf.sentinels, i, false);
+        }
+    }
+
+    // Compute the rest of the bwt.
+    for (TSize i = 0; i < length(sa); ++i)
+    {
+        TSAValue pos;    // = SA[i];
+        posLocalize(pos, sa[i], stringSetLimits(text));
+
+        if (getSeqOffset(pos) != 0)
+        {
+            setValue(lf.bwt, i + seqNum, getValue(getValue(text, getSeqNo(pos)), getSeqOffset(pos) - 1));
+            setValue(lf.sentinels, i + seqNum, false);
+        }
+        else
+        {
+            setValue(lf.bwt, i + seqNum, lf.sentinelSubstitute);
+            setValue(lf.sentinels, i + seqNum, true);
+        }
+    }
+
+   // Update all ranks.
+   updateRanks(lf.bwt);
+   // Update the auxiliary RankDictionary of sentinel positions.
+   updateRanks(lf.sentinels);
+}
+
 // ----------------------------------------------------------------------------
 // Function getRank()
 // ----------------------------------------------------------------------------
diff --git a/include/seqan/index/index_fm_rank_dictionary_levels.h b/include/seqan/index/index_fm_rank_dictionary_levels.h
index f3ea16f..2eeeadd 100644
--- a/include/seqan/index/index_fm_rank_dictionary_levels.h
+++ b/include/seqan/index/index_fm_rank_dictionary_levels.h
@@ -190,16 +190,6 @@ struct RankDictionaryBitsPerBlock_<TValue, Levels<TSpec, TConfig> > :
     BitsPerValue<typename RankDictionaryBlock_<TValue, Levels<TSpec, TConfig> >::Type> {};
 
 // ----------------------------------------------------------------------------
-// Metafunction Size
-// ----------------------------------------------------------------------------
-
-template <typename TValue, typename TSpec, typename TConfig>
-struct Size<RankDictionary<TValue, Levels<TSpec, TConfig> > >
-{
-    typedef typename Size<TConfig>::Type Type;
-};
-
-// ----------------------------------------------------------------------------
 // Metafunction RankDictionaryBlockSize_
 // ----------------------------------------------------------------------------
 
diff --git a/include/seqan/index/index_fm_rank_dictionary_wt.h b/include/seqan/index/index_fm_rank_dictionary_wt.h
index 3c75e16..a62b696 100644
--- a/include/seqan/index/index_fm_rank_dictionary_wt.h
+++ b/include/seqan/index/index_fm_rank_dictionary_wt.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // Copyright (c) 2013 NVIDIA Corporation
 // All rights reserved.
 //
@@ -77,6 +77,18 @@ struct WTRDConfig : LevelsRDConfig<TSize, TFibre, LEVELS, WORDS_PER_BLOCK>
 template <typename TSpec = void, typename TConfig = WTRDConfig<> >
 struct WaveletTree {};
 
+template <typename T>
+struct isWaveletTree
+{
+    static constexpr bool Value = false;
+};
+
+template <typename TSpec, typename TConfig>
+struct isWaveletTree<WaveletTree<TSpec, TConfig> >
+{
+    static constexpr bool Value = true;
+};
+
 struct FibreTreeStructure_;
 typedef Tag<FibreTreeStructure_>    const FibreTreeStructure;
 
@@ -346,6 +358,49 @@ getRank(RankDictionary<TValue, WaveletTree<TSpec, TConfig> > const & dict, TPos
     return 0;
 }
 
+template <typename TValue, typename TSpec, typename TConfig, typename TPos, typename TChar>
+inline typename Size<RankDictionary<TValue, WaveletTree<TSpec, TConfig> > >::Type
+_getRankAndValue(RankDictionary<TValue, WaveletTree<TSpec, TConfig> > const & dict, TPos pos, TChar & character)
+{
+    typedef typename Fibre<RankDictionary<TValue, WaveletTree<TSpec, TConfig> >, FibreTreeStructure>::Type const    TWaveletTreeStructure;
+
+    typename Iterator<TWaveletTreeStructure, TopDown<> >::Type iter(dict.waveletTreeStructure, 0);
+
+    bool zero = false;
+    TPos posChar = pos + 1;
+    character = dict.waveletTreeStructure.minCharValue;
+
+    while (true)
+    {
+        TPos rank1 = getRank(dict.ranks[getPosition(iter)], posChar);
+        bool value = getValue(dict.ranks[getPosition(iter)], posChar);
+        TPos addValue = rank1 - value;
+
+        if (value)
+        {
+            character = getCharacter(iter);
+            if (addValue == 0) zero = true;
+            posChar = rank1 - 1;  // -1 because strings start at 0
+            pos = addValue - 1;
+            if (!goRightChild(iter))
+                break;
+        }
+        else
+        {
+            if (addValue > pos) zero = true;
+            posChar -= rank1;
+            pos -= addValue;
+            if (!goLeftChild(iter))
+                break;
+        }
+    }
+
+    if (zero)
+         return 0;
+
+    return pos + 1;
+}
+
 // ----------------------------------------------------------------------------
 // Function _fillStructure()
 // ----------------------------------------------------------------------------
@@ -375,7 +430,7 @@ inline void _fillStructure(RankDictionary<TValue, WaveletTree<TSpec, TConfig> >
         while (true)
         {
             // decide whether the character is smaller then the pivot element of the current node
-            if (ordGreater(getCharacter(it), value(textIt)))
+            if (ordGreater(getCharacter(it), *textIt))
             {
                 // TODO(esiragusa): use resize() & setValue() instead of appendValue().
                 appendValue(dict.ranks[getPosition(it)], false);
diff --git a/include/seqan/index/index_fm_right_array_binary_tree.h b/include/seqan/index/index_fm_right_array_binary_tree.h
index 597b155..af3da16 100644
--- a/include/seqan/index/index_fm_right_array_binary_tree.h
+++ b/include/seqan/index/index_fm_right_array_binary_tree.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // Copyright (c) 2013 NVIDIA Corporation
 // All rights reserved.
 //
diff --git a/include/seqan/index/index_fm_right_array_binary_tree_iterator.h b/include/seqan/index/index_fm_right_array_binary_tree_iterator.h
index a9c251c..01ef001 100644
--- a/include/seqan/index/index_fm_right_array_binary_tree_iterator.h
+++ b/include/seqan/index/index_fm_right_array_binary_tree_iterator.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // Copyright (c) 2013 NVIDIA Corporation
 // All rights reserved.
 //
diff --git a/include/seqan/index/index_fm_sparse_string.h b/include/seqan/index/index_fm_sparse_string.h
index a7d0560..1ce009e 100644
--- a/include/seqan/index/index_fm_sparse_string.h
+++ b/include/seqan/index/index_fm_sparse_string.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // Copyright (c) 2013 NVIDIA Corporation
 // All rights reserved.
 //
diff --git a/include/seqan/index/index_fm_stree.h b/include/seqan/index/index_fm_stree.h
index 956c17f..ec54eb8 100644
--- a/include/seqan/index/index_fm_stree.h
+++ b/include/seqan/index/index_fm_stree.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // Copyright (c) 2013 NVIDIA Corporation
 // All rights reserved.
 //
@@ -56,18 +56,16 @@ struct HistoryStackFM_
     TSize       repLen;
     TAlphabet   lastChar;
 
-   
     HistoryStackFM_() {}
 
     template <typename TSize_, typename TAlphabet_>
-   
+
     HistoryStackFM_(Pair<TSize_> const &_range, TSize_ _repLen, TAlphabet_ _lastChar):
         range(_range),
         repLen(_repLen),
         lastChar(_lastChar)
     {}
 
-   
     HistoryStackFM_ const &
     operator=(HistoryStackFM_ const & _origin)
     {
@@ -90,7 +88,6 @@ struct VertexFM
     TSize       repLen;
     TAlphabet   lastChar;
 
-   
     VertexFM() :
         range(0, 0),
         smaller(0),
@@ -98,7 +95,6 @@ struct VertexFM
         lastChar(0)
     {}
 
-   
     VertexFM(MinimalCtor) :
         range(0, 0),
         smaller(0),
@@ -106,7 +102,6 @@ struct VertexFM
         lastChar(0)
     {}
 
-   
     VertexFM(Pair<TSize> newCurrentRange, TSize newSmallerValue, TSize newRepLen, TAlphabet newChar) :
         range(newCurrentRange),
         smaller(newSmallerValue),
@@ -114,7 +109,6 @@ struct VertexFM
         lastChar(newChar)
     {}
 
-   
     VertexFM(VertexFM const & other) :
         range(other.range),
         smaller(other.smaller),
@@ -359,11 +353,14 @@ _goDownString(Iter<Index<TText, FMIndex<TOccSpec, TIndexSpec> >, VSTree<TopDown<
     typedef Pair<TSize2>                                        TRange;
     typedef typename Iterator<TString const, Standard>::Type    TStringIter;
 
-    _historyPush(it);
-
     TStringIter stringIt = begin(string, Standard());
     TStringIter stringEnd = end(string, Standard());
 
+    if (SEQAN_UNLIKELY(stringIt == stringEnd))
+        return true;
+
+    _historyPush(it);
+
     for (lcp = 0; stringIt != stringEnd; ++stringIt, ++lcp)
     {
         TRange _range;
@@ -466,7 +463,7 @@ nodeUp(Iter<Index<TText, FMIndex<TOccSpec, TIndexSpec> >, VSTree< TopDown< Paren
     typedef typename VertexDescriptor<TIndex>::Type         TVertexDescriptor;
 
     if (!empty(it.history))
-        return TVertexDescriptor(back(it.history).range, back(it.history).repLen, back(it.history).lastChar);
+        return TVertexDescriptor(back(it.history).range, 0, back(it.history).repLen, back(it.history).lastChar);
     else
         return value(it);
 }
diff --git a/include/seqan/index/index_forwards.h b/include/seqan/index/index_forwards.h
index 30633f1..c804693 100644
--- a/include/seqan/index/index_forwards.h
+++ b/include/seqan/index/index_forwards.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index/index_lcp.h b/include/seqan/index/index_lcp.h
index 1b4be86..5eab4a5 100644
--- a/include/seqan/index/index_lcp.h
+++ b/include/seqan/index/index_lcp.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index/index_lcp_tree.h b/include/seqan/index/index_lcp_tree.h
index 013dd6c..ca7655f 100644
--- a/include/seqan/index/index_lcp_tree.h
+++ b/include/seqan/index/index_lcp_tree.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index/index_pizzachili.h b/include/seqan/index/index_pizzachili.h
index 9d5d2e1..d439845 100644
--- a/include/seqan/index/index_pizzachili.h
+++ b/include/seqan/index/index_pizzachili.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -274,6 +274,7 @@ indexSolveDependencies(Index<TText, PizzaChili<TSpec> >& me, PizzaChiliCompresse
 
 namespace impl {
     template <typename TText, typename TSpec>
+    [[deprecated("The PizzaChiliIndex is outdated and is not maintained anymore.")]]
     inline bool
     createPizzaChiliIndex(
         Index<TText, PizzaChili<TSpec> >& me,
@@ -301,6 +302,7 @@ namespace impl {
 } // namespace impl
 
 template <typename TText, typename TSpec>
+[[deprecated("The PizzaChiliIndex is outdated and is not maintained anymore.")]]
 inline bool
 indexCreate(Index<TText, PizzaChili<TSpec> >& me, PizzaChiliCompressed const) {
     typedef
@@ -351,6 +353,7 @@ setIndexText(Index<TText, PizzaChili<TSpec> >& me, TOtherText& text) {
 //////////////////////////////////////////////////////////////////////////////
 
 template <typename TText, typename TSpec>
+[[deprecated("The PizzaChiliIndex is outdated and is not maintained anymore.")]]
 inline bool open(
     Index<TText, PizzaChili<TSpec> >& me,
     char const* filename
@@ -368,6 +371,7 @@ inline bool open(
 }
 
 template <typename TText, typename TSpec>
+[[deprecated("The PizzaChiliIndex is outdated and is not maintained anymore.")]]
 inline bool save(
     Index<TText, PizzaChili<TSpec> >& me,
     char const* filename
diff --git a/include/seqan/index/index_pizzachili_find.h b/include/seqan/index/index_pizzachili_find.h
index 117300b..8e4073d 100644
--- a/include/seqan/index/index_pizzachili_find.h
+++ b/include/seqan/index/index_pizzachili_find.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index/index_pizzachili_string.h b/include/seqan/index/index_pizzachili_string.h
index c1afd2b..efb2ad7 100644
--- a/include/seqan/index/index_pizzachili_string.h
+++ b/include/seqan/index/index_pizzachili_string.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index/index_qgram.h b/include/seqan/index/index_qgram.h
index 670ddca..d4669d0 100644
--- a/include/seqan/index/index_qgram.h
+++ b/include/seqan/index/index_qgram.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -1395,8 +1395,9 @@ void createQGramIndex(TIndex &index)
     _qgramRefineSuffixArray(sa, text, shape, dir);
 }
 
-// DEPRECATED
-// better use createQGramIndex(index) (above)
+// DEPRECATED: Use createQGramIndex(index) instead. (above)
+// NOTE: This function is currently still used in the app search join (status 25.10.2016) so the deprecation macro
+// can't be used yet. As soon as the app is altered accordingly the macro shall be applied.
 template <
 typename TSA,
 typename TDir,
@@ -1404,6 +1405,7 @@ typename TBucketMap,
 typename TText,
 typename TShape,
 typename TStepSize >
+/*[[deprecated("Use createQGramIndex(index) instead.")]]*/
 void createQGramIndex(
                       TSA &sa,
                       TDir &dir,
@@ -1428,8 +1430,9 @@ void createQGramIndex(
     _qgramFillSuffixArray(sa, text, shape, dir, bucketMap, stepSize, False());
 }
 
-// DEPRECATED
-// better use createQGramIndex(index) (above)
+// DEPRECATED: Use createQGramIndex(index) instead.
+// NOTE: This function is currently still used in the app search join (status 25.10.2016) so the deprecation macro
+// can't be used yet. As soon as the app is altered accordingly the macro shall be applied.
 template <
 typename TSA,
 typename TDir,
@@ -1437,6 +1440,7 @@ typename TBucketMap,
 typename TText,
 typename TShape,
 typename TStepSize >
+/*[[deprecated("Use createQGramIndex(index) instead.")]]*/
 void createQGramIndex(
                       TSA &sa,
                       TDir &dir,
diff --git a/include/seqan/index/index_qgram_bucketrefinement.h b/include/seqan/index/index_qgram_bucketrefinement.h
index 6577df7..128e606 100644
--- a/include/seqan/index/index_qgram_bucketrefinement.h
+++ b/include/seqan/index/index_qgram_bucketrefinement.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index/index_qgram_openaddressing.h b/include/seqan/index/index_qgram_openaddressing.h
index b930403..bf219a3 100644
--- a/include/seqan/index/index_qgram_openaddressing.h
+++ b/include/seqan/index/index_qgram_openaddressing.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index/index_qgram_stree.h b/include/seqan/index/index_qgram_stree.h
index 7e29813..c8dfe67 100644
--- a/include/seqan/index/index_qgram_stree.h
+++ b/include/seqan/index/index_qgram_stree.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index/index_sa_btree.h b/include/seqan/index/index_sa_btree.h
index d1adfbc..8ca3811 100644
--- a/include/seqan/index/index_sa_btree.h
+++ b/include/seqan/index/index_sa_btree.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index/index_sa_bwtwalk.h b/include/seqan/index/index_sa_bwtwalk.h
index 68267f4..f0f75ce 100644
--- a/include/seqan/index/index_sa_bwtwalk.h
+++ b/include/seqan/index/index_sa_bwtwalk.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -64,7 +64,7 @@ namespace seqan
     // Public function
     // NOTE: This function uses the supremum value of Value<TSA>::Type as NIL symbol
     //       for temporary calculations. Therefore, the caller must ensure that
-    //       length(s) < MaxValue<TValue>::VALUE. Otherwise, behaviour is undefined!
+    //       length(s) < std::numeric_limits<TValue>::max(). Otherwise, behaviour is undefined!
     template < typename TSA, typename TText, typename TSpec >
     inline void createSuffixArray(
         TSA &SA,
@@ -89,7 +89,7 @@ namespace seqan
     {
         value(lexprevpos, p) = predecessor;
         value(lexnextpos, p) = successor;
-        const TValue NIL = MaxValue<TValue>::VALUE;
+        const TValue NIL = std::numeric_limits<TValue>::max();
         if (predecessor != NIL) value(lexnextpos, predecessor) = p;
         if (successor != NIL) value(lexprevpos, successor) = p;
     }
@@ -124,7 +124,7 @@ namespace seqan
         TValue predecessor,
         TValue successor)
     {
-        const TValue NIL = MaxValue<TValue>::VALUE;
+        const TValue NIL = std::numeric_limits<TValue>::max();
         value(lexxorpos, p) = predecessor ^ successor;
         if (predecessor != NIL) value(lexxorpos, predecessor) = getValue(lexxorpos, predecessor) ^ successor ^ p;
         if (successor != NIL) value(lexxorpos, successor) = getValue(lexxorpos, successor) ^ predecessor ^ p;
@@ -140,7 +140,7 @@ namespace seqan
     {
         typedef typename Value<TSA>::Type TValue;
         typedef typename Iterator<TSA, Standard>::Type TSaIter;
-        const TValue NIL = MaxValue<TValue>::VALUE;
+        const TValue NIL = std::numeric_limits<TValue>::max();
 
         if (empty(s)) return;
 
@@ -174,7 +174,7 @@ namespace seqan
     {
         typedef typename Value<TSA>::Type TValue;
         typedef typename Iterator<TSA, Standard>::Type TSaIter;
-        const TValue NIL = MaxValue<TValue>::VALUE;
+        const TValue NIL = std::numeric_limits<TValue>::max();
         typedef String<TValue> TArray;
 
         if (empty(s)) return;
@@ -208,7 +208,7 @@ namespace seqan
     {
         typedef typename Value<TSA>::Type TValue;
         typedef typename Iterator<TSA, Standard>::Type TSaIter;
-        const TValue NIL = MaxValue<TValue>::VALUE;
+        const TValue NIL = std::numeric_limits<TValue>::max();
         typedef String<TValue> TArray;
 
         if (empty(s)) return;
@@ -380,7 +380,7 @@ namespace seqan
         True const &)
     {
         typedef typename Value<TSA>::Type TValue;
-        const TValue NIL = MaxValue<TValue>::VALUE;
+        const TValue NIL = std::numeric_limits<TValue>::max();
 
         const TValue FLAGBIT = (TValue)1 << (BitsPerValue<TValue>::VALUE-1);
         const TValue NOTFLAGBIT = ~FLAGBIT;
@@ -408,7 +408,7 @@ namespace seqan
         TValue &pPlus,
         unsigned int cOrd)
     {
-        const TValue NIL = MaxValue<TValue>::VALUE;
+        const TValue NIL = std::numeric_limits<TValue>::max();
 
         // current char does not exist
         // first find pMinus ...
@@ -444,7 +444,7 @@ namespace seqan
 
         typedef typename Value<const TText>::Type TChar;
         const unsigned int ALPHABETSIZE = ValueSize<TChar>::VALUE;
-        const TValue NIL = MaxValue<TValue>::VALUE;
+        const TValue NIL = std::numeric_limits<TValue>::max();
         typedef String<TValue, Array<ALPHABETSIZE> > TAlphabetArray;
 
         TAlphabetArray lexfirstpos, lexlastpos;
@@ -539,7 +539,7 @@ namespace seqan
 
         typedef typename Value<const TText>::Type TChar;
         const unsigned int ALPHABETSIZE = ValueSize<TChar>::VALUE;
-        const TValue NIL = MaxValue<TValue>::VALUE;
+        const TValue NIL = std::numeric_limits<TValue>::max();
         typedef String<TValue, Array<ALPHABETSIZE> > TAlphabetArray;
 
         TAlphabetArray lexfirstpos;
diff --git a/include/seqan/index/index_sa_lss.h b/include/seqan/index/index_sa_lss.h
index 312c96c..b8e1b73 100644
--- a/include/seqan/index/index_sa_lss.h
+++ b/include/seqan/index/index_sa_lss.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -256,7 +256,7 @@ struct ContextLss_
 
        for (s=0, i=k-l; i; i>>=1)
           ++s;                      /* s is number of bits in old symbol.*/
-       e=MaxValue<TValue>::VALUE>>s; /* e is for overflow checking.*/
+       e=std::numeric_limits<TValue>::max()>>s; /* e is for overflow checking.*/
        for (b=d=r=0; r<n && d<=e && (c=d<<s|(k-l))<=q; ++r) {
           b=b<<s|(x[r]-l+1);        /* b is start of x in chunk alphabet.*/
           d=c;                      /* d is max symbol in chunk alphabet.*/
@@ -317,7 +317,7 @@ struct ContextLss_
           j=transform(V, I, n, k, l, n);
           bucketsort(V, I, n, j);   /* bucketsort on first r positions.*/
        } else {
-          transform(V, I, n, k, l, MaxValue<TValue>::VALUE);
+          transform(V, I, n, k, l, std::numeric_limits<TValue>::max());
           for (i=0; i<=n; ++i)
              I[i]=i;                /* initialize I with suffix numbers.*/
           h=0;
diff --git a/include/seqan/index/index_sa_mm.h b/include/seqan/index/index_sa_mm.h
index 9cde03a..fbd169a 100644
--- a/include/seqan/index/index_sa_mm.h
+++ b/include/seqan/index/index_sa_mm.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index/index_sa_qsort.h b/include/seqan/index/index_sa_qsort.h
index aa88a67..73528d1 100644
--- a/include/seqan/index/index_sa_qsort.h
+++ b/include/seqan/index/index_sa_qsort.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index/index_sa_stree.h b/include/seqan/index/index_sa_stree.h
index 580d4aa..bb849ee 100644
--- a/include/seqan/index/index_sa_stree.h
+++ b/include/seqan/index/index_sa_stree.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // Copyright (c) 2013 NVIDIA Corporation
 // Copyright (c) 2013 NVIDIA Corporation
 // All rights reserved.
@@ -543,15 +543,15 @@ inline bool _goDownString(Iter<Index<TText, IndexSa<TIndexSpec> >, VSTree<TopDow
     typedef typename Iterator<TSA const, Standard>::Type    TSAIterator;
     typedef SearchTreeIterator<TSA const, SortedList>       TSearchTreeIterator;
 
-    // Save vertex descriptor.
-    _historyPush(it);
-
 #ifdef SEQAN_DEBUG
     std::cout << "parent: " << value(it).range << std::endl;
 #endif
 
     if (!empty(pattern))
     {
+        // Save vertex descriptor.
+        _historyPush(it);
+
         TIndex const & index = container(it);
         TSA const & sa = indexSA(index);
         TText const & text = indexText(index);
diff --git a/include/seqan/index/index_sa_truncated.h b/include/seqan/index/index_sa_truncated.h
index 79cc98b..2ac5505 100644
--- a/include/seqan/index/index_sa_truncated.h
+++ b/include/seqan/index/index_sa_truncated.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -68,22 +68,22 @@ public:
 
     Iter() :
         TBase(),
-        depth(MaxValue<TDepth>::VALUE)
+        depth(std::numeric_limits<TDepth>::max())
     {}
 
     Iter(TIndex &_index) :
         TBase(_index),
-        depth(MaxValue<TDepth>::VALUE)
+        depth(std::numeric_limits<TDepth>::max())
     {}
 
     Iter(TIndex &_index, MinimalCtor) :
         TBase(_index, MinimalCtor()),
-        depth(MaxValue<TDepth>::VALUE)
+        depth(std::numeric_limits<TDepth>::max())
     {}
 
     Iter(TIndex &_index, TVertexDesc const &_vDesc) :
         TBase(_index, _vDesc),
-        depth(MaxValue<TDepth>::VALUE)
+        depth(std::numeric_limits<TDepth>::max())
     {}
 
     Iter(Iter const &_origin):
diff --git a/include/seqan/index/index_shawarma.h b/include/seqan/index/index_shawarma.h
index 1d31b1e..1d0e8ce 100644
--- a/include/seqan/index/index_shawarma.h
+++ b/include/seqan/index/index_shawarma.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index/index_shims.h b/include/seqan/index/index_shims.h
index c4d0c3b..8258441 100644
--- a/include/seqan/index/index_shims.h
+++ b/include/seqan/index/index_shims.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // Copyright (c) 2013 NVIDIA Corporation
 // All rights reserved.
 //
diff --git a/include/seqan/index/index_skew3.h b/include/seqan/index/index_skew3.h
index f23dbe7..52bee8f 100644
--- a/include/seqan/index/index_skew3.h
+++ b/include/seqan/index/index_skew3.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index/index_skew7.h b/include/seqan/index/index_skew7.h
index 4ab0991..ccc3918 100644
--- a/include/seqan/index/index_skew7.h
+++ b/include/seqan/index/index_skew7.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index/index_skew7_multi.h b/include/seqan/index/index_skew7_multi.h
index 9c022c9..923440e 100644
--- a/include/seqan/index/index_skew7_multi.h
+++ b/include/seqan/index/index_skew7_multi.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index/index_wotd.h b/include/seqan/index/index_wotd.h
index a4f6c15..a34cd19 100644
--- a/include/seqan/index/index_wotd.h
+++ b/include/seqan/index/index_wotd.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -977,7 +977,7 @@ SEQAN_CONCEPT_IMPL((Index<TText, IndexWotd<TSpec> > const), (StringTreeConcept))
         TTextIterator itText = begin(text, Standard());
         TTextIterator itTextEnd = end(text, Standard());
         for (; itText != itTextEnd; ++itText)
-            ++buckets[ordValue(getValue(itText))];
+            ++buckets[ordValue(*itText)];
     }
 
 
@@ -993,7 +993,7 @@ SEQAN_CONCEPT_IMPL((Index<TText, IndexWotd<TSpec> > const), (StringTreeConcept))
             TTextIterator itText = begin(text, Standard());
             TTextIterator itTextEnd = end(text, Standard());
             for (; itText != itTextEnd; ++itText)
-                ++buckets[ordValue(getValue(itText))];
+                ++buckets[ordValue(*itText)];
         }
     }
 
@@ -1196,7 +1196,7 @@ SEQAN_CONCEPT_IMPL((Index<TText, IndexWotd<TSpec> > const), (StringTreeConcept))
             TTextIterator itText = begin(text, Standard());
             TTextIterator itTextEnd = end(text, Standard());
             for(TSize i = 0; itText != itTextEnd; ++itText, ++i)
-                *(saBeg + (*(boundBeg + ordValue(getValue(itText))))++) = i;
+                *(saBeg + (*(boundBeg + ordValue(*itText)))++) = i;
         }
         index.sentinelOcc = 0;
         index.sentinelBound = 0;
@@ -1247,7 +1247,7 @@ SEQAN_CONCEPT_IMPL((Index<TText, IndexWotd<TSpec> > const), (StringTreeConcept))
             TTextIterator itTextEnd = end(text, Standard());
             for(; itText != itTextEnd; ++itText)
             {
-                *(saBeg + (*(boundBeg + ordValue(getValue(itText))))++) = localPos;
+                *(saBeg + (*(boundBeg + ordValue(*itText)))++) = localPos;
                 assignValueI2(localPos, getValueI2(localPos) + 1);
             }
         }
diff --git a/include/seqan/index/pipe_merger3.h b/include/seqan/index/pipe_merger3.h
index 81c51ee..34ed3d7 100644
--- a/include/seqan/index/pipe_merger3.h
+++ b/include/seqan/index/pipe_merger3.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index/pipe_merger7.h b/include/seqan/index/pipe_merger7.h
index 73c4064..61c495c 100644
--- a/include/seqan/index/pipe_merger7.h
+++ b/include/seqan/index/pipe_merger7.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index/pizzachili_api.h b/include/seqan/index/pizzachili_api.h
index aabefc1..33aa750 100644
--- a/include/seqan/index/pizzachili_api.h
+++ b/include/seqan/index/pizzachili_api.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index/pump_extender3.h b/include/seqan/index/pump_extender3.h
index b52937c..d52f669 100644
--- a/include/seqan/index/pump_extender3.h
+++ b/include/seqan/index/pump_extender3.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index/pump_extender7.h b/include/seqan/index/pump_extender7.h
index 0e8adc7..e1d80ed 100644
--- a/include/seqan/index/pump_extender7.h
+++ b/include/seqan/index/pump_extender7.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index/pump_lcp_core.h b/include/seqan/index/pump_lcp_core.h
index c0f4a6b..fd7a5e4 100644
--- a/include/seqan/index/pump_lcp_core.h
+++ b/include/seqan/index/pump_lcp_core.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index/pump_separator7.h b/include/seqan/index/pump_separator7.h
index 894c70c..43d100e 100644
--- a/include/seqan/index/pump_separator7.h
+++ b/include/seqan/index/pump_separator7.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index/radix.h b/include/seqan/index/radix.h
index 35b1527..b061244 100644
--- a/include/seqan/index/radix.h
+++ b/include/seqan/index/radix.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index/repeat_base.h b/include/seqan/index/repeat_base.h
index 87cf246..92f012c 100644
--- a/include/seqan/index/repeat_base.h
+++ b/include/seqan/index/repeat_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index/shape_base.h b/include/seqan/index/shape_base.h
index 0dd8fed..fbef760 100644
--- a/include/seqan/index/shape_base.h
+++ b/include/seqan/index/shape_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index/shape_gapped.h b/include/seqan/index/shape_gapped.h
index 4ab5696..f83bc00 100644
--- a/include/seqan/index/shape_gapped.h
+++ b/include/seqan/index/shape_gapped.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index/shape_minimizer.h b/include/seqan/index/shape_minimizer.h
index a27df7d..cbff7ec 100644
--- a/include/seqan/index/shape_minimizer.h
+++ b/include/seqan/index/shape_minimizer.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index/shape_onegapped.h b/include/seqan/index/shape_onegapped.h
index 8bef736..e0fc8cd 100644
--- a/include/seqan/index/shape_onegapped.h
+++ b/include/seqan/index/shape_onegapped.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index/shape_predefined.h b/include/seqan/index/shape_predefined.h
index c8da392..8acfdb5 100644
--- a/include/seqan/index/shape_predefined.h
+++ b/include/seqan/index/shape_predefined.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/index/shape_threshold.h b/include/seqan/index/shape_threshold.h
index d4ab53d..060b982 100644
--- a/include/seqan/index/shape_threshold.h
+++ b/include/seqan/index/shape_threshold.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // Copyright (c) 2013 NVIDIA Corporation
 // All rights reserved.
 //
@@ -841,7 +841,7 @@ void computeExactQGramThreshold(
     // columns n-1 and n for recursion
     TMatrixCol col0;    // addressing is colx[errors * statesCount + state]
     TMatrixCol col1;
-    const TThresh infty = MaxValue<TThresh>::VALUE >> 1;
+    const TThresh infty = std::numeric_limits<TThresh>::max() >> 1;
 
     resize(col0, maxErrors * statesCount, infty);
     resize(col1, maxErrors * statesCount);
diff --git a/include/seqan/journaled_set.h b/include/seqan/journaled_set.h
index a124b48..9cca473 100644
--- a/include/seqan/journaled_set.h
+++ b/include/seqan/journaled_set.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                               journaled_set
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/journaled_set/journal_alignment_interface.h b/include/seqan/journaled_set/journal_alignment_interface.h
index e88018d..90beb92 100644
--- a/include/seqan/journaled_set/journal_alignment_interface.h
+++ b/include/seqan/journaled_set/journal_alignment_interface.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/journaled_set/journal_alignment_traceback_adaptor.h b/include/seqan/journaled_set/journal_alignment_traceback_adaptor.h
index 543aa8b..2c04dd2 100644
--- a/include/seqan/journaled_set/journal_alignment_traceback_adaptor.h
+++ b/include/seqan/journaled_set/journal_alignment_traceback_adaptor.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/journaled_set/journaled_set_base.h b/include/seqan/journaled_set/journaled_set_base.h
index 7cad73c..a35dafe 100644
--- a/include/seqan/journaled_set/journaled_set_base.h
+++ b/include/seqan/journaled_set/journaled_set_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                               journaled_set
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/journaled_set/journaled_set_impl.h b/include/seqan/journaled_set/journaled_set_impl.h
index fb9aec4..98a90e6 100644
--- a/include/seqan/journaled_set/journaled_set_impl.h
+++ b/include/seqan/journaled_set/journaled_set_impl.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/journaled_set/journaled_set_join.h b/include/seqan/journaled_set/journaled_set_join.h
index 9c80e04..165f045 100644
--- a/include/seqan/journaled_set/journaled_set_join.h
+++ b/include/seqan/journaled_set/journaled_set_join.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/journaled_set/journaled_set_join_config.h b/include/seqan/journaled_set/journaled_set_join_config.h
index 270bbe7..06a41b7 100644
--- a/include/seqan/journaled_set/journaled_set_join_config.h
+++ b/include/seqan/journaled_set/journaled_set_join_config.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/journaled_set/journaled_set_join_global_align_compact.h b/include/seqan/journaled_set/journaled_set_join_global_align_compact.h
index c1568aa..4d08d47 100644
--- a/include/seqan/journaled_set/journaled_set_join_global_align_compact.h
+++ b/include/seqan/journaled_set/journaled_set_join_global_align_compact.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/journaled_set/journaled_set_join_global_align_manhatten.h b/include/seqan/journaled_set/journaled_set_join_global_align_manhatten.h
index 8a287d2..fcd09f9 100644
--- a/include/seqan/journaled_set/journaled_set_join_global_align_manhatten.h
+++ b/include/seqan/journaled_set/journaled_set_join_global_align_manhatten.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/journaled_set/journaled_set_journal_trace_descriptor.h b/include/seqan/journaled_set/journaled_set_journal_trace_descriptor.h
index 24656c9..6421eaa 100644
--- a/include/seqan/journaled_set/journaled_set_journal_trace_descriptor.h
+++ b/include/seqan/journaled_set/journaled_set_journal_trace_descriptor.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/journaled_set/score_biaffine.h b/include/seqan/journaled_set/score_biaffine.h
index 88e6296..3ebfadd 100644
--- a/include/seqan/journaled_set/score_biaffine.h
+++ b/include/seqan/journaled_set/score_biaffine.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/journaled_string_tree.h b/include/seqan/journaled_string_tree.h
index 0b04258..89ab0e7 100644
--- a/include/seqan/journaled_string_tree.h
+++ b/include/seqan/journaled_string_tree.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/journaled_string_tree/delta_map.h b/include/seqan/journaled_string_tree/delta_map.h
index fa241fa..9c39e7a 100644
--- a/include/seqan/journaled_string_tree/delta_map.h
+++ b/include/seqan/journaled_string_tree/delta_map.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -844,7 +844,7 @@ erase(DeltaMap<TConfig, TSpec> & deltaMap,
     for (auto it = itRange.i1; it != itRange.i2; ++it)
     {
         // Find potential right end of this delta.
-        if (!IsSameType<TDeltaType, DeltaTypeIns>::VALUE)
+        SEQAN_IF_CONSTEXPR (!IsSameType<TDeltaType, DeltaTypeIns>::VALUE)
         {
             auto itR = impl::find(deltaMap,
                                   deltaPos + deletionSize(deltaMap._deltaStore, getDeltaRecord(*it).i2, TDeltaType()) - 1,
@@ -1049,7 +1049,7 @@ template <typename TConfig, typename TSpec>
 constexpr typename Size<DeltaMap<TConfig, TSpec> >::Type
 maxSize(DeltaMap<TConfig, TSpec> const & /*deltaMap*/)
 {
-    return MaxValue<typename Size<DeltaMap<TConfig, TSpec> >::Type>::VALUE;
+    return std::numeric_limits<typename Size<DeltaMap<TConfig, TSpec> >::Type>::max();
 }
 
 }
diff --git a/include/seqan/journaled_string_tree/delta_map_entry.h b/include/seqan/journaled_string_tree/delta_map_entry.h
index 26bdfa8..7fc5c53 100644
--- a/include/seqan/journaled_string_tree/delta_map_entry.h
+++ b/include/seqan/journaled_string_tree/delta_map_entry.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/journaled_string_tree/delta_map_iterator.h b/include/seqan/journaled_string_tree/delta_map_iterator.h
index 915c493..c624926 100644
--- a/include/seqan/journaled_string_tree/delta_map_iterator.h
+++ b/include/seqan/journaled_string_tree/delta_map_iterator.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -200,14 +200,14 @@ inline typename DeltaValue<typename Container<Iter<TDeltaMap, DeltaMapIteratorSp
 deltaValue(Iter<TDeltaMap, DeltaMapIteratorSpec> & iter, TTag const & tag)
 {
     SEQAN_ASSERT(isDeltaType(deltaType(iter), TTag()));
-    return deltaValue(container(iter)._deltaStore, getDeltaRecord(value(iter)).i2, tag);
+    return deltaValue(container(iter)._deltaStore, getDeltaRecord(*iter).i2, tag);
 }
 
 template <typename TDeltaMap, typename TTag>
 inline typename DeltaValue<typename Container<Iter<TDeltaMap, DeltaMapIteratorSpec> const>::Type, TTag>::Type &
 deltaValue(Iter<TDeltaMap, DeltaMapIteratorSpec> const & iter, TTag const & tag)
 {
-    return deltaValue(container(iter)._deltaStore, getDeltaRecord(value(iter)).i2, tag);
+    return deltaValue(container(iter)._deltaStore, getDeltaRecord(*iter).i2, tag);
 }
 
 namespace impl
diff --git a/include/seqan/journaled_string_tree/delta_store.h b/include/seqan/journaled_string_tree/delta_store.h
index 843c6a9..32fe0b9 100644
--- a/include/seqan/journaled_string_tree/delta_store.h
+++ b/include/seqan/journaled_string_tree/delta_store.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/journaled_string_tree/journaled_string_tree_base.h b/include/seqan/journaled_string_tree/journaled_string_tree_base.h
index e7a6773..b4fa9c1 100644
--- a/include/seqan/journaled_string_tree/journaled_string_tree_base.h
+++ b/include/seqan/journaled_string_tree/journaled_string_tree_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/journaled_string_tree/journaled_string_tree_impl.h b/include/seqan/journaled_string_tree/journaled_string_tree_impl.h
index 1795f3c..8e90ddf 100644
--- a/include/seqan/journaled_string_tree/journaled_string_tree_impl.h
+++ b/include/seqan/journaled_string_tree/journaled_string_tree_impl.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -601,7 +601,7 @@ insert(JournaledStringTree<TSequence, TConfig, TSpec> & jst,
     typedef typename Value<TIds>::Type                      TID;
     typedef typename Size<TJst>::Type                       TSize   SEQAN_TYPEDEF_FOR_DEBUG;
 
-    if (IsSameType<TDeltaType, DeltaTypeIns>::VALUE)
+    SEQAN_IF_CONSTEXPR (IsSameType<TDeltaType, DeltaTypeIns>::VALUE)
         SEQAN_ASSERT_LEQ(static_cast<TSize>(srcPos), length(impl::member(jst, JstSourceMember())));  // Make sure the delta position does not exceed the source.
     else
         SEQAN_ASSERT_LT(static_cast<TSize>(srcPos), length(impl::member(jst, JstSourceMember())));
diff --git a/include/seqan/journaled_string_tree/journaled_string_tree_sequence_buffer.h b/include/seqan/journaled_string_tree/journaled_string_tree_sequence_buffer.h
index 61b213a..736b508 100644
--- a/include/seqan/journaled_string_tree/journaled_string_tree_sequence_buffer.h
+++ b/include/seqan/journaled_string_tree/journaled_string_tree_sequence_buffer.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/journaled_string_tree/journaled_string_tree_traverser.h b/include/seqan/journaled_string_tree/journaled_string_tree_traverser.h
index bf66e21..70de1f2 100644
--- a/include/seqan/journaled_string_tree/journaled_string_tree_traverser.h
+++ b/include/seqan/journaled_string_tree/journaled_string_tree_traverser.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -518,6 +518,18 @@ atEnd(TraverserImpl<TJst, JstTraversalSpec<TSpec> > & me)
     return length(*me._stackPtr) == 1 && back(*me._stackPtr).curEdgeIt == sourceEnd(impl::buffer(me));
 }
 
+// ----------------------------------------------------------------------------
+// Function isBase();
+// ----------------------------------------------------------------------------
+
+template <typename TJst, typename TSpec>
+inline bool
+isBase(TraverserImpl<TJst, JstTraversalSpec<TSpec> > const & me)
+{
+    SEQAN_ASSERT(me._stackPtr != nullptr);
+    return length(*me._stackPtr) == 1;
+}
+
 }  // namespace seqan
 
 #endif  // #ifndef INCLUDE_SEQAN_JOURNALED_STRING_TREE_JOURNALED_STRING_TREE_TRAVERSER_H_
diff --git a/include/seqan/journaled_string_tree/journaled_string_tree_traverser_node.h b/include/seqan/journaled_string_tree/journaled_string_tree_traverser_node.h
index 2f25aad..e742224 100644
--- a/include/seqan/journaled_string_tree/journaled_string_tree_traverser_node.h
+++ b/include/seqan/journaled_string_tree/journaled_string_tree_traverser_node.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/journaled_string_tree/journaled_string_tree_traverser_util.h b/include/seqan/journaled_string_tree/journaled_string_tree_traverser_util.h
index 6e00357..f6dbafb 100644
--- a/include/seqan/journaled_string_tree/journaled_string_tree_traverser_util.h
+++ b/include/seqan/journaled_string_tree/journaled_string_tree_traverser_util.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -375,11 +375,11 @@ mapBranchPointToVirtual(TIterator & resultIt,
     if (it->segmentSource == SOURCE_PATCH)  // The iterator has to be at the beginning.
     {
         TVarIterator itVar = begin(variantStore, Standard());  // TODO(rrahn): Optimize!
-        SEQAN_ASSERT_LEQ(getDeltaPosition(*itVar), static_cast<TDeltaMapPos const>(hostPos));
+        SEQAN_ASSERT_LEQ(getDeltaPosition(*itVar), static_cast<TDeltaMapPos>(hostPos));
 
         TDeltaMapPos virtualOffset = 0;
         // Now we move to the right until we find the node that we are looking for and reconstruct the offset of the virtual positions.
-        while(getDeltaPosition(*itVar) != static_cast<TDeltaMapPos const>(hostPos) && !atEnd(itVar, variantStore))
+        while(getDeltaPosition(*itVar) != static_cast<TDeltaMapPos>(hostPos) && !atEnd(itVar, variantStore))
         {
             if (getDeltaCoverage(*itVar)[proxyId] != true)  // irrelevant variant.
             {
@@ -403,7 +403,7 @@ mapBranchPointToVirtual(TIterator & resultIt,
 
     // We assume that the operation begins here!
     resultIt._journalEntriesIterator = it;
-    if (it->physicalOriginPosition + it->length > static_cast<TDeltaMapPos const>(hostPos))
+    if (it->physicalOriginPosition + it->length > static_cast<TDeltaMapPos>(hostPos))
     {
         _updateSegmentIterators(resultIt);
         if (it->physicalOriginPosition < hostPos)
@@ -412,7 +412,7 @@ mapBranchPointToVirtual(TIterator & resultIt,
     }
 
     _updateSegmentIteratorsLeft(resultIt);  // Set the iterator to the end of the current original node.
-    if (_physicalPosition(resultIt) + 1 == static_cast<TDeltaMapPos const>(hostPos))
+    if (_physicalPosition(resultIt) + 1 == static_cast<TDeltaMapPos>(hostPos))
     {
         ++resultIt;
         return;
@@ -426,10 +426,10 @@ mapBranchPointToVirtual(TIterator & resultIt,
     f.iter = std::upper_bound(begin(variantStore, Standard()), end(variantStore, Standard()), child,
                               DeltaMapEntryPosLessThanComparator_());
 
-    SEQAN_ASSERT_LEQ(getDeltaPosition(*f.iter), static_cast<TDeltaMapPos const>(hostPos));
+    SEQAN_ASSERT_LEQ(getDeltaPosition(*f.iter), static_cast<TDeltaMapPos>(hostPos));
 
     // Now we move to the right until we find the node that we are looking for and reconstruct the offset of the virtual positions.
-    while (getDeltaPosition(*f.iter) != static_cast<TDeltaMapPos const>(hostPos) && !atEnd(f.iter))
+    while (getDeltaPosition(*f.iter) != static_cast<TDeltaMapPos>(hostPos) && !atEnd(f.iter))
     {
         if (getDeltaCoverage(*f.iter)[proxyId] != true || isRightEnd(*f.iter))  // irrelevant variant.
         {
@@ -928,7 +928,7 @@ init(TraverserImpl<TJst, JstTraversalSpec<TSpec> > & me,
     TNode* basePtr = &impl::activeNode(me);
 
     SEQAN_ASSERT_GEQ(me._contextSize, 1u);
-    if (IsSameType<Tag<TProxySelector>, SelectFirstProxy>::VALUE)
+    SEQAN_IF_CONSTEXPR (IsSameType<Tag<TProxySelector>, SelectFirstProxy>::VALUE)
         impl::moveWindow(me, basePtr, 0, observer, Tag<TProxySelector>());   // We move the traverser to the first position.
     else
         impl::moveWindow(me, basePtr, me._contextSize - 1, observer, Tag<TProxySelector>());
diff --git a/include/seqan/journaled_string_tree/jst_extension_base.h b/include/seqan/journaled_string_tree/jst_extension_base.h
index 707ec1e..44dc9d0 100644
--- a/include/seqan/journaled_string_tree/jst_extension_base.h
+++ b/include/seqan/journaled_string_tree/jst_extension_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/journaled_string_tree/jst_extension_horspool.h b/include/seqan/journaled_string_tree/jst_extension_horspool.h
index d5c2a9f..14bf970 100644
--- a/include/seqan/journaled_string_tree/jst_extension_horspool.h
+++ b/include/seqan/journaled_string_tree/jst_extension_horspool.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/journaled_string_tree/jst_extension_myers_ukkonen.h b/include/seqan/journaled_string_tree/jst_extension_myers_ukkonen.h
index 2de8dac..ba70f12 100644
--- a/include/seqan/journaled_string_tree/jst_extension_myers_ukkonen.h
+++ b/include/seqan/journaled_string_tree/jst_extension_myers_ukkonen.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/journaled_string_tree/jst_extension_shiftand.h b/include/seqan/journaled_string_tree/jst_extension_shiftand.h
index f438532..354a761 100644
--- a/include/seqan/journaled_string_tree/jst_extension_shiftand.h
+++ b/include/seqan/journaled_string_tree/jst_extension_shiftand.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/journaled_string_tree/jst_extension_shiftor.h b/include/seqan/journaled_string_tree/jst_extension_shiftor.h
index e40956b..0bc5f28 100644
--- a/include/seqan/journaled_string_tree/jst_extension_shiftor.h
+++ b/include/seqan/journaled_string_tree/jst_extension_shiftor.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/journaled_string_tree/observable.h b/include/seqan/journaled_string_tree/observable.h
index 4811d45..d99aeb1 100644
--- a/include/seqan/journaled_string_tree/observable.h
+++ b/include/seqan/journaled_string_tree/observable.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/journaled_string_tree/stack_observer.h b/include/seqan/journaled_string_tree/stack_observer.h
index 53ffc8e..95bce56 100644
--- a/include/seqan/journaled_string_tree/stack_observer.h
+++ b/include/seqan/journaled_string_tree/stack_observer.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/map.h b/include/seqan/map.h
index c981ee7..7eda322 100644
--- a/include/seqan/map.h
+++ b/include/seqan/map.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/map/map_adapter_stl.h b/include/seqan/map/map_adapter_stl.h
index 8a93c83..b1dd4e6 100644
--- a/include/seqan/map/map_adapter_stl.h
+++ b/include/seqan/map/map_adapter_stl.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/map/map_base.h b/include/seqan/map/map_base.h
index 480a53c..ee14190 100644
--- a/include/seqan/map/map_base.h
+++ b/include/seqan/map/map_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/map/map_chooser.h b/include/seqan/map/map_chooser.h
index 0643c78..6c9a4b7 100644
--- a/include/seqan/map/map_chooser.h
+++ b/include/seqan/map/map_chooser.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/map/map_skiplist.h b/include/seqan/map/map_skiplist.h
index 3c75e21..5b08a06 100644
--- a/include/seqan/map/map_skiplist.h
+++ b/include/seqan/map/map_skiplist.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/map/map_vector.h b/include/seqan/map/map_vector.h
index e0c40bf..464f24e 100644
--- a/include/seqan/map/map_vector.h
+++ b/include/seqan/map/map_vector.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/map/sumlist.h b/include/seqan/map/sumlist.h
index ff80add..aeb30b2 100644
--- a/include/seqan/map/sumlist.h
+++ b/include/seqan/map/sumlist.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/map/sumlist_mini.h b/include/seqan/map/sumlist_mini.h
index d026e81..afef9e1 100644
--- a/include/seqan/map/sumlist_mini.h
+++ b/include/seqan/map/sumlist_mini.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/map/sumlist_skip.h b/include/seqan/map/sumlist_skip.h
index 0bf8deb..002a55e 100644
--- a/include/seqan/map/sumlist_skip.h
+++ b/include/seqan/map/sumlist_skip.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/math.h b/include/seqan/math.h
index e2442f0..112607b 100644
--- a/include/seqan/math.h
+++ b/include/seqan/math.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/math/math_common_factor.h b/include/seqan/math/math_common_factor.h
index bc88698..8567cef 100644
--- a/include/seqan/math/math_common_factor.h
+++ b/include/seqan/math/math_common_factor.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/math/math_operators.h b/include/seqan/math/math_operators.h
index 9f18dd7..a09fe18 100644
--- a/include/seqan/math/math_operators.h
+++ b/include/seqan/math/math_operators.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/math/math_rational.h b/include/seqan/math/math_rational.h
index 23a77ad..1937f6a 100644
--- a/include/seqan/math/math_rational.h
+++ b/include/seqan/math/math_rational.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -90,7 +90,7 @@ public:
     Rational() : num(0), den(1) {}
 
     template <typename T>
-    Rational(T const & n, SEQAN_CTOR_ENABLE_IF( IsInteger<T> ) ) : num(n), den(1) { (void)dummy; }
+    Rational(T const & n, SEQAN_CTOR_ENABLE_IF( Is<IntegerConcept<T> > ) ) : num(n), den(1) { (void)dummy; }
     Rational(param_type n, param_type d) : num(n), den(d) { normalize(); }
 
     // Default copy constructor and assignment are fine
@@ -503,8 +503,8 @@ std::istream& operator>> (std::istream& is, Rational<TInt>& r)
         c = is.get();
         // read digits as long we can store them
         while ('0' <= c && c <= '9' &&
-                (n < (TInt)MaxValue<TInt>::VALUE / (TInt)10 - (TInt)9) &&
-                (d < (TInt)MaxValue<TInt>::VALUE / (TInt)10))
+                (n < (TInt)std::numeric_limits<TInt>::max() / (TInt)10 - (TInt)9) &&
+                (d < (TInt)std::numeric_limits<TInt>::max() / (TInt)10))
         {
             n = 10 * n + (c - '0');
             d *= 10;
diff --git a/include/seqan/misc/accumulators.h b/include/seqan/misc/accumulators.h
index 81c11df..48b30e3 100644
--- a/include/seqan/misc/accumulators.h
+++ b/include/seqan/misc/accumulators.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/misc/base.h b/include/seqan/misc/base.h
index d058fda..1ca74c7 100644
--- a/include/seqan/misc/base.h
+++ b/include/seqan/misc/base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/misc/bit_twiddling.h b/include/seqan/misc/bit_twiddling.h
index d1c0795..4d19d6f 100644
--- a/include/seqan/misc/bit_twiddling.h
+++ b/include/seqan/misc/bit_twiddling.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // Copyright (c) 2013 NVIDIA Corporation
 // All rights reserved.
 //
diff --git a/include/seqan/misc/bit_twiddling_functors.h b/include/seqan/misc/bit_twiddling_functors.h
index aae12cf..5799aa9 100644
--- a/include/seqan/misc/bit_twiddling_functors.h
+++ b/include/seqan/misc/bit_twiddling_functors.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/misc/dequeue.h b/include/seqan/misc/dequeue.h
index 1ee58a9..26c2407 100644
--- a/include/seqan/misc/dequeue.h
+++ b/include/seqan/misc/dequeue.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/misc/edit_environment.h b/include/seqan/misc/edit_environment.h
index 28ea140..7ff35ce 100644
--- a/include/seqan/misc/edit_environment.h
+++ b/include/seqan/misc/edit_environment.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/misc/interval_tree.h b/include/seqan/misc/interval_tree.h
index 455f60c..92030f4 100644
--- a/include/seqan/misc/interval_tree.h
+++ b/include/seqan/misc/interval_tree.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -1032,10 +1032,10 @@ _createIntervalTree(TGraph & g, TPropertyMap & pm,
     // one list of interval pointers for the intervals to the right of center
     TIntervalPointers S_right;
 
-    TValue min1 = maxValue<TValue>();
-    TValue min2 = maxValue<TValue>();
-    TValue max1 = minValue<TValue>();
-    TValue max2 = minValue<TValue>();
+    TValue min1 = std::numeric_limits<TValue>::max();
+    TValue min2 = std::numeric_limits<TValue>::max();
+    TValue max1 = std::numeric_limits<TValue>::min();
+    TValue max2 = std::numeric_limits<TValue>::min();
 
     value(pm, knot).center = center;
 
@@ -1212,8 +1212,8 @@ _calcIntervalTreeRootCenter(TIntervals & intervals)
     TIntervalIterator it = begin(intervals);
     TIntervalIterator it_end = end(intervals);
 
-    TValue min = maxValue<TValue>();
-    TValue max = minValue<TValue>();
+    TValue min = std::numeric_limits<TValue>::max();
+    TValue max = std::numeric_limits<TValue>::min();
 
     // get min and max
     while (it != it_end)
diff --git a/include/seqan/misc/map.h b/include/seqan/misc/map.h
index 4577edc..412a2df 100644
--- a/include/seqan/misc/map.h
+++ b/include/seqan/misc/map.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/misc/memset.h b/include/seqan/misc/memset.h
index e5b24bc..923cf5d 100644
--- a/include/seqan/misc/memset.h
+++ b/include/seqan/misc/memset.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                               misc_memset.h
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/misc/name_store_cache.h b/include/seqan/misc/name_store_cache.h
index 29fe408..690071d 100644
--- a/include/seqan/misc/name_store_cache.h
+++ b/include/seqan/misc/name_store_cache.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -71,15 +71,15 @@ struct NameStoreLess_
     template <typename TId>
     inline bool operator() (TId a, TId b) const
     {
-        if (a != maxValue(a))
+        if (a != std::numeric_limits<TId>::max())
         {
-            if (b != maxValue(b))
+            if (b != std::numeric_limits<TId>::max())
                 return (*nameStore)[a] < (*nameStore)[b];
             else
                 return (*nameStore)[a] < *name;
         } else
         {
-            if (b != maxValue(b))
+            if (b != std::numeric_limits<TId>::max())
                 return *name < (*nameStore)[b];
             else
                 return false;
@@ -293,22 +293,19 @@ void appendName(NameStoreCache<TCNameStore, TCName> & cache, TName const & name)
     cache.nameSet.insert(length(host(cache)) - 1);
 }
 
-// TODO(holtgrew): Add deprecation annotation for compiler warnings.
-
-// deprecated.
 // In the future we want to use only one argument either nameStore or nameStoreCache (has a reference to the nameStore)
 template <typename TNameStore, typename TName, typename TContext>
+[[deprecated("Use appendName(cache, name) instead.")]]
 void appendName(TNameStore &nameStore, TName const & name, TContext &)
 {
     appendName(nameStore, name);
 }
 
-// deprecated.
 template <typename TNameStore, typename TName, typename TCNameStore, typename TCName>
-void appendName(TNameStore &nameStore, TName const & name, NameStoreCache<TCNameStore, TCName> &context)
+[[deprecated("Use appendName(cache, name) instead. (nameStoreCache has a reference to the nameStore)")]]
+void appendName(TNameStore & /*nameStore*/, TName const & name, NameStoreCache<TCNameStore, TCName> &context)
 {
-    appendValue(nameStore, name, Generous());
-    context.nameSet.insert(length(nameStore) - 1);
+    appendName(context, name);
 }
 
 // ----------------------------------------------------------------------------
@@ -338,7 +335,7 @@ bool getIdByName(TPos & pos, TNameStore const & nameStore, TName const & name)
     for (TNameStoreIter iter = begin(nameStore, Standard()); iter != end(nameStore, Standard()); ++iter)
     {
         // if the element was found
-        if (name == getValue(iter))
+        if (name == *iter)
         {
             // set the ID
             pos = iter - begin(nameStore, Standard());
@@ -368,7 +365,7 @@ getIdByName(TPos & pos, NameStoreCache<TCNameStore, TCName> const & context, TNa
     {
 
         context.name = name;
-        it = set.find(maxValue<TId>());
+        it = set.find(std::numeric_limits<TId>::max());
     }
 
     if (it != set.end())
@@ -379,16 +376,16 @@ getIdByName(TPos & pos, NameStoreCache<TCNameStore, TCName> const & context, TNa
     return false;
 }
 
-// deprecated.
 template <typename TNameStore, typename TName, typename TPos, typename TContext>
+[[deprecated("Use getIdByName(idx, cache, name) instead.")]]
 inline bool
 getIdByName(TNameStore const & nameStore, TName const & name, TPos & pos, TContext const & /*not a cache*/)
 {
     return getIdByName(pos, nameStore, name);
 }
 
-// deprecated.
 template<typename TNameStore, typename TName, typename TPos, typename TCNameStore, typename TCName>
+[[deprecated("Use getIdByName(idx, cache, name) instead.")]]
 inline bool
 getIdByName(TNameStore const & /*nameStore*/, TName const & name, TPos & pos, NameStoreCache<TCNameStore, TCName> const & context)
 {
diff --git a/include/seqan/misc/priority_type_base.h b/include/seqan/misc/priority_type_base.h
index 55a22b4..b2945b0 100644
--- a/include/seqan/misc/priority_type_base.h
+++ b/include/seqan/misc/priority_type_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/misc/priority_type_heap.h b/include/seqan/misc/priority_type_heap.h
index 8772903..e9b3c61 100644
--- a/include/seqan/misc/priority_type_heap.h
+++ b/include/seqan/misc/priority_type_heap.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -207,7 +207,7 @@ _copyHeapElement (PriorityType<TValue, TLess, PriorityHeap> & me, TValue const &
 
 template <typename TValue, typename TLess>
 inline void
-adjustTop (PriorityType<TValue, TLess, PriorityHeap> & me)    // so k�nnte man es dann auch nennen
+adjustTop (PriorityType<TValue, TLess, PriorityHeap> & me)    // so k�nnte man es dann auch nennen
 {
     if (!empty(me.heap))
         _adjustHeapTowardLeaves (me, me.heap[0], 0, 2);
@@ -301,7 +301,7 @@ _adjustHeapTowardLeaves(
     PriorityType<TValue, TLess, PriorityHeap> & me,
     TValue element,
     TSize h,
-    TSize i ) //f�r mich: h=0, i=1
+    TSize i ) //f�r mich: h=0, i=1
 {
     // root index is zero
     const TSize heapsize = length(me.heap);
diff --git a/include/seqan/misc/set.h b/include/seqan/misc/set.h
index e56eca1..8ca93ef 100644
--- a/include/seqan/misc/set.h
+++ b/include/seqan/misc/set.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/misc/svg.h b/include/seqan/misc/svg.h
index 37ef25e..db2ea4e 100644
--- a/include/seqan/misc/svg.h
+++ b/include/seqan/misc/svg.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/misc/terminal.h b/include/seqan/misc/terminal.h
index 9b1bb00..825798b 100644
--- a/include/seqan/misc/terminal.h
+++ b/include/seqan/misc/terminal.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/misc/union_find.h b/include/seqan/misc/union_find.h
index bd5388f..619f4d9 100644
--- a/include/seqan/misc/union_find.h
+++ b/include/seqan/misc/union_find.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/modifier.h b/include/seqan/modifier.h
index bad50e7..e4bc925 100644
--- a/include/seqan/modifier.h
+++ b/include/seqan/modifier.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/modifier/cyclic_shape.h b/include/seqan/modifier/cyclic_shape.h
index 32825b7..7148190 100644
--- a/include/seqan/modifier/cyclic_shape.h
+++ b/include/seqan/modifier/cyclic_shape.h
@@ -1,7 +1,7 @@
 // ========================================================================== 
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/modifier/modifier_alphabet.h b/include/seqan/modifier/modifier_alphabet.h
index fcb5b85..9f2fc96 100644
--- a/include/seqan/modifier/modifier_alphabet.h
+++ b/include/seqan/modifier/modifier_alphabet.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/modifier/modifier_alphabet_expansion.h b/include/seqan/modifier/modifier_alphabet_expansion.h
index d3e8b53..598059e 100644
--- a/include/seqan/modifier/modifier_alphabet_expansion.h
+++ b/include/seqan/modifier/modifier_alphabet_expansion.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/modifier/modifier_cyclic_shape.h b/include/seqan/modifier/modifier_cyclic_shape.h
index 5809fa3..e206146 100644
--- a/include/seqan/modifier/modifier_cyclic_shape.h
+++ b/include/seqan/modifier/modifier_cyclic_shape.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/modifier/modifier_functors.h b/include/seqan/modifier/modifier_functors.h
index 3235c9d..4214204 100644
--- a/include/seqan/modifier/modifier_functors.h
+++ b/include/seqan/modifier/modifier_functors.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/modifier/modifier_iterator.h b/include/seqan/modifier/modifier_iterator.h
index c5a9209..2084184 100644
--- a/include/seqan/modifier/modifier_iterator.h
+++ b/include/seqan/modifier/modifier_iterator.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/modifier/modifier_padding.h b/include/seqan/modifier/modifier_padding.h
index b02dbb7..b671f2d 100644
--- a/include/seqan/modifier/modifier_padding.h
+++ b/include/seqan/modifier/modifier_padding.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -80,7 +80,7 @@ template <typename THost>
 struct ModPaddingCargo
 {
     using TSize  = typename Size<THost>::Type;
-    using TValue = typename Value<THost>::Type;
+    using TValue = typename std::remove_const<typename Value<THost>::Type>::type;
 
     TSize   _numPaddedChar  = 0;
     TSize   _remainingSteps = 0;
@@ -165,16 +165,28 @@ struct DefaultIteratorSpec< ModifiedString<THost, ModPadding> >
  * @param [in,out] str  The modified string to be padded.
  * @param [in]     size The number of padded characters.
  * @param [in]     pad  The character to pad the sequence with.
- * 
+ *
  * @datarace Not thread-safe.
  */
 
+template <typename T>
+bool _isValid(T* value)
+{
+    return value != nullptr;
+}
+
+template <typename T>
+bool _isValid(T const &)
+{
+    return true;
+}
+
 template <typename THost, typename TSize, typename TPadding>
 inline void expand(ModifiedString<THost, ModPadding> & me,
                    TSize const newSize,
                    TPadding const & _padding)
 {
-    SEQAN_ASSERT(me._host != nullptr);
+    SEQAN_ASSERT(_isValid(me._host));
 
     cargo(me)._numPaddedChar = newSize;
     cargo(me)._paddedValue = _padding;
@@ -199,6 +211,51 @@ length(ModifiedString<THost, ModPadding> const & me)
 }
 
 // ----------------------------------------------------------------------------
+// Function cargoValue()
+// ----------------------------------------------------------------------------
+
+template <typename THost>
+inline typename Reference<ModifiedString<THost, ModPadding> >::Type
+cargoValue(ModifiedString<THost, ModPadding> & me)
+{
+    return cargo(me)._paddedValue;
+}
+
+// NOTE(rrahn): The problem with the padding symbol is, that it is always stored as a member
+// of the modifier class. Hence, if the modifier is const all it's members are const.
+// Now, the cargo could be either defined mutable or, and this what we did right now, the
+// the const is cast-away. However, we use SFINAE to only apply this hack to the Host types,
+// for which this becomes relevant. That are Host types like the Segment class who copy pointer semantics, i.e.
+// the constness of the object is not propagated to the underlying source.
+
+// The default version, where Reference<THost const>::Type gives back a const reference.
+template <typename THost,
+          std::enable_if_t<std::is_same<std::remove_reference_t<
+                                            typename Reference<ModifiedString<THost, ModPadding>>::Type>,
+                                        std::add_const_t<std::remove_reference_t<
+                                            typename Reference<ModifiedString<THost, ModPadding>>::Type>>>::value,
+                           int> = 0>
+inline typename Reference<ModifiedString<THost, ModPadding> >::Type
+cargoValue(ModifiedString<THost, ModPadding> const & me)
+{
+    return cargo(me)._paddedValue;
+}
+
+// The version, where Reference<THost const>::Type gives back a non-const reference.
+template <typename THost,
+          std::enable_if_t<!std::is_same<std::remove_reference_t<
+                                            typename Reference<ModifiedString<THost, ModPadding>>::Type>,
+                                         std::add_const_t<std::remove_reference_t<
+                                            typename Reference<ModifiedString<THost, ModPadding>>::Type>>>::value,
+                           int> = 0>
+inline typename Reference<ModifiedString<THost, ModPadding> >::Type
+cargoValue(ModifiedString<THost, ModPadding> const & me)
+{
+    using TTargetType = typename Reference<ModifiedString<THost, ModPadding> >::Type;
+    return const_cast<TTargetType>(cargo(me)._paddedValue);
+}
+
+// ----------------------------------------------------------------------------
 // Function value()
 // ----------------------------------------------------------------------------
 
@@ -207,7 +264,7 @@ inline typename Reference<ModifiedString<THost, ModPadding> >::Type
 value(ModifiedString<THost, ModPadding> & me, TPosition const pos)
 {
     SEQAN_ASSERT_LT(pos, static_cast<TPosition>(length(me)));
-    return (SEQAN_LIKELY(pos < static_cast<TPosition>(length(host(me))))) ? host(me)[pos] : cargo(me)._paddedValue;
+    return (SEQAN_LIKELY(pos < static_cast<TPosition>(length(host(me))))) ? host(me)[pos] : cargoValue(me);
 }
 
 template <typename THost, typename TPosition>
@@ -215,7 +272,7 @@ inline typename Reference<ModifiedString<THost, ModPadding> const>::Type
 value(ModifiedString<THost, ModPadding> const & me, TPosition const pos)
 {
     SEQAN_ASSERT_LT(pos, static_cast<TPosition>(length(me)));
-    return (SEQAN_LIKELY(pos < static_cast<TPosition>(length(host(me))))) ? value(host(me), pos) : cargo(me)._paddedValue;
+        return (SEQAN_LIKELY(pos < static_cast<TPosition>(length(host(me))))) ? value(host(me), pos) : cargoValue(me);
 }
 
 // ----------------------------------------------------------------------------
diff --git a/include/seqan/modifier/modifier_position.h b/include/seqan/modifier/modifier_position.h
index ca4d9fa..fe7543f 100644
--- a/include/seqan/modifier/modifier_position.h
+++ b/include/seqan/modifier/modifier_position.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/modifier/modifier_reverse.h b/include/seqan/modifier/modifier_reverse.h
index 334182b..c9413de 100644
--- a/include/seqan/modifier/modifier_reverse.h
+++ b/include/seqan/modifier/modifier_reverse.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/modifier/modifier_shortcuts.h b/include/seqan/modifier/modifier_shortcuts.h
index 8ba8473..ee570eb 100644
--- a/include/seqan/modifier/modifier_shortcuts.h
+++ b/include/seqan/modifier/modifier_shortcuts.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/modifier/modifier_string.h b/include/seqan/modifier/modifier_string.h
index 8ddbc56..940e6bf 100644
--- a/include/seqan/modifier/modifier_string.h
+++ b/include/seqan/modifier/modifier_string.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/modifier/modifier_view.h b/include/seqan/modifier/modifier_view.h
index 5637708..d43d048 100644
--- a/include/seqan/modifier/modifier_view.h
+++ b/include/seqan/modifier/modifier_view.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -321,14 +321,14 @@ template <typename THost, typename TFunctor>
 inline typename GetValue<ModifiedIterator<THost, ModView<TFunctor> > >::Type
 getValue(ModifiedIterator<THost, ModView<TFunctor> > & me)
 {
-    return cargo(me).func(getValue(host(me)));
+    return cargo(me).func(*host(me));
 }
 
 template <typename THost, typename TFunctor>
 inline typename GetValue<ModifiedIterator<THost, ModView<TFunctor> > const>::Type
 getValue(ModifiedIterator<THost, ModView<TFunctor> > const & me)
 {
-    return cargo(me).func(getValue(host(me)));
+    return cargo(me).func(*host(me));
 }
 
 // --------------------------------------------------------------------------
diff --git a/include/seqan/parallel.h b/include/seqan/parallel.h
index ac0a3d7..a6e673c 100755
--- a/include/seqan/parallel.h
+++ b/include/seqan/parallel.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -63,6 +63,8 @@
 #include <future>
 #include <mutex>
 #include <condition_variable>
+#include <unordered_map>
+#include <shared_mutex>
 
 // ============================================================================
 // Module Headers
@@ -89,5 +91,9 @@
 #include <seqan/parallel/parallel_queue_suspendable.h>
 #include <seqan/parallel/parallel_resource_pool.h>
 #include <seqan/parallel/parallel_serializer.h>
+#include <seqan/parallel/enumerable_thread_local.h>
+#include <seqan/parallel/enumerable_thread_local_iterator.h>
+#include <seqan/parallel/parallel_thread_pool.h>
+
 
 #endif  // SEQAN_PARALLEL_H_
diff --git a/include/seqan/parallel/enumerable_thread_local.h b/include/seqan/parallel/enumerable_thread_local.h
new file mode 100644
index 0000000..d62c25f
--- /dev/null
+++ b/include/seqan/parallel/enumerable_thread_local.h
@@ -0,0 +1,476 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Rene Rahn <rene.rahn at fu-berlin.de>
+// ==========================================================================
+
+#ifndef INCLUDE_SEQAN_ALIGN_PARALLEL_ENUMERABLE_THREAD_LOCAL_H_
+#define INCLUDE_SEQAN_ALIGN_PARALLEL_ENUMERABLE_THREAD_LOCAL_H_
+
+namespace seqan
+{
+
+// ============================================================================
+// Forwards
+// ============================================================================
+
+struct EnumerableThreadLocalIterSpec_;
+using EnumerableThreadLocalIterSpec = Tag<EnumerableThreadLocalIterSpec_>;
+
+// ============================================================================
+// Tags, Classes, Enums
+// ============================================================================
+
+/*!
+ * @class SimpleThreadLocalManager
+ * @headerfile <seqan/parallel.h>
+ * @brief Internal policy used to manage thread specific storage.
+ * @signature struct SimpleThreadLocalManager;
+ *
+ * Uses a shared mutex to synchronize concurrent access to the storage buffer (multiple read, single write).
+ * This policy checks if the thread-id was already registered and if not creates a new storage instance for the
+ * given thread-id.
+ *
+ * @see CountingThreadLocalManager
+ */
+struct SimpleThreadLocalManager
+{
+    std::shared_timed_mutex  _mutex{};        // TODO(rrahn): Replace by shared_mutex when c++17 is available.
+
+    /*!
+     * @fn SimpleThreadLocalManager::local
+     * @brief Implements the specific <tt>local</tt> policy.
+     * @headerfile <seqan/parallel.h>
+     *
+     * @signature auto local(map, init);
+     * @param map The buffer provided by the @link EnumerableThreadLocal @endlink instance to the hold the thread
+     *            local storage. Must satisfy the <tt>std::map</tt> interface.
+     * @param init The value used to initialize created storage.
+     *
+     * @datarace thread-safe.
+     * @return auto A tuple containing a lvalue reference to the associated storage and a boolean indicating first time
+     * access of the given thread-id.
+     */
+    template <typename TResourceMap, typename TValue>
+    inline auto &
+    local(TResourceMap & map, TValue const & initValue, bool & exists)
+    {
+        decltype(map.find(std::this_thread::get_id())) elemIt;
+
+        { // try to read
+            std::shared_lock<decltype(_mutex)> read_lck(_mutex);
+            elemIt = map.find(std::this_thread::get_id());
+            exists = elemIt != map.end();
+        }
+
+        if (!exists)
+        {
+            {  // Create new entry.
+                std::unique_lock<decltype(_mutex)> write_lck(_mutex);
+                std::tie(elemIt, exists) = map.emplace(std::this_thread::get_id(), initValue);
+            }
+
+            SEQAN_ASSERT(exists);
+            exists = false;  // Notify that element was added for the first time.
+        }
+        return elemIt->second;
+    }
+};
+
+/*!
+ * @class CountingThreadLocalManager
+ * @headerfile <seqan/parallel.h>
+ * @brief Internal policy used to manage thread specific storage for a limited number of threads.
+ * @signature struct SimpleThreadLocalManager;
+ *
+ * Uses a shared mutex to synchronize concurrent access to the storage buffer (multiple read, single write).
+ * This policy checks if the thread-id was already registered and if not creates a new storage instance for the
+ * given thread-id.
+ * In addition maintains an atomic counter to only check for existing values as long as the counter is not 0.
+ * This can be used if the number of threads registering at the @link EnumerableThreadLocal @endlink instance,
+ * is known beforehand. In this case, as soon as all threads have been registered and obtained their local storage,
+ * no further synchronization is necessary.
+ *
+ * @see SimpleThreadLocalManager
+ */
+struct CountingThreadLocalManager
+{
+    std::atomic<size_t>      _count{0};
+    std::shared_timed_mutex  _mutex{};        // TODO(rrahn): Replace by shared_mutex when c++17 is available.
+
+    /*!
+     * @fn CountingThreadLocalManager::local
+     * @brief Implements the specific <tt>local</tt> policy.
+     * @headerfile <seqan/parallel.h>
+     *
+     * @signature auto local(map, init);
+     * @param map The buffer provided by the @link EnumerableThreadLocal @endlink instance to the hold the thread
+     *            local storage. Must satisfy the <tt>std::map</tt> interface.
+     * @param init The value used to initialize created storage.
+     *
+     * @datarace thread-safe.
+     * @return auto A tuple containing a lvalue reference to the associated storage and a boolean indicating first time
+     * access of the given thread-id.
+     */
+    template <typename TResourceMap, typename TValue>
+    inline auto &
+    local(TResourceMap & map, TValue const & initValue, bool & exists)
+    {
+        if (_count.load(std::memory_order_relaxed) == 0)
+            return map.find(std::this_thread::get_id())->second;
+
+        decltype(map.find(std::this_thread::get_id())) elemIt;
+
+        { // try to read
+            std::shared_lock<decltype(_mutex)> read_lck(_mutex);
+            elemIt = map.find(std::this_thread::get_id());
+            exists = elemIt != map.end();
+        }
+
+        if (!exists)
+        {
+            {  // Create new entry.
+                std::unique_lock<decltype(_mutex)> write_lck(_mutex);
+                std::tie(elemIt, exists) = map.emplace(std::this_thread::get_id(), initValue);
+            }
+
+            --_count;
+            SEQAN_ASSERT(exists);
+            exists = false;  // Notify that element was added for the first time.
+        }
+        return elemIt->second;
+    }
+};
+
+// ----------------------------------------------------------------------------
+//  Function setCount()
+// ----------------------------------------------------------------------------
+
+inline void
+setCount(CountingThreadLocalManager & mngr, size_t const count)
+{
+    mngr._count.store(count, std::memory_order_relaxed);
+}
+
+/*!
+ * @class EnumerableThreadLocal
+ * @headerfile <seqan/parallel.h>
+ * @brief Manages thread local storage.
+ * @signature template <typename TValue, typename TManager, typename TSpec>
+ *            class ThreadPool;
+ * @tparam TValue The type of the stored value.
+ * @tparam TManager A policy used to manage the thread local storage. Defaults to @link SimpleThreadLocalManager @endlink.
+ * @tparam TSpec Specialization of the <tt>EnumerableThreadLocal</tt> class. Defaults to <tt>void</tt>.
+ *
+ * The enumerable thread local class can be used to manage thread local storage using a map as
+ * internal buffer. The class offers an iterator interface, such that the thread specific values can be
+ * enumerated allowing to apply reduce operations at the end of the parallel execution.
+ * Creating thread local storage happens via a lazy evaluation using the <tt>local</tt> function.
+ * If a thread, identified by its <a href="http://en.cppreference.com/w/cpp/thread/get_id">thread id</a>,
+ * requests storage for the first time a new thread specific storage will be created and a lvalue reference pointing
+ * to this storage is returned.
+ * If the thread id was already registered, then a lvalue reference to the associated storage will be returned.
+ * The access to the <tt>local</tt> function is thread safe and can be called concurrently.
+ *
+ * A thread local manager can be selected via template argument. This manager ensures safe access from concurrent
+ * invocations. The manager can further be replaced to change the behavior of storing the thread local data.
+ *
+ * @see SimpleThreadLocalManager
+ * @see CountingThreadLocalManager
+ */
+template <typename TValue, typename TManager = SimpleThreadLocalManager, typename TSpec = void>
+class EnumerableThreadLocal
+{
+public:
+
+    //-------------------------------------------------------------------------
+    // Member types.
+
+    using TMap           = std::unordered_map<std::thread::id, TValue>;
+    using TIterator      = Iter<EnumerableThreadLocal, EnumerableThreadLocalIterSpec>;
+    using TConstIterator = Iter<EnumerableThreadLocal const, EnumerableThreadLocalIterSpec>;
+
+    //-------------------------------------------------------------------------
+    // Private Members.
+
+    TMap                     _map{};
+    TValue                   _initValue{};
+    TManager                 _manager{};
+
+    //-------------------------------------------------------------------------
+    // Constructor.
+
+    /*!
+     * @fn EnumerableThreadLocal::EnumerableThreadLocal
+     * @brief Constructing an instance of this class.
+     * @signature EnumerableThreadLocal::EnumerableThreadLocal() = default;
+     * @signature EnumerableThreadLocal::EnumerableThreadLocal(TValue init);
+     *
+     * @param[in] init An optional value used to initialize the newly created storage.
+     * @note The class is not @link CopyConstructibleConcept copy constructible @endlink and not
+     * <a href="http://en.cppreference.com/w/cpp/concept/MoveConstructible">move constructible</a>.
+     */
+    EnumerableThreadLocal() = default;
+
+    explicit EnumerableThreadLocal(TValue initValue) : _initValue(std::move(initValue))
+    {}
+
+    EnumerableThreadLocal(EnumerableThreadLocal const &) = delete;
+    EnumerableThreadLocal(EnumerableThreadLocal &&) = delete;
+
+    //-------------------------------------------------------------------------
+    // Member Functions.
+
+    EnumerableThreadLocal & operator=(EnumerableThreadLocal const &) = delete;
+    EnumerableThreadLocal & operator=(EnumerableThreadLocal &&) = delete;
+};
+
+// ============================================================================
+// Metafunctions
+// ============================================================================
+
+/*!
+ * @mfn EnumerableThreadLocal#Iterator
+ * @brief Constructing an instance of this class.
+ * @headerfile <seqan/parallel.h>
+ * @signature Iterator<TEnumerableThreadLocal>::Type;
+ * @tparam  TEnumerableThreadLocal The type of the enumerable thread local class.
+ * @return Type The type of the iterator.
+ */
+template <typename TValue, typename TManager, typename TSpec,
+          typename TIterTag>
+struct Iterator<EnumerableThreadLocal<TValue, TManager, TSpec>, TIterTag>
+{
+    using Type = typename EnumerableThreadLocal<TValue, TManager, TSpec>::TIterator;
+};
+
+template <typename TValue, typename TManager, typename TSpec,
+          typename TIterTag>
+struct Iterator<EnumerableThreadLocal<TValue, TManager, TSpec> const, TIterTag>
+{
+    using Type = typename EnumerableThreadLocal<TValue, TManager, TSpec>::TConstIterator;
+};
+
+// ============================================================================
+// Functions
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+//  Function storageManager()
+// ----------------------------------------------------------------------------
+
+/*!
+ * @fn EnumerableThreadLocal#storageManager
+ * @brief Constructing an instance of this class.
+ * @headerfile <seqan/parallel.h>
+ * @signature TManager & storageManager(etl);
+ * @param[in] etl An instance of @link EnumerableThreadLocal @endlink.
+ * @return TManager& A lvalue reference to the associated storage manager.
+ * @datarace not thread-safe.
+ */
+template <typename TValue, typename TManager, typename TSpec>
+inline TManager &
+storageManager(EnumerableThreadLocal<TValue, TManager, TSpec> & me)
+{
+    return me._manager;
+}
+
+template <typename TValue, typename TManager, typename TSpec>
+inline TManager const &
+storageManager(EnumerableThreadLocal<TValue, TManager, TSpec> const & me)
+{
+    return me._manager;
+}
+
+// ----------------------------------------------------------------------------
+//  Function local()
+// ----------------------------------------------------------------------------
+
+/*!
+ * @fn EnumerableThreadLocal#local
+ * @brief Constructing an instance of this class.
+ * @headerfile <seqan/parallel.h>
+ *
+ * @signature auto & local(etl);
+ * @signature auto & local(etl, b);
+ * @param[in,out] etl An instance of @link EnumerableThreadLocal @endlink.
+ * @param[in,out] b A boolean to indicate successful creation.
+ *
+ * @return auto& A lvalue reference to the associated thread specific storage.
+ * @datarace thread-safe. Concurrent invocations of this function are synchronized via the storage manager.
+ *
+ * Calls the internal <tt>local</tt> member function of the associated storage manager. If the thread-id was used
+ * for the first time <tt>b</tt> will be set to <tt>true</tt> to indicate successful creation of the storage.
+ * If the storage was already created for the given thread-id, then <tt>b</tt> is set to <tt>false</tt>.
+ */
+template <typename TValue, typename TManager, typename TSpec>
+inline auto&
+local(EnumerableThreadLocal<TValue, TManager, TSpec> & me,
+      bool & exists)
+{
+    return  me._manager.local(me._map, me._initValue, exists);
+}
+
+template <typename TValue, typename TManager, typename TSpec>
+inline auto&
+local(EnumerableThreadLocal<TValue, TManager, TSpec> & me)
+{
+    bool exists{true};
+    return local(me, exists); // Double indirection to to iterator and pointer to therad_local storage.
+}
+
+// ----------------------------------------------------------------------------
+// Function begin()
+// ----------------------------------------------------------------------------
+
+/*!
+ * @fn EnumerableThreadLocal#begin
+ * @brief Returns a bidirectional iterator to the thread specific storage.
+ * @headerfile <seqan/parallel.h>
+ *
+ * @signature TIteator begin(etl, tag);
+ * @param[in] etl An instance of @link EnumerableThreadLocal @endlink.
+ * @param[in] tag A tag to choose the type of the iterator. One of @link ContainerIteratorTags @endlink.
+ *
+ * @return TIteator Iterator to the begin of the thread stores.
+ * @datarace thread-safe.
+ */
+template <typename TValue, typename TManager, typename TSpec,
+          typename TIterSpec>
+inline auto
+begin(EnumerableThreadLocal<TValue, TManager, TSpec> & me,
+      Tag<TIterSpec> const & /*tag*/)
+{
+    return typename EnumerableThreadLocal<TValue, TManager, TSpec>::TIterator{me};
+}
+
+template <typename TValue, typename TManager, typename TSpec,
+          typename TIterSpec>
+inline auto
+begin(EnumerableThreadLocal<TValue, TManager, TSpec> const & me,
+      Tag<TIterSpec> const & /*tag*/)
+{
+    return typename EnumerableThreadLocal<TValue, TManager, TSpec>::TConstIterator{me};
+}
+
+// ----------------------------------------------------------------------------
+// Function end()
+// ----------------------------------------------------------------------------
+
+/*!
+ * @fn EnumerableThreadLocal#end
+ * @brief Returns a bidirectional iterator to the thread specific storage.
+ * @headerfile <seqan/parallel.h>
+ *
+ * @signature TIteator end(etl, tag);
+ * @param[in] etl An instance of @link EnumerableThreadLocal @endlink.
+ * @param[in] tag A tag to choose the type of the iterator. One of @link ContainerIteratorTags @endlink.
+ *
+ * @return TIteator Iterator to the end of the thread stores.
+ * @datarace thread-safe.
+ */
+template <typename TValue, typename TManager, typename TSpec,
+          typename TIterSpec>
+inline auto
+end(EnumerableThreadLocal<TValue, TManager, TSpec> & me,
+    Tag<TIterSpec> const & /*tag*/)
+{
+    return typename EnumerableThreadLocal<TValue, TManager, TSpec>::TIterator{me._map.end()};
+}
+
+template <typename TValue, typename TManager, typename TSpec,
+          typename TIterSpec>
+inline auto
+end(EnumerableThreadLocal<TValue, TManager, TSpec> const & me,
+    Tag<TIterSpec> const & /*tag*/)
+{
+    return typename EnumerableThreadLocal<TValue, TManager, TSpec>::TConstIterator{me._map.cend()};
+}
+
+// ----------------------------------------------------------------------------
+// Function combine()
+// ----------------------------------------------------------------------------
+
+/*!
+ * @fn EnumerableThreadLocal#combineEach
+ * @brief Enumerates thread local stores and applies an unary functor for each store.
+ * @headerfile <seqan/parallel.h>
+ *
+ * @signature void combineEach(etl, f);
+ * @param[in] etl An instance of @link EnumerableThreadLocal @endlink.
+ * @param[in] f An unary functor called on each thread local storage.
+ *
+ * @datarace not thread-safe.
+ * @see EnumerableThreadLocal#combine
+ *  @section Possible implementation:
+ * @code{.cpp}
+ * std::for_each(begin(etl), end(etl), f);
+ * @endcode
+ */
+template <typename TValue, typename TManager, typename TSpec,
+          typename TUnaryCombine>
+inline void
+combineEach(EnumerableThreadLocal<TValue, TManager, TSpec> & me,
+            TUnaryCombine && fUnaryCombine)
+{
+    std::shared_lock<decltype(storageManager(me)._mutex)> read_lck(storageManager(me)._mutex);
+    std::for_each(begin(me), end(me), std::forward<TUnaryCombine>(fUnaryCombine));
+}
+
+/*!
+ * @fn EnumerableThreadLocal#combine
+ * @brief Enumerates thread local stores and applies a binary functor for each store.
+ * @headerfile <seqan/parallel.h>
+ *
+ * @signature void combine(etl, f);
+ * @param[in] etl An instance of @link EnumerableThreadLocal @endlink.
+ * @param[in] f A binary combinator called on each thread local storage.
+ *
+ * @datarace not thread-safe.
+ * @see EnumerableThreadLocal#combineEach
+ * @section Possible implementation:
+ * @code{.cpp}
+ * std::accumulate(begin(etl), end(etl), TValue{}, f);
+ * @endcode
+ */
+template <typename TValue, typename TManager, typename TSpec,
+          typename TBinaryCombine>
+inline auto
+combine(EnumerableThreadLocal<TValue, TManager, TSpec> & me,
+        TBinaryCombine && fBinaryCombine)
+{
+    std::shared_lock<decltype(storageManager(me)._mutex)> read_lck(storageManager(me)._mutex);
+    return std::accumulate(begin(me), end(me), TValue{}, std::forward<TBinaryCombine>(fBinaryCombine));
+}
+
+}  // namespace seqan
+
+#endif  // #ifndef INCLUDE_SEQAN_ALIGN_PARALLEL_ENUMERABLE_THREAD_LOCAL_H_
diff --git a/include/seqan/parallel/enumerable_thread_local_iterator.h b/include/seqan/parallel/enumerable_thread_local_iterator.h
new file mode 100644
index 0000000..64d9c3b
--- /dev/null
+++ b/include/seqan/parallel/enumerable_thread_local_iterator.h
@@ -0,0 +1,186 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Rene Rahn <rene.rahn at fu-berlin.de>
+// ==========================================================================
+
+#ifndef INCLDUE_SEQAN_ALIGN_PARALLEL_ENUMERABLE_THREAD_LOCAL_ITERATOR_H_
+#define INCLDUE_SEQAN_ALIGN_PARALLEL_ENUMERABLE_THREAD_LOCAL_ITERATOR_H_
+
+namespace std
+{
+
+template<typename TContainer>
+struct iterator_traits<seqan::Iter<TContainer, seqan::EnumerableThreadLocalIterSpec> > // nolint
+{
+    typedef seqan::Iter<TContainer, seqan::EnumerableThreadLocalIterSpec> TIter; // nolint
+
+    typedef forward_iterator_tag iterator_category; // nolint
+    typedef typename seqan::Value<TIter>::Type value_type; // nolint
+    typedef typename seqan::Difference<TIter>::Type difference_type; // nolint
+    typedef typename seqan::Value<TIter>::Type * pointer; // nolint
+    typedef typename seqan::Reference<TIter>::Type reference; // nolint
+};
+
+}
+
+namespace seqan
+{
+
+// ============================================================================
+// Forwards
+// ============================================================================
+
+// ============================================================================
+// Tags, Classes, Enums
+// ============================================================================
+
+template <typename TEnumerableThreadLocal>
+class Iter<TEnumerableThreadLocal, EnumerableThreadLocalIterSpec>
+{
+public:
+
+    //-------------------------------------------------------------------------
+    // Member Types.
+
+    using TMap = typename TEnumerableThreadLocal::TMap;
+    using TMapIterator = typename IfC<std::is_const<TEnumerableThreadLocal>::value,
+                                      typename TMap::const_iterator,
+                                      typename TMap::iterator>::Type;
+
+    //-------------------------------------------------------------------------
+    // Member Variables.
+
+    TMapIterator _mInnerIter{};
+
+    //-------------------------------------------------------------------------
+    // Constructors.
+
+    Iter() = default;
+
+    Iter(typename TMap::iterator const & it) : _mInnerIter(it)
+    {}
+
+    Iter(typename TMap::const_iterator const & cit) : _mInnerIter(cit)
+    {}
+
+    Iter(TEnumerableThreadLocal & iterable) : Iter(iterable._map.begin())
+    {}
+
+    //-------------------------------------------------------------------------
+    // Member Functions.
+
+    inline auto *
+    operator->()
+    {
+        return &*(*this);
+    }
+
+    inline auto *
+    operator->() const
+    {
+        return &*(*this);
+    }
+};
+
+// ============================================================================
+// Metafunctions
+// ============================================================================
+
+// ============================================================================
+// Functions
+// ============================================================================
+
+template <typename TEnumerableThreadLocal>
+inline auto &
+operator*(Iter<TEnumerableThreadLocal, EnumerableThreadLocalIterSpec> & me)
+{
+    return me._mInnerIter->second;
+}
+
+template <typename TEnumerableThreadLocal>
+inline auto const &
+operator*(Iter<TEnumerableThreadLocal, EnumerableThreadLocalIterSpec> const & me)
+{
+    return me._mInnerIter->second;
+}
+
+template <typename TEnumerableThreadLocal>
+inline void
+operator++(Iter<TEnumerableThreadLocal, EnumerableThreadLocalIterSpec> & me)
+{
+    ++me._mInnerIter;
+}
+
+template <typename TEnumerableThreadLocal>
+inline void
+operator++(Iter<TEnumerableThreadLocal, EnumerableThreadLocalIterSpec> & me, int /*postfix*/)
+{
+    me._mInnerIter++;
+}
+
+template <typename TEnumerableThreadLocal>
+inline void
+operator--(Iter<TEnumerableThreadLocal, EnumerableThreadLocalIterSpec> & me)
+{
+    --me._mInnerIter;
+}
+
+template <typename TEnumerableThreadLocal>
+inline void
+operator--(Iter<TEnumerableThreadLocal, EnumerableThreadLocalIterSpec> & me, int /*postfix*/)
+{
+    me._mInnerIter--;
+}
+
+template <typename TEnumerableThreadLocalLeft,
+          typename TEnumerableThreadLocalRight,
+          typename = std::enable_if<std::is_same<typename std::decay<TEnumerableThreadLocalLeft>::type,
+                                                 typename std::decay<TEnumerableThreadLocalRight>::type>::value>>
+inline bool
+operator==(Iter<TEnumerableThreadLocalLeft, EnumerableThreadLocalIterSpec> const & lhs,
+           Iter<TEnumerableThreadLocalRight, EnumerableThreadLocalIterSpec> const & rhs)
+{
+    return lhs._mInnerIter == rhs._mInnerIter;
+}
+
+template <typename TEnumerableThreadLocalLeft,
+          typename TEnumerableThreadLocalRight>
+inline bool
+operator!=(Iter<TEnumerableThreadLocalLeft, EnumerableThreadLocalIterSpec> const & lhs,
+           Iter<TEnumerableThreadLocalRight, EnumerableThreadLocalIterSpec> const & rhs)
+{
+    return !(lhs._mInnerIter == rhs._mInnerIter);
+}
+
+}  // namespace seqan
+
+#endif  // #ifndef INCLDUE_SEQAN_ALIGN_PARALLEL_ENUMERABLE_THREAD_LOCAL_ITERATOR_H_
diff --git a/include/seqan/parallel/parallel_algorithms.h b/include/seqan/parallel/parallel_algorithms.h
index 8944c38..e5d7907 100644
--- a/include/seqan/parallel/parallel_algorithms.h
+++ b/include/seqan/parallel/parallel_algorithms.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -160,7 +160,7 @@ partialSum(TTarget &target, TSource const &source, Tag<TParallelTag> parallelTag
 
     // STEP 1: compute sums of all subintervals (in parallel)
     //
-    SEQAN_OMP_PRAGMA(parallel for)
+    SEQAN_OMP_PRAGMA(parallel for num_threads(length(splitter)))
     for (int job = 0; job < (int)length(splitter) - 1; ++job)
         localSums[job + 1] = sum(infix(source, splitter[job], splitter[job + 1]), Serial());
 
@@ -171,7 +171,7 @@ partialSum(TTarget &target, TSource const &source, Tag<TParallelTag> parallelTag
 
     // STEP 3: compute partial sums of each subinterval starting from offset (in parallel)
     //
-    SEQAN_OMP_PRAGMA(parallel for)
+    SEQAN_OMP_PRAGMA(parallel for num_threads(length(splitter)))
     for (int job = 0; job < (int)length(splitter); ++job)
     {
         TConstIterator it = begin(source, Standard()) + splitter[job];
@@ -233,12 +233,13 @@ inline void iterate(TContainer & c, TFunctor f, Tag<TIterTag> const & iterTag, P
 {
     typedef Tag<TIterTag> const                                     TIterSpec;
     typedef typename Position<TContainer>::Type                     TPos;
+    typedef typename std::make_signed<TPos>::type                   TSignedPos;
     typedef typename Iterator<TContainer, TIterSpec>::Type          TIter;
 
     Splitter<TPos> splitter(0, length(c), Parallel());
 
     SEQAN_OMP_PRAGMA(parallel for firstprivate(f))
-    for (TPos i = 0; i < length(splitter); ++i)
+    for (TSignedPos i = 0; i < static_cast<TSignedPos>(length(splitter)); ++i)
     {
        TIter it = begin(c, iterTag) + splitter[i];
        TIter itEnd = begin(c, iterTag) + splitter[i + 1];
diff --git a/include/seqan/parallel/parallel_atomic_misc.h b/include/seqan/parallel/parallel_atomic_misc.h
index 6c350d4..af54ba3 100644
--- a/include/seqan/parallel/parallel_atomic_misc.h
+++ b/include/seqan/parallel/parallel_atomic_misc.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/parallel/parallel_atomic_primitives.h b/include/seqan/parallel/parallel_atomic_primitives.h
index d5f0681..ccb95e9 100644
--- a/include/seqan/parallel/parallel_atomic_primitives.h
+++ b/include/seqan/parallel/parallel_atomic_primitives.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/parallel/parallel_lock.h b/include/seqan/parallel/parallel_lock.h
index 54f6a44..3995999 100644
--- a/include/seqan/parallel/parallel_lock.h
+++ b/include/seqan/parallel/parallel_lock.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -215,6 +215,8 @@ yieldProcessor()
 {
 #if defined(STDLIB_VS)  // Visual Studio - all platforms.
     YieldProcessor();
+#elif defined(__armel__) || defined(__ARMEL__) // arm, but broken
+    asm volatile ("nop" ::: "memory");  // default operation - does nothing => Might lead to passive spinning.
 #elif defined(__arm__) || defined(__aarch64__)  // ARM.
     __asm__ __volatile__ ("yield" ::: "memory");
 #elif defined(__sparc) // SPARC
diff --git a/include/seqan/parallel/parallel_macros.h b/include/seqan/parallel/parallel_macros.h
index 1499865..5d5dd05 100644
--- a/include/seqan/parallel/parallel_macros.h
+++ b/include/seqan/parallel/parallel_macros.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/parallel/parallel_queue.h b/include/seqan/parallel/parallel_queue.h
index 8edc5b6..92b2110 100644
--- a/include/seqan/parallel/parallel_queue.h
+++ b/include/seqan/parallel/parallel_queue.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -93,8 +93,8 @@ public:
 
     TString                 data;
     mutable ReadWriteLock   lock;           char pad1[SEQAN_CACHE_LINE_SIZE - sizeof(ReadWriteLock)];
-    size_t                  readerCount;
-    size_t                  writerCount;
+    std::atomic<size_t>     readerCount;
+    std::atomic<size_t>     writerCount;
 
     TAtomicSize headPos;                    char pad4[SEQAN_CACHE_LINE_SIZE - sizeof(TAtomicSize)];
     TAtomicSize headReadPos;                char pad5[SEQAN_CACHE_LINE_SIZE - sizeof(TAtomicSize)];
@@ -145,6 +145,10 @@ public:
 
     ~ConcurrentQueue()
     {
+        // wait for all pending readers to finish
+        while (readerCount.load(std::memory_order_acquire) != 0)
+        {}
+
         SEQAN_ASSERT_EQ(tailPos, tailWritePos);
         SEQAN_ASSERT_EQ(headPos, headReadPos);
         SEQAN_ASSERT(empty(lock));
@@ -154,10 +158,6 @@ public:
         headPos &= mask;
         tailPos &= mask;
 
-        // wait for all pending readers to finish
-        while (readerCount != 0)
-        {}
-
         typename Iterator<TString, Standard>::Type arrayBegin = begin(data, Standard());
 
         if (headPos <= tailPos)
@@ -235,7 +235,7 @@ template <typename TValue, typename TSpec>
 inline void
 lockReading(ConcurrentQueue<TValue, TSpec> & me)
 {
-    atomicInc(me.readerCount);
+    ++me.readerCount;
 }
 
 /*!
@@ -253,7 +253,7 @@ template <typename TValue, typename TSpec>
 inline void
 unlockReading(ConcurrentQueue<TValue, TSpec> & me)
 {
-    atomicDec(me.readerCount);
+    --me.readerCount;
 }
 
 // ----------------------------------------------------------------------------
@@ -274,7 +274,7 @@ template <typename TValue, typename TSpec>
 inline void
 lockWriting(ConcurrentQueue<TValue, TSpec> & me)
 {
-    atomicInc(me.writerCount);
+    ++me.writerCount;
 }
 
 /*!
@@ -291,7 +291,7 @@ template <typename TValue, typename TSpec>
 inline void
 unlockWriting(ConcurrentQueue<TValue, TSpec> & me)
 {
-    atomicDec(me.writerCount);
+    --me.writerCount;
 }
 
 // ----------------------------------------------------------------------------
@@ -512,7 +512,7 @@ inline void
 waitForWriters(ConcurrentQueue<TValue, TSpec> & me, unsigned writerCount)
 {
     SpinDelay spinDelay;
-    while (me.writerCount < writerCount)
+    while (me.writerCount.load(std::memory_order_relaxed) < writerCount)
     {
         waitFor(spinDelay);
     }
@@ -569,7 +569,7 @@ popFront(TValue & result, ConcurrentQueue<TValue, TSpec> & me, Tag<TParallel> pa
 {
     SpinDelay spinDelay;
 
-    while (me.writerCount != 0)
+    while (me.writerCount.load(std::memory_order_relaxed) != 0)
     {
         if (tryPopFront(result, me, parallelTag))
             return true;
diff --git a/include/seqan/parallel/parallel_queue_suspendable.h b/include/seqan/parallel/parallel_queue_suspendable.h
index db1aa13..2ecd4a3 100644
--- a/include/seqan/parallel/parallel_queue_suspendable.h
+++ b/include/seqan/parallel/parallel_queue_suspendable.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -169,12 +169,12 @@ template <typename TValue, typename TSpec>
 inline void
 unlockReading(ConcurrentQueue<TValue, Suspendable<TSpec> > & me)
 {
-    std::unique_lock<std::mutex> lock(me.cs);
-    if (--me.readerCount == 0u)
     {
-        lock.unlock();
-        me.less.notify_all();
+        std::lock_guard<std::mutex> lock(me.cs);
+        if (--me.readerCount != 0u)
+            return;
     }
+    me.less.notify_all();  // publish the condition that reader count is 0.
 }
 
 template <typename TValue, typename TSpec>
@@ -186,12 +186,12 @@ template <typename TValue, typename TSpec>
 inline void
 unlockWriting(ConcurrentQueue<TValue, Suspendable<TSpec> > & me)
 {
-    std::unique_lock<std::mutex> lk(me.cs);
-    if (--me.writerCount == 0u)
     {
-        lk.unlock();
-        me.more.notify_all();
+        std::lock_guard<std::mutex> lk(me.cs);
+        if (--me.writerCount != 0u)
+            return;
     }
+    me.more.notify_all();  // publish the condition, that writer count is 0.
 }
 
 template <typename TValue, typename TSize, typename TSpec>
diff --git a/include/seqan/parallel/parallel_resource_pool.h b/include/seqan/parallel/parallel_resource_pool.h
index c0330e3..32d4c3a 100644
--- a/include/seqan/parallel/parallel_resource_pool.h
+++ b/include/seqan/parallel/parallel_resource_pool.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/parallel/parallel_sequence.h b/include/seqan/parallel/parallel_sequence.h
index 6068bad..08710d0 100644
--- a/include/seqan/parallel/parallel_sequence.h
+++ b/include/seqan/parallel/parallel_sequence.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/parallel/parallel_serializer.h b/include/seqan/parallel/parallel_serializer.h
index f40c373..3d3b57e 100644
--- a/include/seqan/parallel/parallel_serializer.h
+++ b/include/seqan/parallel/parallel_serializer.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/parallel/parallel_splitting.h b/include/seqan/parallel/parallel_splitting.h
index 3ec82e4..f02d991 100644
--- a/include/seqan/parallel/parallel_splitting.h
+++ b/include/seqan/parallel/parallel_splitting.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/parallel/parallel_tags.h b/include/seqan/parallel/parallel_tags.h
index 20d395c..cae36d0 100644
--- a/include/seqan/parallel/parallel_tags.h
+++ b/include/seqan/parallel/parallel_tags.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -30,6 +30,7 @@
 //
 // ==========================================================================
 // Author: David Weese <david.weese at fu-berlin.de>
+//         Rene Rahn <rene.rahn at fu-berlin.de>
 // ==========================================================================
 // Tags to select serial/parallel algorithms.
 // ==========================================================================
@@ -62,16 +63,150 @@ namespace seqan {
  * @tag ParallelismTags#Serial
  * @headerfile <seqan/parallel.h>
  * @brief Tag to select the serial implementation of an algorithm.
+ *
+ * @tag ParallelismTags#Vectorial
+ * @headerfile <seqan/parallel.h>
+ * @brief Tag to select the vectorized implementation of an algorithm.
  */
 
 struct Parallel_;
 typedef Tag<Parallel_> Parallel;
 
+// ----------------------------------------------------------------------------
+// Tag Vectorial
+// ----------------------------------------------------------------------------
+
+struct Vectorial_;
+using Vectorial = Tag<Vectorial_>;
+
+// ----------------------------------------------------------------------------
+// Class ExecutionPolicy
+// ----------------------------------------------------------------------------
+
+/*!
+ * @class ExecutionPolicy
+ * @headerfile <seqan/parallel.h>
+ * @brief Policy to select runtime execution mode for algorithms.
+ * @signature template<typename TThreadingMode, typename TVectorizationMode>
+ *            struct ExecutionPolicy;
+ * @tparam TThreadingMode Type specifying the threading model.
+ *         Can be @link ParallelismTags#Parallel @endlink or @link ParallelismTags#Serial @endlink (default).
+ * @tparam TVectorizationMode Type specifying the vectorization model.
+ *         Can be @link ParallelismTags#Vectorial @endlink or @link ParallelismTags#Serial @endlink (default).
+ *
+ * The <tt>ExecutionPolicy</tt> class is used to select different execution models for certain algorithms.
+ * Depending on the specialization of the template parameters 4 different modes are possible: sequential, parallel,
+ * vectorized and parallel+vectorized. The number of threads for the parallel execution modes can be configured via a
+ * member variable.
+ */
+// Dynamic execution policy.
+template <typename TThreadModel = Serial, typename TVectorSpec = Serial>
+struct ExecutionPolicy
+{
+    // Member variables.
+    /*!
+     * @var size_t ExecutionPolicy::numThreads
+     * @brief The number of threads to use for the parallel execution. Defaults to 1.
+     */
+    size_t _numThreads = 1;
+};
+
+// ----------------------------------------------------------------------------
+// Tag ExecutionPolicy  [Sequential]
+// ----------------------------------------------------------------------------
+
+/*!
+ * @typedef Sequential
+ * @brief A typedef for the sequential @link ExecutionPolicy @endlink version.
+ * @headerfile <seqan/parallel.h>
+ *
+ * @signature using Sequential = ExecutionPolicy<Serial, Serial>;
+ */
+using Sequential = ExecutionPolicy<>;
+
 // ============================================================================
 // Metafunctions
 // ============================================================================
 
 // ----------------------------------------------------------------------------
+// Metafunction IsVectorized
+// ----------------------------------------------------------------------------
+
+/*!
+ * @mfn ExecutionPolicy#IsVectorized
+ * @brief Evaluates to @link LogicalValuesTags#True @endlink if the execution policy is
+ *        specialized with @link ParallelismTags#Vectorial @endlink.
+ * @headerfile <seqan/parallel.h>
+ *
+ * @signature IsVectorized<TExecPolicy>::VALUE
+ * @tparam TTExecPolicy The @link ExecutionPolicy @endlink to check.
+ * @return bool <tt>true</tt> if @link ExecutionPolicy @endlink is @link ParallelismTags#Vectorial @endlink,
+ *              otherwise <tt>false</tt>.
+ */
+template <typename T>
+struct IsVectorized : False
+{};
+
+template <>
+struct IsVectorized<Vectorial> : True
+{};
+
+template <typename TPar, typename TVec>
+struct IsVectorized<ExecutionPolicy<TPar, TVec> > :
+    public IsVectorized<TVec>
+{};
+
+// ----------------------------------------------------------------------------
+// Metafunction IsParallel
+// ----------------------------------------------------------------------------
+
+/*!
+ * @mfn ExecutionPolicy#IsParallel
+ * @brief Evaluates to @link LogicalValuesTags#True @endlink if the execution policy is
+ *        specialized with @link ParallelismTags#Parallel @endlink.
+ * @headerfile <seqan/parallel.h>
+ *
+ * @signature IsParallel<TExecPolicy>::VALUE
+ * @tparam TTExecPolicy The @link ExecutionPolicy @endlink to check.
+ * @return bool <tt>true</tt> if @link ExecutionPolicy @endlink is @link ParallelismTags#Parallel @endlink,
+ *              otherwise <tt>false</tt>.
+ */
+template <typename T>
+struct IsParallel : False
+{};
+
+template <>
+struct IsParallel<Parallel> : True
+{};
+
+template <typename TPar, typename TVec>
+struct IsParallel<ExecutionPolicy<TPar, TVec> > :
+    public IsParallel<TPar>
+{};
+
+// ----------------------------------------------------------------------------
+// Metafunction IsExecutionPolicy
+// ----------------------------------------------------------------------------
+
+/*!
+ * @mfn ExecutionPolicy#IsExecutionPolicy
+ * @brief Checks if a given type is an @link ExecutionPolicy @endlink.
+ * @headerfile <seqan/parallel.h>
+ *
+ * @signature IsExecutionPolicy<T>::VALUE
+ * @tparam T The type to check.
+ * @return bool <tt>true</tt> if the <tt>T</tt> is an @link ExecutionPolicy @endlink type,
+ *              otherwise <tt>false</tt>.
+ */
+template <typename T>
+struct IsExecutionPolicy : False
+{};
+
+template <typename TPar, typename TVec>
+struct IsExecutionPolicy<ExecutionPolicy<TPar, TVec> > : True
+{};
+
+// ----------------------------------------------------------------------------
 // Metafunction DefaultParallelSpec
 // ----------------------------------------------------------------------------
 
@@ -81,6 +216,43 @@ struct DefaultParallelSpec
     typedef Parallel Type;
 };
 
+// ============================================================================
+// Functions
+// ============================================================================
+
+/*!
+ * @fn ExecutionPolicy#numThreads
+ * @brief Getter function for the thread number.
+ * @headerfile <seqan/parallel.h>
+ *
+ * @signature auto numThreads(exec);
+ * @param[in] exec The @link ExecutionPolicy @endlink to get the number of threads for.
+ * @return auto The number of threads.
+ */
+template <typename TParallelSpec, typename TVectorizationSpec>
+inline auto
+numThreads(ExecutionPolicy<TParallelSpec, TVectorizationSpec> const & p)
+{
+    return p._numThreads;
+}
+
+/*!
+ * @fn ExecutionPolicy#setNumThreads
+ * @brief Setter function for the thread number.
+ * @headerfile <seqan/parallel.h>
+ *
+ * @signature void setNumThreads(exec, n);
+ * @param[in,out] exec The @link ExecutionPolicy @endlink to set the number of threads for.
+ * @param[in] n The number of threads used for the parallel execution.
+ */
+template <typename TParallelSpec, typename TVectorizationSpec>
+inline void
+setNumThreads(ExecutionPolicy<TParallelSpec, TVectorizationSpec> & p,
+              size_t const nt)
+{
+    p._numThreads = nt;
+}
+
 }  // namespace seqan
 
 #endif  // #ifndef SEQAN_PARALLEL_PARALLEL_TAGS_H_
diff --git a/include/seqan/parallel/parallel_thread_pool.h b/include/seqan/parallel/parallel_thread_pool.h
new file mode 100644
index 0000000..77efd16
--- /dev/null
+++ b/include/seqan/parallel/parallel_thread_pool.h
@@ -0,0 +1,219 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Rene Rahn <rene.rahn at fu-berlin.de>
+// ==========================================================================
+
+#ifndef INCLUDE_SEQAN_PARALLEL_PARALLEL_THREAD_POOL_H_
+#define INCLUDE_SEQAN_PARALLEL_PARALLEL_THREAD_POOL_H_
+
+#if defined(__linux__)
+#include <sched.h>
+#endif  // defined(__linux__)
+
+namespace seqan
+{
+
+// ============================================================================
+// Forwards
+// ============================================================================
+
+// ============================================================================
+// Tags, Classes, Enums
+// ============================================================================
+
+/*!
+ * @class ThreadPool
+ * @headerfile <seqan/parallel.h>
+ * @brief Handles a pool of concurrent <a href="http://en.cppreference.com/w/cpp/thread/thread">std::threads</a>.
+ * @signature class ThreadPool;
+ *
+ * This is a simple raii-wrapper class to manage a set of <tt>std::threads</tt>.
+ */
+class ThreadPool
+{
+public:
+
+    //-------------------------------------------------------------------------
+    // Constructor.
+
+    /*!
+     * @fn ThreadPool::ThreadPool
+     * @brief The constructor.
+     * @signature ThreadPool::TThreadPool() = default;
+     * @signature ThreadPool::TThreadPool(ThreadPool const &) = delete;
+     * @signature ThreadPool::TThreadPool(ThreadPool &&) = delete;
+     *
+     * Creates a new instance with an empty pool.
+     */
+    ThreadPool() = default;
+    ThreadPool(ThreadPool const &) = delete;
+    ThreadPool(ThreadPool &&) = delete;
+
+    ThreadPool& operator=(ThreadPool const &) = delete;
+    ThreadPool& operator=(ThreadPool &&) = delete;
+
+    /*!
+     * @fn ThreadPool::~ThreadPool
+     * @brief The destructor.
+     * @signature ThreadPool::~ThreadPool()
+     *
+     * Safely destroys the thread pool instance by joining all registered threads.
+     * This is an implicit barrier for the owning thread.
+     *
+     * @warning If threads cannot be joined (e.g. dead lock) the destructor will wait forever.
+     */
+    ~ThreadPool()
+    {
+        for_each(std::begin(_mPool), std::end(_mPool),
+                 [] (auto & t)
+                 {
+                     if (t.joinable())
+                        t.join();
+                 });
+    }
+
+    //-------------------------------------------------------------------------
+    // Private Member Variables.
+
+    std::deque<std::thread> _mPool;
+};
+
+// ============================================================================
+// Metafunctions
+// ============================================================================
+
+// ============================================================================
+// Functions
+// ============================================================================
+
+/*!
+ * @fn ThreadPool#spawn
+ * @brief Spawns a new thread and registers it in the thread pool.
+ * @headerfile <seqan/parallel.h>
+ *
+ * @signature void spawn(pool, callable, ...args);
+ * @param[in,out] pool The @link ThreadPool @endlink to register the new spawned thread in.
+ * @param[in] callable A callable object (e.g. functor or function) that should be executed by the spawned thread.
+ * @param     args Any number of arguments passed to the callable object.
+ *
+ * Emplaces the thread in the <tt>pool</tt> and associates the thread with the callable by passing the <tt>args</tt>
+ * to the callable instance.
+ *
+ * @datarace This function is not thread safe. Concurrent invocations of this function for the same <tt>pool</tt> might
+ * result in undefined behavior.
+ */
+template <typename TCallable, typename ...TArgs>
+inline void
+spawn(ThreadPool & pool,
+      TCallable callable, TArgs && ...args)
+{
+    pool._mPool.emplace_back(callable, std::forward<TArgs>(args)...);
+}
+
+/*!
+ * @fn ThreadPool#join
+ * @brief Explicit barrier over the pool.
+ * @headerfile <seqan/parallel.h>
+ *
+ * @signature void join(pool);
+ * @param[in,out] pool The @link ThreadPool @endlink to be joined.
+ *
+ * Allows the user to wait for all registered threads to be finished before the calling thread continues its execution.
+ *
+ * @datarace This function is not thread safe. Concurrent invocations of this function for the same <tt>pool</tt> might
+ * result in undefined behavior.
+ */
+inline void
+join(ThreadPool & me)
+{
+    for_each(std::begin(me._mPool), std::end(me._mPool),
+    [](auto & t)
+    {
+        if (t.joinable())
+            t.join();
+    });
+}
+
+/*!
+ * @fn ThreadPool#setCpuAffinity
+ * @brief Pins the spawned threads in a round-robin fashion.
+ * @headerfile <seqan/parallel.h>
+ *
+ * @signature void setCpuAffinity(pool, cpu, scale);
+ * @param[in,out] pool The @link ThreadPool @endlink to pin the threads for.
+ * @param[in] cpu The number of the first cpu to be pinned.
+ * @param[in] scale A scaling factor to
+ *
+ * Iterates over all threads registered in the pool and pins each of them to a cpu in a round-robin fashion.
+ * Using <tt>cpu</tt> and <tt>scale</tt> the cpu ids for pinning the threads can be configured dynamically.
+ * @section Possible implementation:
+ * @code{.cpp}
+ * cpu * scale % std::thread::hardware_concurrency();
+ * @endcode
+ *
+ * @note This function uses pthread functions on the native thread handle and is only available for linux platforms.
+ *       On all other platforms this function is a no-op.
+ *
+ * @datarace This function is not thread safe. Concurrent invocations of this function for the same <tt>pool</tt> might
+ * result in undefined behavior.
+ */
+#if defined(__linux__)
+inline bool
+setCpuAffinity(ThreadPool & me, size_t firstCpu = 0, size_t const scale = 1)
+{
+    SEQAN_ASSERT_GEQ(scale, static_cast<size_t>(1));
+    bool success{true};
+    for (auto & t : me._mPool)
+    {
+        // Create a cpu_set_t object representing a set of CPUs. Clear it and mark
+        // only CPU i as set.
+        cpu_set_t cpuset;
+        CPU_ZERO(&cpuset);
+        CPU_SET((firstCpu * scale) % std::thread::hardware_concurrency(), &cpuset);
+        int rc = pthread_setaffinity_np(t.native_handle(),
+                                        sizeof(cpu_set_t), &cpuset);
+        success &= (rc == 0);
+        ++firstCpu;
+    }
+    return success;
+}
+#else
+inline bool
+setCpuAffinity(ThreadPool & /*me*/, size_t /*firstCpu = 0*/, size_t const /*scale = 0*/)
+{
+    return false;
+}
+#endif  // defined(__linux__)
+
+}  // namespace seqan
+
+#endif  // INCLUDE_SEQAN_PARALLEL_PARALLEL_THREAD_POOL_H_
diff --git a/include/seqan/parse_lm.h b/include/seqan/parse_lm.h
index f87799c..9e64b0c 100644
--- a/include/seqan/parse_lm.h
+++ b/include/seqan/parse_lm.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                                  parse_lm
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/parse_lm/local_match_store.h b/include/seqan/parse_lm/local_match_store.h
index d5b1387..cc9fb49 100644
--- a/include/seqan/parse_lm/local_match_store.h
+++ b/include/seqan/parse_lm/local_match_store.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -103,13 +103,13 @@ public:
     TPosition queryEndPos;
 
     LocalMatch() :
-            id(MaxValue<TId>::VALUE),
-            subjectId(MaxValue<TId>::VALUE),
-            subjectBeginPos(MaxValue<TPosition>::VALUE),
-            subjectEndPos(MaxValue<TPosition>::VALUE),
-            queryId(MaxValue<TId>::VALUE),
-            queryBeginPos(MaxValue<TPosition>::VALUE),
-            queryEndPos(MaxValue<TPosition>::VALUE)
+            id(std::numeric_limits<TId>::max()),
+            subjectId(std::numeric_limits<TId>::max()),
+            subjectBeginPos(std::numeric_limits<TPosition>::max()),
+            subjectEndPos(std::numeric_limits<TPosition>::max()),
+            queryId(std::numeric_limits<TId>::max()),
+            queryBeginPos(std::numeric_limits<TPosition>::max()),
+            queryEndPos(std::numeric_limits<TPosition>::max())
     {}
 
     LocalMatch(TId id_,
@@ -358,16 +358,16 @@ appendLocalMatch(TLocalMatchStore & store,
 
     // Get id for subject and query sequences;  Insert sequences into name stores/caches if not already there.
     TId subjectId = 0;
-    if (!getIdByName(store.sequenceNameStore, subjectName, subjectId, store._sequenceNameStoreCache))
+    if (!getIdByName(subjectId, store.sequenceNameStore, subjectName))
     {
         subjectId = length(store.sequenceNameStore);
-        appendName(store.sequenceNameStore, subjectName, store._sequenceNameStoreCache);
+        appendName(store._sequenceNameStoreCache, subjectName);
     }
     TId queryId = 0;
-    if (!getIdByName(store.sequenceNameStore, queryName, queryId, store._sequenceNameStoreCache))
+    if (!getIdByName(queryId, store.sequenceNameStore, queryName))
     {
         queryId = length(store.sequenceNameStore);
-        appendName(store.sequenceNameStore, queryName, store._sequenceNameStoreCache);
+        appendName(store._sequenceNameStoreCache, queryName);
     }
 
     appendLocalMatch(store, subjectId, subjectBeginPos, subjectEndPos, queryId, queryBeginPos, queryEndPos);
diff --git a/include/seqan/parse_lm/parse_blastn_tabular.h b/include/seqan/parse_lm/parse_blastn_tabular.h
index 14279e4..9046142 100644
--- a/include/seqan/parse_lm/parse_blastn_tabular.h
+++ b/include/seqan/parse_lm/parse_blastn_tabular.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                                  parse_lm
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/parse_lm/parse_lastz_general.h b/include/seqan/parse_lm/parse_lastz_general.h
index 5c48a9f..11651f9 100644
--- a/include/seqan/parse_lm/parse_lastz_general.h
+++ b/include/seqan/parse_lm/parse_lastz_general.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                                  parse_lm
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/parse_lm/parse_stellar_gff.h b/include/seqan/parse_lm/parse_stellar_gff.h
index 63dfc9a..b85357d 100644
--- a/include/seqan/parse_lm/parse_stellar_gff.h
+++ b/include/seqan/parse_lm/parse_stellar_gff.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                                  parse_lm
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/pipe.h b/include/seqan/pipe.h
index 12fb3bf..b7ea235 100644
--- a/include/seqan/pipe.h
+++ b/include/seqan/pipe.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/pipe/pipe_base.h b/include/seqan/pipe/pipe_base.h
index 93fe6f5..0ab5279 100644
--- a/include/seqan/pipe/pipe_base.h
+++ b/include/seqan/pipe/pipe_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/pipe/pipe_caster.h b/include/seqan/pipe/pipe_caster.h
index 7617ba7..7b51d4d 100644
--- a/include/seqan/pipe/pipe_caster.h
+++ b/include/seqan/pipe/pipe_caster.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/pipe/pipe_counter.h b/include/seqan/pipe/pipe_counter.h
index 7d4e7d3..8231a34 100644
--- a/include/seqan/pipe/pipe_counter.h
+++ b/include/seqan/pipe/pipe_counter.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/pipe/pipe_echoer.h b/include/seqan/pipe/pipe_echoer.h
index b6812d2..8fe7e83 100644
--- a/include/seqan/pipe/pipe_echoer.h
+++ b/include/seqan/pipe/pipe_echoer.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/pipe/pipe_edit_environment.h b/include/seqan/pipe/pipe_edit_environment.h
index f5bd2e1..0ebc71d 100644
--- a/include/seqan/pipe/pipe_edit_environment.h
+++ b/include/seqan/pipe/pipe_edit_environment.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/pipe/pipe_filter.h b/include/seqan/pipe/pipe_filter.h
index ed22efe..0a00a3a 100644
--- a/include/seqan/pipe/pipe_filter.h
+++ b/include/seqan/pipe/pipe_filter.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/pipe/pipe_iterator.h b/include/seqan/pipe/pipe_iterator.h
index 782118d..22c42b6 100644
--- a/include/seqan/pipe/pipe_iterator.h
+++ b/include/seqan/pipe/pipe_iterator.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/pipe/pipe_joiner.h b/include/seqan/pipe/pipe_joiner.h
index d4544d0..1b9566b 100644
--- a/include/seqan/pipe/pipe_joiner.h
+++ b/include/seqan/pipe/pipe_joiner.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/pipe/pipe_namer.h b/include/seqan/pipe/pipe_namer.h
index 8639a5e..6fca685 100644
--- a/include/seqan/pipe/pipe_namer.h
+++ b/include/seqan/pipe/pipe_namer.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/pipe/pipe_sampler.h b/include/seqan/pipe/pipe_sampler.h
index 0fefa27..455885b 100644
--- a/include/seqan/pipe/pipe_sampler.h
+++ b/include/seqan/pipe/pipe_sampler.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -618,7 +618,7 @@ namespace seqan
         TLimitsString const &limits = me.limits;
         int64_t seqCountPlusOne = length(me.limits);
 
-        SEQAN_OMP_PRAGMA(parallel for reduction(+:sum))
+        SEQAN_OMP_PRAGMA(parallel for reduction(+:sum) if (seqCountPlusOne > 99))
         for (int64_t i = 1; i < seqCountPlusOne; ++i)
         {
             TSize prev = limits[i - 1];
diff --git a/include/seqan/pipe/pipe_shifter.h b/include/seqan/pipe/pipe_shifter.h
index c4b72f8..119bd7d 100644
--- a/include/seqan/pipe/pipe_shifter.h
+++ b/include/seqan/pipe/pipe_shifter.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/pipe/pipe_source.h b/include/seqan/pipe/pipe_source.h
index f2a99f6..5e50cd6 100644
--- a/include/seqan/pipe/pipe_source.h
+++ b/include/seqan/pipe/pipe_source.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -74,7 +74,7 @@ namespace seqan
             in(_cont), cur(), val() {}
 
         inline typename Value<TInput>::Type const & operator*()
-        { return val = getValue(cur); }
+        { return val = *cur; }
 
         inline Pipe& operator++()
         {
diff --git a/include/seqan/pipe/pipe_tupler.h b/include/seqan/pipe/pipe_tupler.h
index 13994dd..6ebc278 100644
--- a/include/seqan/pipe/pipe_tupler.h
+++ b/include/seqan/pipe/pipe_tupler.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/pipe/pool_base.h b/include/seqan/pipe/pool_base.h
index d8d1adf..e58b811 100644
--- a/include/seqan/pipe/pool_base.h
+++ b/include/seqan/pipe/pool_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -832,11 +832,13 @@ namespace seqan
         //////////////////////////////////////////////////////////////////////////////
         // auto-disposal interface (deprecated)
 
+        [[deprecated]]
         inline void addListener() {
             if (!listeners) return;
             ++listeners;
         }
 
+        [[deprecated]]
         inline void delListener() {
             if (!listeners) return;
             if (--listeners == 0) {
@@ -918,7 +920,7 @@ namespace seqan
             if (reader) reader->end();
             delete reader;
             reader = NULL;
-            delListener();
+            // delListener(); (deprecated)
             return true;
         }
 
@@ -969,7 +971,7 @@ namespace seqan
             writeBackBuffers = _conf.writeBackBuffers;
             writeBackBuckets = _conf.writeBackBuffers;
             _partiallyFilled = true;
-            listeners = 0;
+            listeners = 0; // (deprecated)
             reader = NULL;
             writer = NULL;
             _ownFile = true;
@@ -1064,8 +1066,8 @@ namespace seqan
         return me.clear();
     }
 
-    // deprecated
     template < typename TValue, typename TSpec >
+    [[deprecated]]
     inline typename Size< Pool<TValue, TSpec> >::Type
     size(Pool<TValue, TSpec> const &me)
     {
diff --git a/include/seqan/pipe/pool_mapper.h b/include/seqan/pipe/pool_mapper.h
index 41c499f..130d381 100644
--- a/include/seqan/pipe/pool_mapper.h
+++ b/include/seqan/pipe/pool_mapper.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/pipe/pool_sorter.h b/include/seqan/pipe/pool_sorter.h
index fe316d4..cad5711 100644
--- a/include/seqan/pipe/pool_sorter.h
+++ b/include/seqan/pipe/pool_sorter.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/platform.h b/include/seqan/platform.h
index 0e94bf6..e72a137 100644
--- a/include/seqan/platform.h
+++ b/include/seqan/platform.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // Copyright (c) 2013 NVIDIA Corporation
 // All rights reserved.
 //
@@ -85,8 +85,8 @@
  */
 #if defined(__ICC)
 #define COMPILER_LINTEL
-#if __ICC < 1600
-     #warning ICC versions older than 16 are not supported.
+#if __ICC < 1700
+     #warning ICC versions older than 17.0 are not supported.
 #endif
 #endif
 
@@ -98,8 +98,8 @@
  */
 #if defined(__ICL)
 #define COMPILER_WINTEL
-#if __ICL < 1600
-     #warning Intel compiler (windows) versions older than 16 are not supported.
+#if __ICL < 1700
+     #warning Intel compiler (windows) versions older than 17.0 are not supported.
 #endif
 #endif
 
@@ -276,15 +276,23 @@
  * @signature typdef (...) __uint8;
  */
 
+[[deprecated("Use uint64_t instead.")]]
 typedef uint64_t __uint64; // nolint
+[[deprecated("Use uint32_t instead.")]]
 typedef uint32_t __uint32; // nolint
+[[deprecated("Use uint16_t instead.")]]
 typedef uint16_t __uint16; // nolint
+[[deprecated("Use uint8_t instead.")]]
 typedef uint8_t __uint8;   // nolint
 
 #if !(defined(COMPILER_LINTEL) || defined(STDLIB_VS))
+[[deprecated("Use int64_t instead.")]]
 typedef int64_t __int64;   // nolint
+[[deprecated("Use int32_t instead.")]]
 typedef int32_t __int32;   // nolint
+[[deprecated("Use int16_t instead.")]]
 typedef int16_t __int16;   // nolint
+[[deprecated("Use int8_t instead.")]]
 typedef int8_t __int8;     // nolint
 #endif
 
@@ -322,7 +330,9 @@ typedef int8_t __int8;     // nolint
 
 // The symbols SEQAN_IS_64_BIT and SEQAN_IS_32_BIT can be used to check
 // whether we are on a 32 bit or on a 64 bit machine.
-#if defined(__amd64__) || defined(__x86_64__) || defined(__aarch64__) || defined(__ia64__) || defined(__ppc64__) || defined(_WIN64)
+#if defined(__amd64__) || defined(__x86_64__) || defined(__aarch64__) || defined(__arch64__) || \
+    defined(__ia64__) || defined(__ppc64__) || defined(__PPC64__) || defined(_WIN64) || \
+    defined(__LP64__) || defined(_LP64)
 #define SEQAN_IS_64_BIT 1
 #define SEQAN_IS_32_BIT 0
 #else
@@ -389,12 +399,17 @@ typedef int8_t __int8;     // nolint
 #define SEQAN_UNLIKELY(x)    (x)
 #endif
 
-// A macro to eliminate warnings on GCC and Clang
+// A macro to eliminate warnings for unused entities.
+#if __cplusplus >= 201703L
+#define SEQAN_UNUSED [[maybe_unused]]
+#else
 #if defined(COMPILER_GCC) || defined(COMPILER_CLANG) || defined(COMPILER_LINTEL)
-#define SEQAN_UNUSED __attribute__((unused))
+#define SEQAN_UNUSED [[gnu::unused]]
 #else
 #define SEQAN_UNUSED
-#endif
+#endif // defined(COMPILER_GCC) || defined(COMPILER_CLANG) || defined(COMPILER_LINTEL)
+#endif // __cplusplus >= 201703L
+
 // backwards compatibility
 #define SEQAN_UNUSED_TYPEDEF SEQAN_UNUSED
 
@@ -462,4 +477,85 @@ typedef int8_t __int8;     // nolint
 #undef COMPILER_VERSION
 #endif
 
+// BYTE-ORDER DETECTION (default is little-endian)
+#ifdef __GLIBC__
+    #include <endian.h>
+#endif // __GLIBC__
+
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+    #include <sys/endian.h>
+#endif // defined *BSD
+
+#ifndef SEQAN_BIG_ENDIAN
+    #if (defined( _BYTE_ORDER  ) && ( _BYTE_ORDER   ==        _BIG_ENDIAN  )) || \
+        (defined(__BYTE_ORDER  ) && (__BYTE_ORDER   ==       __BIG_ENDIAN  )) || \
+        (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)) || \
+                                                     defined(__BIG_ENDIAN__)
+        #define SEQAN_BIG_ENDIAN 1
+    #else
+        #define SEQAN_BIG_ENDIAN 0
+    #endif
+#endif // SEQAN_BIG_ENDIAN
+
+namespace seqan
+{
+
+template <typename T>
+constexpr void enforceLittleEndian(T &)
+{}
+
+#if SEQAN_BIG_ENDIAN
+inline void enforceLittleEndian(int16_t & in)
+{
+    in = htole16(in);
+}
+inline void enforceLittleEndian(uint16_t & in)
+{
+    in = htole16(in);
+}
+inline void enforceLittleEndian(int32_t & in)
+{
+    in = htole32(in);
+}
+inline void enforceLittleEndian(uint32_t & in)
+{
+    in = htole32(in);
+}
+inline void enforceLittleEndian(int64_t & in)
+{
+    in = htole64(in);
+}
+inline void enforceLittleEndian(uint64_t & in)
+{
+    in = htole64(in);
+}
+inline void enforceLittleEndian(float & in)
+{
+    uint32_t tmp = htole32(*reinterpret_cast<uint32_t*>(&in));
+    char *out = reinterpret_cast<char*>(&in);
+    *out = *reinterpret_cast<char*>(&tmp);
+}
+inline void enforceLittleEndian(double & in)
+{
+    uint64_t tmp = htole64(*reinterpret_cast<uint64_t*>(&in));
+    char *out = reinterpret_cast<char*>(&in);
+    *out = *reinterpret_cast<char*>(&tmp);
+}
+#endif // SEQAN_BIG_ENDIAN
+
+} // namespace seqan
+
+// DEFAULT PAGESIZE FOR MMAP
+#ifndef SEQAN_DEFAULT_PAGESIZE
+    // 64K is supported on all platforms (whereas 4K is not)
+    #define SEQAN_DEFAULT_PAGESIZE 64 * 1024
 #endif
+
+// IF_CONSTEXPR
+#if __cplusplus >= 201703L
+#define SEQAN_IF_CONSTEXPR if constexpr
+#else
+#define SEQAN_IF_CONSTEXPR if
+#endif
+
+#endif // HEADER GUARD
diff --git a/include/seqan/random.h b/include/seqan/random.h
index 1c08bad..a0b3ab1 100644
--- a/include/seqan/random.h
+++ b/include/seqan/random.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/random/random_base.h b/include/seqan/random/random_base.h
index 18c4e9e..200271a 100644
--- a/include/seqan/random/random_base.h
+++ b/include/seqan/random/random_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/random/random_beta.h b/include/seqan/random/random_beta.h
index c57a38b..1a02f6b 100644
--- a/include/seqan/random/random_beta.h
+++ b/include/seqan/random/random_beta.h
@@ -2,7 +2,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/random/random_util.h b/include/seqan/random/random_util.h
index 3888588..9c47d6e 100644
--- a/include/seqan/random/random_util.h
+++ b/include/seqan/random/random_util.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/realign.h b/include/seqan/realign.h
index 2cb9c0c..f8714d5 100644
--- a/include/seqan/realign.h
+++ b/include/seqan/realign.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/realign/realign_base.h b/include/seqan/realign/realign_base.h
index 6f43e03..37176cf 100644
--- a/include/seqan/realign/realign_base.h
+++ b/include/seqan/realign/realign_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -111,8 +111,8 @@ struct ContigAlignmentsInfo_
     // Reset everything.
     void reset()
     {
-        minPos = maxValue<TReadPos>();
-        maxPos = minValue<TReadPos>();
+        minPos = std::numeric_limits<TReadPos>::max();
+        maxPos = std::numeric_limits<TReadPos>::min();
         alignedItBegin = TAlignedReadIter();
         alignedItEnd = TAlignedReadIter();
     }
@@ -673,9 +673,9 @@ void AnsonMyersRealigner_<TFragmentStore>::run(unsigned contigID, unsigned windo
     _checkReadAlignments();
 
     // Perform realignment round until the score does not decrease any more.
-    int score = maxValue<int>();
-    int oldScore = maxValue<int>();
-    for (unsigned roundNo = 0; score == maxValue<int>() || score < oldScore; ++roundNo)
+    int score = std::numeric_limits<int>::max();
+    int oldScore = std::numeric_limits<int>::max();
+    for (unsigned roundNo = 0; score == std::numeric_limits<int>::max() || score < oldScore; ++roundNo)
     {
         if (options.debug)
             std::cerr << "Realignment round " << roundNo << "\n";
diff --git a/include/seqan/realign/realign_helper_functions.h b/include/seqan/realign/realign_helper_functions.h
index 4df8fee..b4b37ae 100644
--- a/include/seqan/realign/realign_helper_functions.h
+++ b/include/seqan/realign/realign_helper_functions.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/reduced_aminoacid.h b/include/seqan/reduced_aminoacid.h
index 782b078..5b55319 100644
--- a/include/seqan/reduced_aminoacid.h
+++ b/include/seqan/reduced_aminoacid.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -42,9 +42,24 @@
 
 #include <seqan/reduced_aminoacid/reduced_aminoacid_base.h>
 
+#include <seqan/reduced_aminoacid/reduced_aminoacid_buchfink11_base.h>
+#include <seqan/reduced_aminoacid/reduced_aminoacid_buchfink11_tables.h>
+
+#include <seqan/reduced_aminoacid/reduced_aminoacid_cannata10_base.h>
+#include <seqan/reduced_aminoacid/reduced_aminoacid_cannata10_tables.h>
+
+#include <seqan/reduced_aminoacid/reduced_aminoacid_li10_base.h>
+#include <seqan/reduced_aminoacid/reduced_aminoacid_li10_tables.h>
+
+#include <seqan/reduced_aminoacid/reduced_aminoacid_murphy5_base.h>
+#include <seqan/reduced_aminoacid/reduced_aminoacid_murphy5_tables.h>
+
 #include <seqan/reduced_aminoacid/reduced_aminoacid_murphy10_base.h>
 #include <seqan/reduced_aminoacid/reduced_aminoacid_murphy10_tables.h>
 
+#include <seqan/reduced_aminoacid/reduced_aminoacid_solis10_base.h>
+#include <seqan/reduced_aminoacid/reduced_aminoacid_solis10_tables.h>
+
 // #include <seqan/reduced_aminoacid/reduced_aminoacid_cluster_red_base.h>
 // #include <seqan/reduced_aminoacid/reduced_aminoacid_cluster_red_tables_20_to_n_b62.h>
 // #include <seqan/reduced_aminoacid/reduced_aminoacid_cluster_red_tables_22_to_n_b62.h>
diff --git a/include/seqan/reduced_aminoacid/reduced_aminoacid_base.h b/include/seqan/reduced_aminoacid/reduced_aminoacid_base.h
index 9f873c9..d029a92 100644
--- a/include/seqan/reduced_aminoacid/reduced_aminoacid_base.h
+++ b/include/seqan/reduced_aminoacid/reduced_aminoacid_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/reduced_aminoacid/reduced_aminoacid_base_late.h b/include/seqan/reduced_aminoacid/reduced_aminoacid_base_late.h
index 220e069..57d4110 100644
--- a/include/seqan/reduced_aminoacid/reduced_aminoacid_base_late.h
+++ b/include/seqan/reduced_aminoacid/reduced_aminoacid_base_late.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/reduced_aminoacid/reduced_aminoacid_murphy10_base.h b/include/seqan/reduced_aminoacid/reduced_aminoacid_buchfink11_base.h
similarity index 80%
copy from include/seqan/reduced_aminoacid/reduced_aminoacid_murphy10_base.h
copy to include/seqan/reduced_aminoacid/reduced_aminoacid_buchfink11_base.h
index 43a4b62..25b054e 100644
--- a/include/seqan/reduced_aminoacid/reduced_aminoacid_murphy10_base.h
+++ b/include/seqan/reduced_aminoacid/reduced_aminoacid_buchfink11_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -29,13 +29,13 @@
 // DAMAGE.
 //
 // ==========================================================================
-// Author: Hannes Hauswedell <hannes.hauswedell at fu-berlin.de>
+// Author: Kristin Knorr <kristin.knorr at fu-berlin.de>
 // ==========================================================================
-// Murphy10 reduction of AminoAcid alphabet
+// Buchfink11 reduction of AminoAcid alphabet
 // ==========================================================================
 
-#ifndef SEQAN_REDUCED_AMINOACID_MURPHY10_BASE_H_
-#define SEQAN_REDUCED_AMINOACID_MURPHY10_BASE_H_
+#ifndef SEQAN_REDUCED_AMINOACID_BUCHFINK11_BASE_H_
+#define SEQAN_REDUCED_AMINOACID_BUCHFINK11_BASE_H_
 
 namespace seqan {
 
@@ -48,41 +48,42 @@ namespace seqan {
 // ============================================================================
 
 // -----------------------------------------------------------------------
-// Tag Murphy10
+// Tag Buchfink11
 // -----------------------------------------------------------------------
 
 /*!
- * @tag Murphy10
+ * @tag Buchfink11
  * @brief Specialization for @link ReducedAminoAcid @endlink#
  * @headerfile seqan/reduced_aminoacid.h
  *
- * @signature typedef Murphy10 Tag<Murphy10_>;
+ * @signature typedef Buchfink11 Tag<Buchfink11_>;
  *
- * This is the 10-character reduction defined by Murphy et al,
- * 2000, <a href="http://www.ncbi.nlm.nih.gov/pubmed/10775656">http://www.ncbi.nlm.nih.gov/pubmed/10775656</a>
+ * This is the 11-character reduction defined by Buchfink et al,
+ * 2014, <a href="https://www.ncbi.nlm.nih.gov/pubmed/25402007">https://www.ncbi.nlm.nih.gov/pubmed/25402007</a>
  *
- * This alphabet is used by many tools, e.g. Rapsearch2, Lambda, UBlast.
+ * This alphabet is used by tool Diamond.
  *
  * Since it was created from the 20-letter alphabet the clusters in SeqAn are
  * not identical (they contain more symbols). This is the clustering:
  * @code{.txt}
- *   'A', // A O U X
- *   'B', // B D E N Q Z
- *   'C', // C
- *   'F', // F W Y *
+ *   'A', // A S T X
+ *   'B', // B D E K N O Q R Z
+ *   'C', // C U
+ *   'F', // F *
  *   'G', // G
  *   'H', // H
- *   'I', // I J L M V
- *   'K', // K R
+ *   'I', // I J L V
+ *   'M', // M
  *   'P', // P
- *   'S'  // S T
+ *   'W', // W
+ *   'Y'  // Y
  * @endcode
  *
  */
 
-struct Murphy10_ {};
+struct Buchfink11_ {};
 
-typedef Tag<Murphy10_> Murphy10;
+typedef Tag<Buchfink11_> Buchfink11;
 
 // ============================================================================
 // Metafunctions
@@ -93,10 +94,10 @@ typedef Tag<Murphy10_> Murphy10;
 // -----------------------------------------------------------------------
 
 template <>
-struct ValueSize<SimpleType<unsigned char, ReducedAminoAcid_<Murphy10> > >
+struct ValueSize<SimpleType<unsigned char, ReducedAminoAcid_<Buchfink11> > >
 {
     typedef uint8_t Type;
-    static const Type VALUE = 10;
+    static const Type VALUE = 11;
 };
 
 // -----------------------------------------------------------------------
@@ -104,7 +105,7 @@ struct ValueSize<SimpleType<unsigned char, ReducedAminoAcid_<Murphy10> > >
 // -----------------------------------------------------------------------
 
 template <>
-struct BitsPerValue<SimpleType<unsigned char, ReducedAminoAcid_<Murphy10> > >
+struct BitsPerValue<SimpleType<unsigned char, ReducedAminoAcid_<Buchfink11> > >
 {
     typedef uint8_t Type;
     static const Type VALUE = 4;
@@ -119,4 +120,4 @@ struct BitsPerValue<SimpleType<unsigned char, ReducedAminoAcid_<Murphy10> > >
 // ============================================================================
 
 }
-#endif // def SEQAN_REDUCED_AMINOACID_MURPHY10_BASE_H_
+#endif // def SEQAN_REDUCED_AMINOACID_BUCHFINK11_BASE_H_
diff --git a/include/seqan/reduced_aminoacid/reduced_aminoacid_murphy10_tables.h b/include/seqan/reduced_aminoacid/reduced_aminoacid_buchfink11_tables.h
similarity index 78%
copy from include/seqan/reduced_aminoacid/reduced_aminoacid_murphy10_tables.h
copy to include/seqan/reduced_aminoacid/reduced_aminoacid_buchfink11_tables.h
index 57c8470..7f27b84 100644
--- a/include/seqan/reduced_aminoacid/reduced_aminoacid_murphy10_tables.h
+++ b/include/seqan/reduced_aminoacid/reduced_aminoacid_buchfink11_tables.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -29,13 +29,13 @@
 // DAMAGE.
 //
 // ==========================================================================
-// Author: Hannes Hauswedell <hannes.hauswedell at fu-berlin.de>
+// Author: Kristin Knorr <kristin.knorr at fu-berlin.de>
 // ==========================================================================
-// Murphy10 reduction tables
+// Buchfink11 reduction tables
 // ==========================================================================
 
-#ifndef SEQAN_REDUCED_AMINOACID_MURPHY10_TABLES_H_
-#define SEQAN_REDUCED_AMINOACID_MURPHY10_TABLES_H_
+#ifndef SEQAN_REDUCED_AMINOACID_BUCHFINK11_TABLES_H_
+#define SEQAN_REDUCED_AMINOACID_BUCHFINK11_TABLES_H_
 
 namespace seqan {
 
@@ -52,58 +52,59 @@ namespace seqan {
 // ============================================================================
 
 template <typename TSpec>
-struct TranslateTableRedAAToChar_<Murphy10, TSpec>
+struct TranslateTableRedAAToChar_<Buchfink11, TSpec>
 {
-    static const char VALUE[ValueSize<SimpleType<unsigned char, ReducedAminoAcid_<Murphy10> > >::VALUE];
+    static const char VALUE[ValueSize<SimpleType<unsigned char, ReducedAminoAcid_<Buchfink11> > >::VALUE];
 };
 
 template <typename TSpec>
-struct TranslateTableCharToRedAA_<Murphy10, TSpec>
+struct TranslateTableCharToRedAA_<Buchfink11, TSpec>
 {
     static const char VALUE[256];
 };
 
 template <typename TSpec>
-struct TranslateTableAAToRedAA_<Murphy10, TSpec>
+struct TranslateTableAAToRedAA_<Buchfink11, TSpec>
 {
     static const char VALUE[27];
 };
 
 template <typename TSpec>
-struct TranslateTableByteToRedAA_<Murphy10, TSpec>
+struct TranslateTableByteToRedAA_<Buchfink11, TSpec>
 {
     static const char VALUE[256];
 };
 
-// ---------------------------------- N = 10 ------------------------------
+// ---------------------------------- N = 11 ------------------------------
 
 template <typename TVoidSpec>
-char const TranslateTableRedAAToChar_<Murphy10, TVoidSpec>::VALUE[10] =
+char const TranslateTableRedAAToChar_<Buchfink11, TVoidSpec>::VALUE[11] =
 {
-    'A', // A O U X
-    'B', // B D E N Q Z
-    'C', // C
-    'F', // F W Y *
+    'A', // A S T X
+    'B', // B D E K N O Q R Z
+    'C', // C U
+    'F', // F *
     'G', // G
     'H', // H
-    'I', // I J L M V
-    'K', // K R
+    'I', // I J L V
+    'M', // M
     'P', // P
-    'S'  // S T
+    'W', // W
+    'Y'  // Y
 };
 
 template <typename TVoidSpec>
-char const TranslateTableCharToRedAA_<Murphy10, TVoidSpec>::VALUE[256] =
+char const TranslateTableCharToRedAA_<Buchfink11, TVoidSpec>::VALUE[256] =
 {
      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  3,  0,  0,
      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
      0,  0,  0,  0,  0,  0,  1,  2,  1,  1,  3,  4,  5,  6,  6,
-     7,  6,  6,  1,  0,  8,  1,  7,  9,  9,  0,  6,  3,  0,  3,
+     1,  6,  7,  1,  1,  8,  1,  1,  0,  0,  2,  6,  9,  0, 10,
      1,  0,  0,  0,  0,  0,  0,  0,  1,  2,  1,  1,  3,  4,  5,
-     6,  6,  7,  6,  6,  1,  0,  8,  1,  7,  9,  9,  0,  6,  3,
-     0,  3,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+     6,  6,  1,  6,  7,  1,  1,  8,  1,  1,  0,  0,  2,  6,  9,
+     0, 10,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
@@ -116,16 +117,16 @@ char const TranslateTableCharToRedAA_<Murphy10, TVoidSpec>::VALUE[256] =
 };
 
 template <typename TVoidSpec>
-char const TranslateTableAAToRedAA_<Murphy10, TVoidSpec>::VALUE[27] =
+char const TranslateTableAAToRedAA_<Buchfink11, TVoidSpec>::VALUE[27] =
 {
-     0,  1,  2,  1,  1,  3,  4,  5,  6,  6,  7,  6,  6,
-     1,  0,  8,  1,  7,  9,  9,  0,  6,  3,  3,  1,  0,  3
+     0,  1,  2,  1,  1,  3,  4,  5,  6,  6,  1,  6,  7,
+     1,  1,  8,  1,  1,  0,  0,  2,  6,  9,  10, 1,  0,  3
 };
 
 template <typename TVoidSpec>
-char const TranslateTableByteToRedAA_<Murphy10, TVoidSpec>::VALUE[256] =
+char const TranslateTableByteToRedAA_<Buchfink11, TVoidSpec>::VALUE[256] =
 {
-     0,  1,  2,  3,  4,  5,  6,  7,  8,  9,  0,  0,  0,  0,  0,
+     0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10,  0,  0,  0,  0,
      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
@@ -151,4 +152,4 @@ char const TranslateTableByteToRedAA_<Murphy10, TVoidSpec>::VALUE[256] =
 
 } // namespace
 
-#endif // SEQAN_REDUCED_AMINOACID_MURPHY10_TABLES_H_
+#endif // SEQAN_REDUCED_AMINOACID_BUCHFINK11_TABLES_H_
diff --git a/include/seqan/reduced_aminoacid/reduced_aminoacid_murphy10_base.h b/include/seqan/reduced_aminoacid/reduced_aminoacid_cannata10_base.h
similarity index 81%
copy from include/seqan/reduced_aminoacid/reduced_aminoacid_murphy10_base.h
copy to include/seqan/reduced_aminoacid/reduced_aminoacid_cannata10_base.h
index 43a4b62..5b4ad05 100644
--- a/include/seqan/reduced_aminoacid/reduced_aminoacid_murphy10_base.h
+++ b/include/seqan/reduced_aminoacid/reduced_aminoacid_cannata10_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -29,13 +29,13 @@
 // DAMAGE.
 //
 // ==========================================================================
-// Author: Hannes Hauswedell <hannes.hauswedell at fu-berlin.de>
+// Author: Kristin Knorr <kristin.knorr at fu-berlin.de>
 // ==========================================================================
-// Murphy10 reduction of AminoAcid alphabet
+// Cannata10 reduction of AminoAcid alphabet
 // ==========================================================================
 
-#ifndef SEQAN_REDUCED_AMINOACID_MURPHY10_BASE_H_
-#define SEQAN_REDUCED_AMINOACID_MURPHY10_BASE_H_
+#ifndef SEQAN_REDUCED_AMINOACID_CANNATA10_BASE_H_
+#define SEQAN_REDUCED_AMINOACID_CANNATA10_BASE_H_
 
 namespace seqan {
 
@@ -48,41 +48,39 @@ namespace seqan {
 // ============================================================================
 
 // -----------------------------------------------------------------------
-// Tag Murphy10
+// Tag Cannata10
 // -----------------------------------------------------------------------
 
 /*!
- * @tag Murphy10
+ * @tag Cannata10
  * @brief Specialization for @link ReducedAminoAcid @endlink#
  * @headerfile seqan/reduced_aminoacid.h
  *
- * @signature typedef Murphy10 Tag<Murphy10_>;
+ * @signature typedef Cannata10 Tag<Cannata10_>;
  *
- * This is the 10-character reduction defined by Murphy et al,
- * 2000, <a href="http://www.ncbi.nlm.nih.gov/pubmed/10775656">http://www.ncbi.nlm.nih.gov/pubmed/10775656</a>
- *
- * This alphabet is used by many tools, e.g. Rapsearch2, Lambda, UBlast.
+ * This is the 10-character reduction defined by Cannata et al,
+ * 2002, <a href="https://www.ncbi.nlm.nih.gov/pubmed/12176833">https://www.ncbi.nlm.nih.gov/pubmed/12176833</a>
  *
  * Since it was created from the 20-letter alphabet the clusters in SeqAn are
  * not identical (they contain more symbols). This is the clustering:
  * @code{.txt}
- *   'A', // A O U X
- *   'B', // B D E N Q Z
- *   'C', // C
- *   'F', // F W Y *
- *   'G', // G
+ *   'A', // A G S T X
+ *   'B', // B D N
+ *   'C', // C U
+ *   'E', // E Q Z
+ *   'F', // F Y *
  *   'H', // H
  *   'I', // I J L M V
- *   'K', // K R
+ *   'K', // K O R
  *   'P', // P
- *   'S'  // S T
+ *   'W'  // W
  * @endcode
  *
  */
 
-struct Murphy10_ {};
+struct Cannata10_ {};
 
-typedef Tag<Murphy10_> Murphy10;
+typedef Tag<Cannata10_> Cannata10;
 
 // ============================================================================
 // Metafunctions
@@ -93,7 +91,7 @@ typedef Tag<Murphy10_> Murphy10;
 // -----------------------------------------------------------------------
 
 template <>
-struct ValueSize<SimpleType<unsigned char, ReducedAminoAcid_<Murphy10> > >
+struct ValueSize<SimpleType<unsigned char, ReducedAminoAcid_<Cannata10> > >
 {
     typedef uint8_t Type;
     static const Type VALUE = 10;
@@ -104,7 +102,7 @@ struct ValueSize<SimpleType<unsigned char, ReducedAminoAcid_<Murphy10> > >
 // -----------------------------------------------------------------------
 
 template <>
-struct BitsPerValue<SimpleType<unsigned char, ReducedAminoAcid_<Murphy10> > >
+struct BitsPerValue<SimpleType<unsigned char, ReducedAminoAcid_<Cannata10> > >
 {
     typedef uint8_t Type;
     static const Type VALUE = 4;
@@ -119,4 +117,4 @@ struct BitsPerValue<SimpleType<unsigned char, ReducedAminoAcid_<Murphy10> > >
 // ============================================================================
 
 }
-#endif // def SEQAN_REDUCED_AMINOACID_MURPHY10_BASE_H_
+#endif // def SEQAN_REDUCED_AMINOACID_CANNATA10_BASE_H_
diff --git a/include/seqan/reduced_aminoacid/reduced_aminoacid_murphy10_tables.h b/include/seqan/reduced_aminoacid/reduced_aminoacid_cannata10_tables.h
similarity index 77%
copy from include/seqan/reduced_aminoacid/reduced_aminoacid_murphy10_tables.h
copy to include/seqan/reduced_aminoacid/reduced_aminoacid_cannata10_tables.h
index 57c8470..12fbaca 100644
--- a/include/seqan/reduced_aminoacid/reduced_aminoacid_murphy10_tables.h
+++ b/include/seqan/reduced_aminoacid/reduced_aminoacid_cannata10_tables.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -29,13 +29,13 @@
 // DAMAGE.
 //
 // ==========================================================================
-// Author: Hannes Hauswedell <hannes.hauswedell at fu-berlin.de>
+// Author: Kristin Knorr <kristin.knorr at fu-berlin.de>
 // ==========================================================================
-// Murphy10 reduction tables
+// Cannata10 reduction tables
 // ==========================================================================
 
-#ifndef SEQAN_REDUCED_AMINOACID_MURPHY10_TABLES_H_
-#define SEQAN_REDUCED_AMINOACID_MURPHY10_TABLES_H_
+#ifndef SEQAN_REDUCED_AMINOACID_CANNATA10_TABLES_H_
+#define SEQAN_REDUCED_AMINOACID_CANNATA10_TABLES_H_
 
 namespace seqan {
 
@@ -52,25 +52,25 @@ namespace seqan {
 // ============================================================================
 
 template <typename TSpec>
-struct TranslateTableRedAAToChar_<Murphy10, TSpec>
+struct TranslateTableRedAAToChar_<Cannata10, TSpec>
 {
-    static const char VALUE[ValueSize<SimpleType<unsigned char, ReducedAminoAcid_<Murphy10> > >::VALUE];
+    static const char VALUE[ValueSize<SimpleType<unsigned char, ReducedAminoAcid_<Cannata10> > >::VALUE];
 };
 
 template <typename TSpec>
-struct TranslateTableCharToRedAA_<Murphy10, TSpec>
+struct TranslateTableCharToRedAA_<Cannata10, TSpec>
 {
     static const char VALUE[256];
 };
 
 template <typename TSpec>
-struct TranslateTableAAToRedAA_<Murphy10, TSpec>
+struct TranslateTableAAToRedAA_<Cannata10, TSpec>
 {
     static const char VALUE[27];
 };
 
 template <typename TSpec>
-struct TranslateTableByteToRedAA_<Murphy10, TSpec>
+struct TranslateTableByteToRedAA_<Cannata10, TSpec>
 {
     static const char VALUE[256];
 };
@@ -78,32 +78,32 @@ struct TranslateTableByteToRedAA_<Murphy10, TSpec>
 // ---------------------------------- N = 10 ------------------------------
 
 template <typename TVoidSpec>
-char const TranslateTableRedAAToChar_<Murphy10, TVoidSpec>::VALUE[10] =
+char const TranslateTableRedAAToChar_<Cannata10, TVoidSpec>::VALUE[10] =
 {
-    'A', // A O U X
-    'B', // B D E N Q Z
-    'C', // C
-    'F', // F W Y *
-    'G', // G
+    'A', // A G S T X
+    'B', // B D N
+    'C', // C U
+    'E', // E Q Z
+    'F', // F Y *
     'H', // H
     'I', // I J L M V
-    'K', // K R
+    'K', // K O R
     'P', // P
-    'S'  // S T
+    'W'  // W
 };
 
 template <typename TVoidSpec>
-char const TranslateTableCharToRedAA_<Murphy10, TVoidSpec>::VALUE[256] =
+char const TranslateTableCharToRedAA_<Cannata10, TVoidSpec>::VALUE[256] =
 {
      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  3,  0,  0,
+     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  4,  0,  0,
      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-     0,  0,  0,  0,  0,  0,  1,  2,  1,  1,  3,  4,  5,  6,  6,
-     7,  6,  6,  1,  0,  8,  1,  7,  9,  9,  0,  6,  3,  0,  3,
-     1,  0,  0,  0,  0,  0,  0,  0,  1,  2,  1,  1,  3,  4,  5,
-     6,  6,  7,  6,  6,  1,  0,  8,  1,  7,  9,  9,  0,  6,  3,
-     0,  3,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+     0,  0,  0,  0,  0,  0,  1,  2,  1,  3,  4,  0,  5,  6,  6,
+     7,  6,  6,  1,  7,  8,  3,  7,  0,  0,  2,  6,  9,  0,  4,
+     3,  0,  0,  0,  0,  0,  0,  0,  1,  2,  1,  3,  4,  0,  5,
+     6,  6,  7,  6,  6,  1,  7,  8,  3,  7,  0,  0,  2,  6,  9,
+     0,  4,  3,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
@@ -116,14 +116,14 @@ char const TranslateTableCharToRedAA_<Murphy10, TVoidSpec>::VALUE[256] =
 };
 
 template <typename TVoidSpec>
-char const TranslateTableAAToRedAA_<Murphy10, TVoidSpec>::VALUE[27] =
+char const TranslateTableAAToRedAA_<Cannata10, TVoidSpec>::VALUE[27] =
 {
-     0,  1,  2,  1,  1,  3,  4,  5,  6,  6,  7,  6,  6,
-     1,  0,  8,  1,  7,  9,  9,  0,  6,  3,  3,  1,  0,  3
+     0,  1,  2,  1,  3,  4,  0,  5,  6,  6,  7,  6,  6,
+     1,  7,  8,  3,  7,  0,  0,  2,  6,  9,  4,  3,  0,  4
 };
 
 template <typename TVoidSpec>
-char const TranslateTableByteToRedAA_<Murphy10, TVoidSpec>::VALUE[256] =
+char const TranslateTableByteToRedAA_<Cannata10, TVoidSpec>::VALUE[256] =
 {
      0,  1,  2,  3,  4,  5,  6,  7,  8,  9,  0,  0,  0,  0,  0,
      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
@@ -151,4 +151,4 @@ char const TranslateTableByteToRedAA_<Murphy10, TVoidSpec>::VALUE[256] =
 
 } // namespace
 
-#endif // SEQAN_REDUCED_AMINOACID_MURPHY10_TABLES_H_
+#endif // SEQAN_REDUCED_AMINOACID_CANNATA10_TABLES_H_
diff --git a/include/seqan/reduced_aminoacid/reduced_aminoacid_cluster_red_base.h b/include/seqan/reduced_aminoacid/reduced_aminoacid_cluster_red_base.h
index 4b040bb..c6c7846 100644
--- a/include/seqan/reduced_aminoacid/reduced_aminoacid_cluster_red_base.h
+++ b/include/seqan/reduced_aminoacid/reduced_aminoacid_cluster_red_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/reduced_aminoacid/reduced_aminoacid_cluster_red_tables_20_to_n_b62.h b/include/seqan/reduced_aminoacid/reduced_aminoacid_cluster_red_tables_20_to_n_b62.h
index e0d1f56..f6eac18 100644
--- a/include/seqan/reduced_aminoacid/reduced_aminoacid_cluster_red_tables_20_to_n_b62.h
+++ b/include/seqan/reduced_aminoacid/reduced_aminoacid_cluster_red_tables_20_to_n_b62.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/reduced_aminoacid/reduced_aminoacid_cluster_red_tables_22_to_n_b62.h b/include/seqan/reduced_aminoacid/reduced_aminoacid_cluster_red_tables_22_to_n_b62.h
index f23820f..2ea7d63 100644
--- a/include/seqan/reduced_aminoacid/reduced_aminoacid_cluster_red_tables_22_to_n_b62.h
+++ b/include/seqan/reduced_aminoacid/reduced_aminoacid_cluster_red_tables_22_to_n_b62.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/reduced_aminoacid/reduced_aminoacid_cluster_red_tables_24_to_n_b62.h b/include/seqan/reduced_aminoacid/reduced_aminoacid_cluster_red_tables_24_to_n_b62.h
index 68121ea..74fd217 100644
--- a/include/seqan/reduced_aminoacid/reduced_aminoacid_cluster_red_tables_24_to_n_b62.h
+++ b/include/seqan/reduced_aminoacid/reduced_aminoacid_cluster_red_tables_24_to_n_b62.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/reduced_aminoacid/reduced_aminoacid_murphy10_base.h b/include/seqan/reduced_aminoacid/reduced_aminoacid_li10_base.h
similarity index 81%
copy from include/seqan/reduced_aminoacid/reduced_aminoacid_murphy10_base.h
copy to include/seqan/reduced_aminoacid/reduced_aminoacid_li10_base.h
index 43a4b62..fca5674 100644
--- a/include/seqan/reduced_aminoacid/reduced_aminoacid_murphy10_base.h
+++ b/include/seqan/reduced_aminoacid/reduced_aminoacid_li10_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -29,13 +29,13 @@
 // DAMAGE.
 //
 // ==========================================================================
-// Author: Hannes Hauswedell <hannes.hauswedell at fu-berlin.de>
+// Author: Kristin Knorr <kristin.knorr at fu-berlin.de>
 // ==========================================================================
-// Murphy10 reduction of AminoAcid alphabet
+// Li10 reduction of AminoAcid alphabet
 // ==========================================================================
 
-#ifndef SEQAN_REDUCED_AMINOACID_MURPHY10_BASE_H_
-#define SEQAN_REDUCED_AMINOACID_MURPHY10_BASE_H_
+#ifndef SEQAN_REDUCED_AMINOACID_LI10_BASE_H_
+#define SEQAN_REDUCED_AMINOACID_LI10_BASE_H_
 
 namespace seqan {
 
@@ -48,41 +48,39 @@ namespace seqan {
 // ============================================================================
 
 // -----------------------------------------------------------------------
-// Tag Murphy10
+// Tag Li10
 // -----------------------------------------------------------------------
 
 /*!
- * @tag Murphy10
+ * @tag Li10
  * @brief Specialization for @link ReducedAminoAcid @endlink#
  * @headerfile seqan/reduced_aminoacid.h
  *
- * @signature typedef Murphy10 Tag<Murphy10_>;
+ * @signature typedef Li10 Tag<Li10_>;
  *
- * This is the 10-character reduction defined by Murphy et al,
- * 2000, <a href="http://www.ncbi.nlm.nih.gov/pubmed/10775656">http://www.ncbi.nlm.nih.gov/pubmed/10775656</a>
- *
- * This alphabet is used by many tools, e.g. Rapsearch2, Lambda, UBlast.
+ * This is the 10-character reduction defined by Li et al,
+ * 2003, <a href="https://www.ncbi.nlm.nih.gov/pubmed/12826723">https://www.ncbi.nlm.nih.gov/pubmed/12826723</a>
  *
  * Since it was created from the 20-letter alphabet the clusters in SeqAn are
  * not identical (they contain more symbols). This is the clustering:
  * @code{.txt}
- *   'A', // A O U X
- *   'B', // B D E N Q Z
- *   'C', // C
+ *   'A', // A S T X
+ *   'B', // B D E Q Z
+ *   'C', // C U
  *   'F', // F W Y *
  *   'G', // G
- *   'H', // H
- *   'I', // I J L M V
- *   'K', // K R
+ *   'H', // H N
+ *   'I', // I V
+ *   'J', // J L M
+ *   'K', // K O R
  *   'P', // P
- *   'S'  // S T
  * @endcode
  *
  */
 
-struct Murphy10_ {};
+struct Li10_ {};
 
-typedef Tag<Murphy10_> Murphy10;
+typedef Tag<Li10_> Li10;
 
 // ============================================================================
 // Metafunctions
@@ -93,7 +91,7 @@ typedef Tag<Murphy10_> Murphy10;
 // -----------------------------------------------------------------------
 
 template <>
-struct ValueSize<SimpleType<unsigned char, ReducedAminoAcid_<Murphy10> > >
+struct ValueSize<SimpleType<unsigned char, ReducedAminoAcid_<Li10> > >
 {
     typedef uint8_t Type;
     static const Type VALUE = 10;
@@ -104,7 +102,7 @@ struct ValueSize<SimpleType<unsigned char, ReducedAminoAcid_<Murphy10> > >
 // -----------------------------------------------------------------------
 
 template <>
-struct BitsPerValue<SimpleType<unsigned char, ReducedAminoAcid_<Murphy10> > >
+struct BitsPerValue<SimpleType<unsigned char, ReducedAminoAcid_<Li10> > >
 {
     typedef uint8_t Type;
     static const Type VALUE = 4;
@@ -119,4 +117,4 @@ struct BitsPerValue<SimpleType<unsigned char, ReducedAminoAcid_<Murphy10> > >
 // ============================================================================
 
 }
-#endif // def SEQAN_REDUCED_AMINOACID_MURPHY10_BASE_H_
+#endif // def SEQAN_REDUCED_AMINOACID_LI10_BASE_H_
diff --git a/include/seqan/reduced_aminoacid/reduced_aminoacid_murphy10_tables.h b/include/seqan/reduced_aminoacid/reduced_aminoacid_li10_tables.h
similarity index 80%
copy from include/seqan/reduced_aminoacid/reduced_aminoacid_murphy10_tables.h
copy to include/seqan/reduced_aminoacid/reduced_aminoacid_li10_tables.h
index 57c8470..14007db 100644
--- a/include/seqan/reduced_aminoacid/reduced_aminoacid_murphy10_tables.h
+++ b/include/seqan/reduced_aminoacid/reduced_aminoacid_li10_tables.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -29,13 +29,13 @@
 // DAMAGE.
 //
 // ==========================================================================
-// Author: Hannes Hauswedell <hannes.hauswedell at fu-berlin.de>
+// Author: Kristin Knorr <kristin.knorr at fu-berlin.de>
 // ==========================================================================
-// Murphy10 reduction tables
+// Li10 reduction tables
 // ==========================================================================
 
-#ifndef SEQAN_REDUCED_AMINOACID_MURPHY10_TABLES_H_
-#define SEQAN_REDUCED_AMINOACID_MURPHY10_TABLES_H_
+#ifndef SEQAN_REDUCED_AMINOACID_LI10_TABLES_H_
+#define SEQAN_REDUCED_AMINOACID_LI10_TABLES_H_
 
 namespace seqan {
 
@@ -52,25 +52,25 @@ namespace seqan {
 // ============================================================================
 
 template <typename TSpec>
-struct TranslateTableRedAAToChar_<Murphy10, TSpec>
+struct TranslateTableRedAAToChar_<Li10, TSpec>
 {
-    static const char VALUE[ValueSize<SimpleType<unsigned char, ReducedAminoAcid_<Murphy10> > >::VALUE];
+    static const char VALUE[ValueSize<SimpleType<unsigned char, ReducedAminoAcid_<Li10> > >::VALUE];
 };
 
 template <typename TSpec>
-struct TranslateTableCharToRedAA_<Murphy10, TSpec>
+struct TranslateTableCharToRedAA_<Li10, TSpec>
 {
     static const char VALUE[256];
 };
 
 template <typename TSpec>
-struct TranslateTableAAToRedAA_<Murphy10, TSpec>
+struct TranslateTableAAToRedAA_<Li10, TSpec>
 {
     static const char VALUE[27];
 };
 
 template <typename TSpec>
-struct TranslateTableByteToRedAA_<Murphy10, TSpec>
+struct TranslateTableByteToRedAA_<Li10, TSpec>
 {
     static const char VALUE[256];
 };
@@ -78,31 +78,31 @@ struct TranslateTableByteToRedAA_<Murphy10, TSpec>
 // ---------------------------------- N = 10 ------------------------------
 
 template <typename TVoidSpec>
-char const TranslateTableRedAAToChar_<Murphy10, TVoidSpec>::VALUE[10] =
+char const TranslateTableRedAAToChar_<Li10, TVoidSpec>::VALUE[10] =
 {
-    'A', // A O U X
-    'B', // B D E N Q Z
-    'C', // C
+    'A', // A S T X
+    'B', // B D E Q Z
+    'C', // C U
     'F', // F W Y *
     'G', // G
-    'H', // H
-    'I', // I J L M V
-    'K', // K R
+    'H', // H N
+    'I', // I V
+    'J', // J L M
+    'K', // K O R
     'P', // P
-    'S'  // S T
 };
 
 template <typename TVoidSpec>
-char const TranslateTableCharToRedAA_<Murphy10, TVoidSpec>::VALUE[256] =
+char const TranslateTableCharToRedAA_<Li10, TVoidSpec>::VALUE[256] =
 {
      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  3,  0,  0,
      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-     0,  0,  0,  0,  0,  0,  1,  2,  1,  1,  3,  4,  5,  6,  6,
-     7,  6,  6,  1,  0,  8,  1,  7,  9,  9,  0,  6,  3,  0,  3,
+     0,  0,  0,  0,  0,  0,  1,  2,  1,  1,  3,  4,  5,  6,  7,
+     8,  7,  7,  5,  8,  9,  1,  8,  0,  0,  2,  6,  3,  0,  3,
      1,  0,  0,  0,  0,  0,  0,  0,  1,  2,  1,  1,  3,  4,  5,
-     6,  6,  7,  6,  6,  1,  0,  8,  1,  7,  9,  9,  0,  6,  3,
+     6,  7,  8,  7,  7,  5,  8,  9,  1,  8,  0,  0,  2,  6,  3,
      0,  3,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
@@ -116,14 +116,14 @@ char const TranslateTableCharToRedAA_<Murphy10, TVoidSpec>::VALUE[256] =
 };
 
 template <typename TVoidSpec>
-char const TranslateTableAAToRedAA_<Murphy10, TVoidSpec>::VALUE[27] =
+char const TranslateTableAAToRedAA_<Li10, TVoidSpec>::VALUE[27] =
 {
-     0,  1,  2,  1,  1,  3,  4,  5,  6,  6,  7,  6,  6,
-     1,  0,  8,  1,  7,  9,  9,  0,  6,  3,  3,  1,  0,  3
+     0,  1,  2,  1,  1,  3,  4,  5,  6,  7,  8,  7,  7,
+     5,  8,  9,  1,  8,  0,  0,  2,  6,  3,  3,  1,  0, 3
 };
 
 template <typename TVoidSpec>
-char const TranslateTableByteToRedAA_<Murphy10, TVoidSpec>::VALUE[256] =
+char const TranslateTableByteToRedAA_<Li10, TVoidSpec>::VALUE[256] =
 {
      0,  1,  2,  3,  4,  5,  6,  7,  8,  9,  0,  0,  0,  0,  0,
      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
@@ -151,4 +151,4 @@ char const TranslateTableByteToRedAA_<Murphy10, TVoidSpec>::VALUE[256] =
 
 } // namespace
 
-#endif // SEQAN_REDUCED_AMINOACID_MURPHY10_TABLES_H_
+#endif // SEQAN_REDUCED_AMINOACID_LI10_TABLES_H_
diff --git a/include/seqan/reduced_aminoacid/reduced_aminoacid_murphy10_base.h b/include/seqan/reduced_aminoacid/reduced_aminoacid_murphy10_base.h
index 43a4b62..ea63043 100644
--- a/include/seqan/reduced_aminoacid/reduced_aminoacid_murphy10_base.h
+++ b/include/seqan/reduced_aminoacid/reduced_aminoacid_murphy10_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/reduced_aminoacid/reduced_aminoacid_murphy10_tables.h b/include/seqan/reduced_aminoacid/reduced_aminoacid_murphy10_tables.h
index 57c8470..aa720ba 100644
--- a/include/seqan/reduced_aminoacid/reduced_aminoacid_murphy10_tables.h
+++ b/include/seqan/reduced_aminoacid/reduced_aminoacid_murphy10_tables.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/reduced_aminoacid/reduced_aminoacid_murphy10_base.h b/include/seqan/reduced_aminoacid/reduced_aminoacid_murphy5_base.h
similarity index 83%
copy from include/seqan/reduced_aminoacid/reduced_aminoacid_murphy10_base.h
copy to include/seqan/reduced_aminoacid/reduced_aminoacid_murphy5_base.h
index 43a4b62..f1e12e3 100644
--- a/include/seqan/reduced_aminoacid/reduced_aminoacid_murphy10_base.h
+++ b/include/seqan/reduced_aminoacid/reduced_aminoacid_murphy5_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -29,13 +29,13 @@
 // DAMAGE.
 //
 // ==========================================================================
-// Author: Hannes Hauswedell <hannes.hauswedell at fu-berlin.de>
+// Author: Kristin Knorr <kristin.knorr at fu-berlin.de>
 // ==========================================================================
-// Murphy10 reduction of AminoAcid alphabet
+// Wang5 reduction of AminoAcid alphabet
 // ==========================================================================
 
-#ifndef SEQAN_REDUCED_AMINOACID_MURPHY10_BASE_H_
-#define SEQAN_REDUCED_AMINOACID_MURPHY10_BASE_H_
+#ifndef SEQAN_REDUCED_AMINOACID_MURPHY5_BASE_H_
+#define SEQAN_REDUCED_AMINOACID_MURPHY5_BASE_H_
 
 namespace seqan {
 
@@ -48,41 +48,34 @@ namespace seqan {
 // ============================================================================
 
 // -----------------------------------------------------------------------
-// Tag Murphy10
+// Tag Murphy5
 // -----------------------------------------------------------------------
 
 /*!
- * @tag Murphy10
+ * @tag Murphy5
  * @brief Specialization for @link ReducedAminoAcid @endlink#
  * @headerfile seqan/reduced_aminoacid.h
  *
- * @signature typedef Murphy10 Tag<Murphy10_>;
+ * @signature typedef Murphy5 Tag<Murphy5_>;
  *
- * This is the 10-character reduction defined by Murphy et al,
+ * This is the 5-character reduction defined by Murphy et al,
  * 2000, <a href="http://www.ncbi.nlm.nih.gov/pubmed/10775656">http://www.ncbi.nlm.nih.gov/pubmed/10775656</a>
  *
- * This alphabet is used by many tools, e.g. Rapsearch2, Lambda, UBlast.
- *
  * Since it was created from the 20-letter alphabet the clusters in SeqAn are
  * not identical (they contain more symbols). This is the clustering:
  * @code{.txt}
- *   'A', // A O U X
+ *   'A', // A G P S T X
  *   'B', // B D E N Q Z
- *   'C', // C
+ *   'C', // C I J L M U V
  *   'F', // F W Y *
- *   'G', // G
- *   'H', // H
- *   'I', // I J L M V
- *   'K', // K R
- *   'P', // P
- *   'S'  // S T
+ *   'K', // H K O R
  * @endcode
  *
  */
 
-struct Murphy10_ {};
+struct Murphy5_ {};
 
-typedef Tag<Murphy10_> Murphy10;
+typedef Tag<Murphy5_> Murphy5;
 
 // ============================================================================
 // Metafunctions
@@ -93,10 +86,10 @@ typedef Tag<Murphy10_> Murphy10;
 // -----------------------------------------------------------------------
 
 template <>
-struct ValueSize<SimpleType<unsigned char, ReducedAminoAcid_<Murphy10> > >
+struct ValueSize<SimpleType<unsigned char, ReducedAminoAcid_<Murphy5> > >
 {
     typedef uint8_t Type;
-    static const Type VALUE = 10;
+    static const Type VALUE = 5;
 };
 
 // -----------------------------------------------------------------------
@@ -104,10 +97,10 @@ struct ValueSize<SimpleType<unsigned char, ReducedAminoAcid_<Murphy10> > >
 // -----------------------------------------------------------------------
 
 template <>
-struct BitsPerValue<SimpleType<unsigned char, ReducedAminoAcid_<Murphy10> > >
+struct BitsPerValue<SimpleType<unsigned char, ReducedAminoAcid_<Murphy5> > >
 {
     typedef uint8_t Type;
-    static const Type VALUE = 4;
+    static const Type VALUE = 3;
 };
 
 // -----------------------------------------------------------------------
@@ -119,4 +112,4 @@ struct BitsPerValue<SimpleType<unsigned char, ReducedAminoAcid_<Murphy10> > >
 // ============================================================================
 
 }
-#endif // def SEQAN_REDUCED_AMINOACID_MURPHY10_BASE_H_
+#endif // def SEQAN_REDUCED_AMINOACID_MURPHY5_BASE_H_
diff --git a/include/seqan/reduced_aminoacid/reduced_aminoacid_murphy10_tables.h b/include/seqan/reduced_aminoacid/reduced_aminoacid_murphy5_tables.h
similarity index 77%
copy from include/seqan/reduced_aminoacid/reduced_aminoacid_murphy10_tables.h
copy to include/seqan/reduced_aminoacid/reduced_aminoacid_murphy5_tables.h
index 57c8470..6a4c375 100644
--- a/include/seqan/reduced_aminoacid/reduced_aminoacid_murphy10_tables.h
+++ b/include/seqan/reduced_aminoacid/reduced_aminoacid_murphy5_tables.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -29,13 +29,13 @@
 // DAMAGE.
 //
 // ==========================================================================
-// Author: Hannes Hauswedell <hannes.hauswedell at fu-berlin.de>
+// Author: Kristin Knorr <kristin.knorr at fu-berlin.de>
 // ==========================================================================
-// Murphy10 reduction tables
+// Murphy5 reduction tables
 // ==========================================================================
 
-#ifndef SEQAN_REDUCED_AMINOACID_MURPHY10_TABLES_H_
-#define SEQAN_REDUCED_AMINOACID_MURPHY10_TABLES_H_
+#ifndef SEQAN_REDUCED_AMINOACID_MURPHY5_TABLES_H_
+#define SEQAN_REDUCED_AMINOACID_MURPHY5_TABLES_H_
 
 namespace seqan {
 
@@ -52,57 +52,52 @@ namespace seqan {
 // ============================================================================
 
 template <typename TSpec>
-struct TranslateTableRedAAToChar_<Murphy10, TSpec>
+struct TranslateTableRedAAToChar_<Murphy5, TSpec>
 {
-    static const char VALUE[ValueSize<SimpleType<unsigned char, ReducedAminoAcid_<Murphy10> > >::VALUE];
+    static const char VALUE[ValueSize<SimpleType<unsigned char, ReducedAminoAcid_<Murphy5> > >::VALUE];
 };
 
 template <typename TSpec>
-struct TranslateTableCharToRedAA_<Murphy10, TSpec>
+struct TranslateTableCharToRedAA_<Murphy5, TSpec>
 {
     static const char VALUE[256];
 };
 
 template <typename TSpec>
-struct TranslateTableAAToRedAA_<Murphy10, TSpec>
+struct TranslateTableAAToRedAA_<Murphy5, TSpec>
 {
     static const char VALUE[27];
 };
 
 template <typename TSpec>
-struct TranslateTableByteToRedAA_<Murphy10, TSpec>
+struct TranslateTableByteToRedAA_<Murphy5, TSpec>
 {
     static const char VALUE[256];
 };
 
-// ---------------------------------- N = 10 ------------------------------
+// ---------------------------------- N = 5 ------------------------------
 
 template <typename TVoidSpec>
-char const TranslateTableRedAAToChar_<Murphy10, TVoidSpec>::VALUE[10] =
+char const TranslateTableRedAAToChar_<Murphy5, TVoidSpec>::VALUE[5] =
 {
-    'A', // A O U X
+    'A', // A G P S T X 
     'B', // B D E N Q Z
-    'C', // C
+    'C', // C I J L M U V
     'F', // F W Y *
-    'G', // G
-    'H', // H
-    'I', // I J L M V
-    'K', // K R
-    'P', // P
-    'S'  // S T
+    'H', // H K O R
 };
 
 template <typename TVoidSpec>
-char const TranslateTableCharToRedAA_<Murphy10, TVoidSpec>::VALUE[256] =
+char const TranslateTableCharToRedAA_<Murphy5, TVoidSpec>::VALUE[256] =
 {
      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  3,  0,  0,
      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-     0,  0,  0,  0,  0,  0,  1,  2,  1,  1,  3,  4,  5,  6,  6,
-     7,  6,  6,  1,  0,  8,  1,  7,  9,  9,  0,  6,  3,  0,  3,
-     1,  0,  0,  0,  0,  0,  0,  0,  1,  2,  1,  1,  3,  4,  5,
-     6,  6,  7,  6,  6,  1,  0,  8,  1,  7,  9,  9,  0,  6,  3,
+     0,  0,  0,  0,  0,  0,  1,  2,  1,  1,  3,  0,  4,  2,  2,
+     4,  2,  2,  1,  4,  0,  1,  4,  0,  0,  2,  2,  3,  0,  3,
+     1,  0,  0,  0,  0,  0,  0,  0,  1,  2,  1,  1,  3,  0,  4,
+     2,  2,  4,  2,  2,  1,  4,  0,  1,  4,  0,  0,  2,  2,  3,
      0,  3,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
@@ -116,16 +111,16 @@ char const TranslateTableCharToRedAA_<Murphy10, TVoidSpec>::VALUE[256] =
 };
 
 template <typename TVoidSpec>
-char const TranslateTableAAToRedAA_<Murphy10, TVoidSpec>::VALUE[27] =
+char const TranslateTableAAToRedAA_<Murphy5, TVoidSpec>::VALUE[27] =
 {
-     0,  1,  2,  1,  1,  3,  4,  5,  6,  6,  7,  6,  6,
-     1,  0,  8,  1,  7,  9,  9,  0,  6,  3,  3,  1,  0,  3
+     0,  1,  2,  1,  1,  3,  0,  4,  2,  2,  4,  2,  2,
+     1,  4,  0,  1,  4,  0,  0,  2,  2,  3,  3,  1,  0,  3
 };
 
 template <typename TVoidSpec>
-char const TranslateTableByteToRedAA_<Murphy10, TVoidSpec>::VALUE[256] =
+char const TranslateTableByteToRedAA_<Murphy5, TVoidSpec>::VALUE[256] =
 {
-     0,  1,  2,  3,  4,  5,  6,  7,  8,  9,  0,  0,  0,  0,  0,
+     0,  1,  2,  3,  4,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
@@ -151,4 +146,4 @@ char const TranslateTableByteToRedAA_<Murphy10, TVoidSpec>::VALUE[256] =
 
 } // namespace
 
-#endif // SEQAN_REDUCED_AMINOACID_MURPHY10_TABLES_H_
+#endif // SEQAN_REDUCED_AMINOACID_MURPHY5_TABLES_H_
diff --git a/include/seqan/reduced_aminoacid/reduced_aminoacid_murphy10_base.h b/include/seqan/reduced_aminoacid/reduced_aminoacid_solis10_base.h
similarity index 80%
copy from include/seqan/reduced_aminoacid/reduced_aminoacid_murphy10_base.h
copy to include/seqan/reduced_aminoacid/reduced_aminoacid_solis10_base.h
index 43a4b62..9b1d4b0 100644
--- a/include/seqan/reduced_aminoacid/reduced_aminoacid_murphy10_base.h
+++ b/include/seqan/reduced_aminoacid/reduced_aminoacid_solis10_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -29,13 +29,13 @@
 // DAMAGE.
 //
 // ==========================================================================
-// Author: Hannes Hauswedell <hannes.hauswedell at fu-berlin.de>
+// Author: Kristin Knorr <kristin.knorr at fu-berlin.de>
 // ==========================================================================
-// Murphy10 reduction of AminoAcid alphabet
+// Solis10 reduction of AminoAcid alphabet
 // ==========================================================================
 
-#ifndef SEQAN_REDUCED_AMINOACID_MURPHY10_BASE_H_
-#define SEQAN_REDUCED_AMINOACID_MURPHY10_BASE_H_
+#ifndef SEQAN_REDUCED_AMINOACID_SOLIS10_BASE_H_
+#define SEQAN_REDUCED_AMINOACID_SOLIS10_BASE_H_
 
 namespace seqan {
 
@@ -48,41 +48,39 @@ namespace seqan {
 // ============================================================================
 
 // -----------------------------------------------------------------------
-// Tag Murphy10
+// Tag Solis10
 // -----------------------------------------------------------------------
 
 /*!
- * @tag Murphy10
+ * @tag Solis10
  * @brief Specialization for @link ReducedAminoAcid @endlink#
  * @headerfile seqan/reduced_aminoacid.h
  *
- * @signature typedef Murphy10 Tag<Murphy10_>;
+ * @signature typedef Solis10 Tag<Solis10_>;
  *
- * This is the 10-character reduction defined by Murphy et al,
- * 2000, <a href="http://www.ncbi.nlm.nih.gov/pubmed/10775656">http://www.ncbi.nlm.nih.gov/pubmed/10775656</a>
- *
- * This alphabet is used by many tools, e.g. Rapsearch2, Lambda, UBlast.
+ * This is the 10-character reduction defined by Solis,
+ * 2015, <a href="hhttps://www.ncbi.nlm.nih.gov/pubmed/26407535">https://www.ncbi.nlm.nih.gov/pubmed/26407535</a>
  *
  * Since it was created from the 20-letter alphabet the clusters in SeqAn are
  * not identical (they contain more symbols). This is the clustering:
  * @code{.txt}
- *   'A', // A O U X
- *   'B', // B D E N Q Z
- *   'C', // C
- *   'F', // F W Y *
- *   'G', // G
- *   'H', // H
+ *   'A', // A X
+ *   'B', // B D E Z
+ *   'C', // C U
+ *   'F', // F *
+ *   'G', // G N Q S
+ *   'H', // H O R
  *   'I', // I J L M V
- *   'K', // K R
- *   'P', // P
- *   'S'  // S T
+ *   'K', // K
+ *   'P', // P T
+ *   'W'  // W Y
  * @endcode
  *
  */
 
-struct Murphy10_ {};
+struct Solis10_ {};
 
-typedef Tag<Murphy10_> Murphy10;
+typedef Tag<Solis10_> Solis10;
 
 // ============================================================================
 // Metafunctions
@@ -93,7 +91,7 @@ typedef Tag<Murphy10_> Murphy10;
 // -----------------------------------------------------------------------
 
 template <>
-struct ValueSize<SimpleType<unsigned char, ReducedAminoAcid_<Murphy10> > >
+struct ValueSize<SimpleType<unsigned char, ReducedAminoAcid_<Solis10> > >
 {
     typedef uint8_t Type;
     static const Type VALUE = 10;
@@ -104,7 +102,7 @@ struct ValueSize<SimpleType<unsigned char, ReducedAminoAcid_<Murphy10> > >
 // -----------------------------------------------------------------------
 
 template <>
-struct BitsPerValue<SimpleType<unsigned char, ReducedAminoAcid_<Murphy10> > >
+struct BitsPerValue<SimpleType<unsigned char, ReducedAminoAcid_<Solis10> > >
 {
     typedef uint8_t Type;
     static const Type VALUE = 4;
@@ -119,4 +117,4 @@ struct BitsPerValue<SimpleType<unsigned char, ReducedAminoAcid_<Murphy10> > >
 // ============================================================================
 
 }
-#endif // def SEQAN_REDUCED_AMINOACID_MURPHY10_BASE_H_
+#endif // def SEQAN_REDUCED_AMINOACID_SOLIS10_BASE_H_
diff --git a/include/seqan/reduced_aminoacid/reduced_aminoacid_murphy10_tables.h b/include/seqan/reduced_aminoacid/reduced_aminoacid_solis10_tables.h
similarity index 81%
copy from include/seqan/reduced_aminoacid/reduced_aminoacid_murphy10_tables.h
copy to include/seqan/reduced_aminoacid/reduced_aminoacid_solis10_tables.h
index 57c8470..d893a69 100644
--- a/include/seqan/reduced_aminoacid/reduced_aminoacid_murphy10_tables.h
+++ b/include/seqan/reduced_aminoacid/reduced_aminoacid_solis10_tables.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -29,13 +29,13 @@
 // DAMAGE.
 //
 // ==========================================================================
-// Author: Hannes Hauswedell <hannes.hauswedell at fu-berlin.de>
+// Author: Kristin Knorr <kristin.knorr at fu-berlin.de>
 // ==========================================================================
-// Murphy10 reduction tables
+// Solis10 reduction tables
 // ==========================================================================
 
-#ifndef SEQAN_REDUCED_AMINOACID_MURPHY10_TABLES_H_
-#define SEQAN_REDUCED_AMINOACID_MURPHY10_TABLES_H_
+#ifndef SEQAN_REDUCED_AMINOACID_SOLIS10_TABLES_H_
+#define SEQAN_REDUCED_AMINOACID_SOLIS10_TABLES_H_
 
 namespace seqan {
 
@@ -52,25 +52,25 @@ namespace seqan {
 // ============================================================================
 
 template <typename TSpec>
-struct TranslateTableRedAAToChar_<Murphy10, TSpec>
+struct TranslateTableRedAAToChar_<Solis10, TSpec>
 {
-    static const char VALUE[ValueSize<SimpleType<unsigned char, ReducedAminoAcid_<Murphy10> > >::VALUE];
+    static const char VALUE[ValueSize<SimpleType<unsigned char, ReducedAminoAcid_<Solis10> > >::VALUE];
 };
 
 template <typename TSpec>
-struct TranslateTableCharToRedAA_<Murphy10, TSpec>
+struct TranslateTableCharToRedAA_<Solis10, TSpec>
 {
     static const char VALUE[256];
 };
 
 template <typename TSpec>
-struct TranslateTableAAToRedAA_<Murphy10, TSpec>
+struct TranslateTableAAToRedAA_<Solis10, TSpec>
 {
     static const char VALUE[27];
 };
 
 template <typename TSpec>
-struct TranslateTableByteToRedAA_<Murphy10, TSpec>
+struct TranslateTableByteToRedAA_<Solis10, TSpec>
 {
     static const char VALUE[256];
 };
@@ -78,32 +78,32 @@ struct TranslateTableByteToRedAA_<Murphy10, TSpec>
 // ---------------------------------- N = 10 ------------------------------
 
 template <typename TVoidSpec>
-char const TranslateTableRedAAToChar_<Murphy10, TVoidSpec>::VALUE[10] =
+char const TranslateTableRedAAToChar_<Solis10, TVoidSpec>::VALUE[10] =
 {
-    'A', // A O U X
-    'B', // B D E N Q Z
-    'C', // C
-    'F', // F W Y *
-    'G', // G
-    'H', // H
+    'A', // A X
+    'B', // B D E Z
+    'C', // C U
+    'F', // F *
+    'G', // G N Q S
+    'H', // H O R
     'I', // I J L M V
-    'K', // K R
-    'P', // P
-    'S'  // S T
+    'K', // K
+    'P', // P T
+    'W'  // W Y
 };
 
 template <typename TVoidSpec>
-char const TranslateTableCharToRedAA_<Murphy10, TVoidSpec>::VALUE[256] =
+char const TranslateTableCharToRedAA_<Solis10, TVoidSpec>::VALUE[256] =
 {
      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  3,  0,  0,
      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
      0,  0,  0,  0,  0,  0,  1,  2,  1,  1,  3,  4,  5,  6,  6,
-     7,  6,  6,  1,  0,  8,  1,  7,  9,  9,  0,  6,  3,  0,  3,
+     7,  6,  6,  4,  5,  8,  4,  5,  4,  8,  2,  6,  9,  0,  9,
      1,  0,  0,  0,  0,  0,  0,  0,  1,  2,  1,  1,  3,  4,  5,
-     6,  6,  7,  6,  6,  1,  0,  8,  1,  7,  9,  9,  0,  6,  3,
-     0,  3,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+     6,  6,  7,  6,  6,  4,  5,  8,  4,  5,  4,  8,  2,  6,  9,
+     0,  9,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
@@ -116,14 +116,14 @@ char const TranslateTableCharToRedAA_<Murphy10, TVoidSpec>::VALUE[256] =
 };
 
 template <typename TVoidSpec>
-char const TranslateTableAAToRedAA_<Murphy10, TVoidSpec>::VALUE[27] =
+char const TranslateTableAAToRedAA_<Solis10, TVoidSpec>::VALUE[27] =
 {
      0,  1,  2,  1,  1,  3,  4,  5,  6,  6,  7,  6,  6,
-     1,  0,  8,  1,  7,  9,  9,  0,  6,  3,  3,  1,  0,  3
+     4,  5,  8,  4,  5,  4,  8,  2,  6,  9,  9,  1,  0,  3
 };
 
 template <typename TVoidSpec>
-char const TranslateTableByteToRedAA_<Murphy10, TVoidSpec>::VALUE[256] =
+char const TranslateTableByteToRedAA_<Solis10, TVoidSpec>::VALUE[256] =
 {
      0,  1,  2,  3,  4,  5,  6,  7,  8,  9,  0,  0,  0,  0,  0,
      0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
@@ -151,4 +151,4 @@ char const TranslateTableByteToRedAA_<Murphy10, TVoidSpec>::VALUE[256] =
 
 } // namespace
 
-#endif // SEQAN_REDUCED_AMINOACID_MURPHY10_TABLES_H_
+#endif // SEQAN_REDUCED_AMINOACID_SOLIS10_TABLES_H_
diff --git a/include/seqan/rna_io.h b/include/seqan/rna_io.h
index bfaf6d1..05e7c4f 100644
--- a/include/seqan/rna_io.h
+++ b/include/seqan/rna_io.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/rna_io/bpseq_read_write.h b/include/seqan/rna_io/bpseq_read_write.h
index 6e0d201..2404694 100644
--- a/include/seqan/rna_io/bpseq_read_write.h
+++ b/include/seqan/rna_io/bpseq_read_write.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/rna_io/connect_read_write.h b/include/seqan/rna_io/connect_read_write.h
index 3fa92d2..fc702cc 100644
--- a/include/seqan/rna_io/connect_read_write.h
+++ b/include/seqan/rna_io/connect_read_write.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/rna_io/dot_bracket_read_write.h b/include/seqan/rna_io/dot_bracket_read_write.h
index b39a9aa..53b0dac 100644
--- a/include/seqan/rna_io/dot_bracket_read_write.h
+++ b/include/seqan/rna_io/dot_bracket_read_write.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/rna_io/ebpseq_read_write.h b/include/seqan/rna_io/ebpseq_read_write.h
index 3b3c570..70140c6 100644
--- a/include/seqan/rna_io/ebpseq_read_write.h
+++ b/include/seqan/rna_io/ebpseq_read_write.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/rna_io/rna_header.h b/include/seqan/rna_io/rna_header.h
index 2e82004..0037efd 100644
--- a/include/seqan/rna_io/rna_header.h
+++ b/include/seqan/rna_io/rna_header.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/rna_io/rna_io_context.h b/include/seqan/rna_io/rna_io_context.h
index 21b8f4f..c433a00 100644
--- a/include/seqan/rna_io/rna_io_context.h
+++ b/include/seqan/rna_io/rna_io_context.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/rna_io/rna_record.h b/include/seqan/rna_io/rna_record.h
index aea4330..7a824d3 100644
--- a/include/seqan/rna_io/rna_record.h
+++ b/include/seqan/rna_io/rna_record.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -120,16 +120,23 @@ class RnaRecord
 {
 private:
     // Constant for an undefined ID.
-    static std::uint32_t const undef = UINT32_MAX;
+    static std::uint32_t const _undef = std::numeric_limits<std::uint32_t>::max();
 
 public:
+    // NOTE(marehr): Explicitly define a default constructor, to fix a msvc 2017
+    // (msvc versions before did not have this bug) compiler bug:
+    //     error C2248: 'seqan::RnaRecord::_undef': cannot access private member
+    //     declared in class 'seqan::RnaRecord'
+    RnaRecord() : recordID{_undef}
+    {}
+
     /*!
      * @var std::uint32_t RnaRecord::recordID
      * @brief Identification of the record.
      *
      * In an RNA structure file the first record gets ID 0, the following ID 1 and so on.
      */
-    std::uint32_t recordID{undef};
+    std::uint32_t recordID{_undef};
 
     /*!
      * @var TSizeRna5String RnaRecord::seqLen
@@ -234,7 +241,7 @@ public:
      */
     bool hasUndefinedID() const
     {
-        return recordID == undef;
+        return recordID == _undef;
     }
 
     /*!
@@ -244,7 +251,7 @@ public:
      */
     void clearID()
     {
-        recordID = undef;
+        recordID = _undef;
     }
 };
 
diff --git a/include/seqan/rna_io/rna_struct_file.h b/include/seqan/rna_io/rna_struct_file.h
index c9c94a6..dffdbda 100644
--- a/include/seqan/rna_io/rna_struct_file.h
+++ b/include/seqan/rna_io/rna_struct_file.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/rna_io/stockholm_read_write.h b/include/seqan/rna_io/stockholm_read_write.h
index d65e607..cd23f47 100644
--- a/include/seqan/rna_io/stockholm_read_write.h
+++ b/include/seqan/rna_io/stockholm_read_write.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/rna_io/vienna_read_write.h b/include/seqan/rna_io/vienna_read_write.h
index e268ddc..13796e6 100644
--- a/include/seqan/rna_io/vienna_read_write.h
+++ b/include/seqan/rna_io/vienna_read_write.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/roi_io.h b/include/seqan/roi_io.h
index b61d617..62aecc6 100644
--- a/include/seqan/roi_io.h
+++ b/include/seqan/roi_io.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/roi_io/read_roi.h b/include/seqan/roi_io/read_roi.h
index 5410624..378d384 100644
--- a/include/seqan/roi_io/read_roi.h
+++ b/include/seqan/roi_io/read_roi.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/roi_io/roi_file.h b/include/seqan/roi_io/roi_file.h
index 2f6fd4b..c97c3c8 100644
--- a/include/seqan/roi_io/roi_file.h
+++ b/include/seqan/roi_io/roi_file.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/roi_io/roi_io_context.h b/include/seqan/roi_io/roi_io_context.h
index f126823..69e52bd 100644
--- a/include/seqan/roi_io/roi_io_context.h
+++ b/include/seqan/roi_io/roi_io_context.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/roi_io/roi_record.h b/include/seqan/roi_io/roi_record.h
index 69fad3d..2dc1095 100644
--- a/include/seqan/roi_io/roi_record.h
+++ b/include/seqan/roi_io/roi_record.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/roi_io/write_roi.h b/include/seqan/roi_io/write_roi.h
index 8de50f1..d032b70 100644
--- a/include/seqan/roi_io/write_roi.h
+++ b/include/seqan/roi_io/write_roi.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/score.h b/include/seqan/score.h
index 44327ff..2223e6c 100644
--- a/include/seqan/score.h
+++ b/include/seqan/score.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -38,6 +38,7 @@
 #define SEQAN_SH_
 
 #include <seqan/basic.h>
+#include <seqan/simd.h>
 
 #include <seqan/stream.h>
 
diff --git a/include/seqan/score/score_base.h b/include/seqan/score/score_base.h
index 1f97e4b..f1d787f 100644
--- a/include/seqan/score/score_base.h
+++ b/include/seqan/score/score_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/score/score_edit.h b/include/seqan/score/score_edit.h
index ca97e4e..f6dc57a 100644
--- a/include/seqan/score/score_edit.h
+++ b/include/seqan/score/score_edit.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/score/score_matrix.h b/include/seqan/score/score_matrix.h
index a2e7c89..3995acb 100644
--- a/include/seqan/score/score_matrix.h
+++ b/include/seqan/score/score_matrix.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -123,6 +123,14 @@ public:
         : data_gap_extend(_gap_extend), data_gap_open(_gap_open) {
         loadScoreMatrix(*this, filename);
     }
+
+    Score(Score const &) = default;
+    Score(Score &&) = default;
+
+    Score & operator=(Score const &) = default;
+    Score & operator=(Score &&) = default;
+
+    ~Score() = default;
 };
 
 
diff --git a/include/seqan/score/score_matrix_data.h b/include/seqan/score/score_matrix_data.h
index b7dcd96..881d992 100644
--- a/include/seqan/score/score_matrix_data.h
+++ b/include/seqan/score/score_matrix_data.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -119,14 +119,14 @@ typedef Blosum30_ ScoreSpecBlosum30;
 typedef Score<int, ScoreMatrix<AminoAcid, ScoreSpecBlosum30> > Blosum30;
 
 
-template <>
-struct ScoringMatrixData_<int, AminoAcid, ScoreSpecBlosum30> {
+template <typename TValue>
+struct ScoringMatrixData_<TValue, AminoAcid, ScoreSpecBlosum30> {
     enum {
         VALUE_SIZE = ValueSize<AminoAcid>::VALUE,
         TAB_SIZE = VALUE_SIZE * VALUE_SIZE
     };
 
-    static inline int const * getData() {
+    static inline TValue const * getData() {
         // The matrix data, ordered by letter.
         // Matrix made by matblas from blosum30.iij
         // * column uses minimum score
@@ -134,7 +134,7 @@ struct ScoringMatrixData_<int, AminoAcid, ScoreSpecBlosum30> {
         // Blocks Database = /data/blocks_5.0/blocks.dat
         // Cluster Percentage: >= 30
         // Entropy =   0.1424, Expected =  -0.1074
-        static int const _data[TAB_SIZE] = {
+        static TValue const _data[TAB_SIZE] = {
              4,  0, -3,  0,  0, -2,  0, -2,  0, -1,  0, -1,  1,  0,  0, -1,  1, -1,  1,  1,  0,  1, -5, -4,  0,  0, -7,
              0,  5, -2,  5,  0, -3,  0, -2, -2, -2,  0, -1, -2,  4, -1, -2, -1, -2,  0,  0, -1, -2, -5, -3,  0, -1, -7,
             -3, -2, 17, -3,  1, -3, -4, -5, -2, -1, -3,  0, -2, -1, -2, -3, -2, -2, -2, -2, -2, -2, -2, -6,  0, -2, -7,
@@ -214,21 +214,21 @@ typedef Blosum45_ ScoreSpecBlosum45;
 typedef Score<int, ScoreMatrix<AminoAcid, ScoreSpecBlosum45> > Blosum45;
 
 
-template <>
-struct ScoringMatrixData_<int, AminoAcid, ScoreSpecBlosum45> {
+template <typename TValue>
+struct ScoringMatrixData_<TValue, AminoAcid, ScoreSpecBlosum45> {
     enum {
         VALUE_SIZE = ValueSize<AminoAcid>::VALUE,
         TAB_SIZE = VALUE_SIZE * VALUE_SIZE
     };
 
-    static inline int const * getData() {
+    static inline TValue const * getData() {
         // Matrix made by matblas from blosum45.iij
         // * column uses minimum score
         // BLOSUM Clustered Scoring Matrix in 1/3 Bit Units
         // Blocks Database = /data/blocks_5.0/blocks.dat
         // Cluster Percentage: >= 45
         // Entropy =   0.3795, Expected =  -0.2789
-        static int const _data[TAB_SIZE] = {
+        static TValue const _data[TAB_SIZE] = {
              5, -1, -1, -2, -1, -2,  0, -2, -1, -1, -1, -1, -1, -1,  0, -1, -1, -2,  1,  0,  0,  0, -2, -2, -1,  0, -5,
             -1,  4, -2,  5,  1, -3, -1,  0, -3, -3,  0, -3, -2,  4, -1, -2,  0, -1,  0,  0, -1, -3, -4, -2,  2, -1, -5,
             -1, -2, 12, -3, -3, -2, -3, -3, -3, -3, -3, -2, -2, -2, -2, -4, -3, -3, -1, -1, -2, -1, -5, -3, -3, -2, -5,
@@ -307,21 +307,21 @@ typedef Blosum62_ ScoreSpecBlosum62;
 typedef Score<int, ScoreMatrix<AminoAcid, ScoreSpecBlosum62> > Blosum62;
 
 
-template <>
-struct ScoringMatrixData_<int, AminoAcid, ScoreSpecBlosum62> {
+template <typename TValue>
+struct ScoringMatrixData_<TValue, AminoAcid, ScoreSpecBlosum62> {
     enum {
         VALUE_SIZE = ValueSize<AminoAcid>::VALUE,
         TAB_SIZE = VALUE_SIZE * VALUE_SIZE
     };
 
-    static inline int const * getData() {
+    static inline TValue const * getData() {
         // Matrix made by matblas from blosum62.iij
         // * column uses minimum score
         // BLOSUM Clustered Scoring Matrix in 1/2 Bit Units
         // Blocks Database = /data/blocks_5.0/blocks.dat
         // Cluster Percentage: >= 62
         // Entropy =   0.6979, Expected =  -0.5209
-        static int const _data[TAB_SIZE] = {
+        static TValue const _data[TAB_SIZE] = {
              4, -2,  0, -2, -1, -2,  0, -2, -1, -1, -1, -1, -1, -2,  0, -1, -1, -1,  1,  0,  0,  0, -3, -2, -1,  0, -4,
             -2,  4, -3,  4,  1, -3, -1,  0, -3, -4,  0, -4, -3,  3, -1, -2,  0, -1,  0, -1, -1, -3, -4, -3,  1, -1, -4,
              0, -3,  9, -3, -4, -2, -3, -3, -1, -1, -3, -1, -1, -3, -2, -3, -3, -3, -1, -1, -2, -1, -2, -2, -3, -2, -4,
@@ -400,21 +400,21 @@ typedef Blosum80_ ScoreSpecBlosum80;
 typedef Score<int, ScoreMatrix<AminoAcid, ScoreSpecBlosum80> > Blosum80;
 
 
-template <>
-struct ScoringMatrixData_<int, AminoAcid, ScoreSpecBlosum80> {
+template <typename TValue>
+struct ScoringMatrixData_<TValue, AminoAcid, ScoreSpecBlosum80> {
     enum {
         VALUE_SIZE = ValueSize<AminoAcid>::VALUE,
         TAB_SIZE = VALUE_SIZE * VALUE_SIZE
     };
 
-    static inline int const * getData() {
+    static inline TValue const * getData() {
         // Matrix made by matblas from blosum80_3.iij
         // * column uses minimum score
         // BLOSUM Clustered Scoring Matrix in 1/3 Bit Units
         // Blocks Database = /data/blocks_5.0/blocks.dat
         // Cluster Percentage: >= 80
         // Entropy =   0.9868, Expected =  -0.7442
-        static int const _data[TAB_SIZE] = {
+        static TValue const _data[TAB_SIZE] = {
              7,  -3,  -1,  -3,  -2,  -4,   0,  -3,  -3,  -3,  -1,  -3,  -2,  -3,  -1,  -1,  -2,  -3,   2,   0,  -1,  -1,  -5,  -4,  -2,  -1,  -8,
             -3,   6,  -6,   6,   1,  -6,  -2,  -1,  -6,  -7,  -1,  -7,  -5,   5,  -3,  -4,  -1,  -2,   0,  -1,  -3,  -6,  -8,  -5,   0,  -3,  -8,
             -1,  -6,  13,  -7,  -7,  -4,  -6,  -7,  -2,  -3,  -6,  -3,  -3,  -5,  -4,  -6,  -5,  -6,  -2,  -2,  -4,  -2,  -5,  -5,  -7,  -4,  -8,
@@ -493,14 +493,14 @@ typedef Pam40_ ScoreSpecPam40;
 typedef Score<int, ScoreMatrix<AminoAcid, ScoreSpecPam40> > Pam40;
 
 
-template <>
-struct ScoringMatrixData_<int, AminoAcid, ScoreSpecPam40> {
+template <typename TValue>
+struct ScoringMatrixData_<TValue, AminoAcid, ScoreSpecPam40> {
     enum {
         VALUE_SIZE = ValueSize<AminoAcid>::VALUE,
         TAB_SIZE = VALUE_SIZE * VALUE_SIZE
     };
 
-    static inline int const * getData() {
+    static inline TValue const * getData() {
         //
         // This matrix was produced by "pam" Version 1.0.6 [28-Jul-93]
         //
@@ -510,7 +510,7 @@ struct ScoringMatrixData_<int, AminoAcid, ScoreSpecPam40> {
         //
         // Lowest score = -15, Highest score = 13
         //
-        static int const _data[TAB_SIZE] = {
+        static TValue const _data[TAB_SIZE] = {
              6,  -3,  -6,  -3,  -2,  -7,  -1,  -6,  -4,  -5,  -6,  -5,  -4,  -3,  -3,  -1,  -3,  -6,   0,   0,  -3,  -2, -12,  -7,  -2,  -3, -15,
             -3,   6, -11,   6,   2,  -9,  -2,  -1,  -5,  -7,  -2,  -8,  -8,   6,  -4,  -6,  -2,  -6,  -1,  -2,  -4,  -7,  -9,  -6,   1,  -4, -15,
             -6, -11,   9, -12, -12, -11,  -8,  -7,  -5,  -9, -12, -13, -12,  -9,  -8,  -7, -12,  -7,  -2,  -7,  -8,  -5, -14,  -3, -12,  -8, -15,
@@ -589,14 +589,14 @@ typedef Pam120_ ScoreSpecPam120;
 typedef Score<int, ScoreMatrix<AminoAcid, ScoreSpecPam120> > Pam120;
 
 
-template <>
-struct ScoringMatrixData_<int, AminoAcid, ScoreSpecPam120> {
+template <typename TValue>
+struct ScoringMatrixData_<TValue, AminoAcid, ScoreSpecPam120> {
     enum {
         VALUE_SIZE = ValueSize<AminoAcid>::VALUE,
         TAB_SIZE = VALUE_SIZE * VALUE_SIZE
     };
 
-    static inline int const * getData() {
+    static inline TValue const * getData() {
         // This matrix was produced by "pam" Version 1.0.6 [28-Jul-93]
         //
         // PAM 120 substitution matrix, scale = ln(2)/2 = 0.346574
@@ -605,7 +605,7 @@ struct ScoringMatrixData_<int, AminoAcid, ScoreSpecPam120> {
         //
         // Lowest score = -8, Highest score = 12
         //
-        static int const _data[TAB_SIZE] = {
+        static TValue const _data[TAB_SIZE] = {
              3,  0, -3,  0,  0, -4,  1, -3, -1, -2, -2, -3, -2, -1, -1,  1, -1, -3,  1,  1, -1,  0, -7, -4, -1, -1, -8,
              0,  4, -6,  4,  3, -5,  0,  1, -3, -4,  0, -4, -4,  3, -1, -2,  0, -2,  0,  0, -1, -3, -6, -3,  2, -1, -8,
             -3, -6,  9, -7, -7, -6, -4, -4, -3, -5, -7, -7, -6, -5, -4, -4, -7, -4,  0, -3, -4, -3, -8, -1, -7, -4, -8,
@@ -684,14 +684,14 @@ typedef Pam200_ ScoreSpecPam200;
 typedef Score<int, ScoreMatrix<AminoAcid, ScoreSpecPam200> > Pam200;
 
 
-template <>
-struct ScoringMatrixData_<int, AminoAcid, ScoreSpecPam200> {
+template <typename TValue>
+struct ScoringMatrixData_<TValue, AminoAcid, ScoreSpecPam200> {
     enum {
         VALUE_SIZE = ValueSize<AminoAcid>::VALUE,
         TAB_SIZE = VALUE_SIZE * VALUE_SIZE
     };
 
-    static inline int const * getData() {
+    static inline TValue const * getData() {
         // This matrix was produced by "pam" Version 1.0.6 [28-Jul-93]
         //
         // PAM 200 substitution matrix, scale = ln(2)/3 = 0.231049
@@ -700,7 +700,7 @@ struct ScoringMatrixData_<int, AminoAcid, ScoreSpecPam200> {
         //
         // Lowest score = -9, Highest score = 18
         //
-        static int const _data[TAB_SIZE] = {
+        static TValue const _data[TAB_SIZE] = {
              3,  0, -3,  0,  0, -4,  1, -2, -1, -2, -2, -2, -2,  0,  0,  1, -1, -2,  1,  1,  0,  0, -7, -4,  0,  0, -9,
              0,  3, -5,  4,  3, -6,  0,  1, -3, -4,  0, -4, -3,  3, -1, -1,  1, -1,  1,  0, -1, -3, -6, -4,  2, -1, -9,
             -3, -5, 12, -6, -7, -6, -4, -4, -3, -5, -7, -7, -6, -5, -4, -4, -7, -4,  0, -3, -4, -2, -9,  0, -7, -4, -9,
@@ -779,14 +779,14 @@ typedef Pam250_ ScoreSpecPam250;
 typedef Score<int, ScoreMatrix<AminoAcid, ScoreSpecPam250> > Pam250;
 
 
-template <>
-struct ScoringMatrixData_<int, AminoAcid, ScoreSpecPam250> {
+template <typename TValue>
+struct ScoringMatrixData_<TValue, AminoAcid, ScoreSpecPam250> {
     enum {
         VALUE_SIZE = ValueSize<AminoAcid>::VALUE,
         TAB_SIZE = VALUE_SIZE * VALUE_SIZE
     };
 
-    static inline int const * getData() {
+    static inline TValue const * getData() {
         // This matrix was produced by "pam" Version 1.0.6 [28-Jul-93]
         //
         // PAM 250 substitution matrix, scale = ln(2)/3 = 0.231049
@@ -795,7 +795,7 @@ struct ScoringMatrixData_<int, AminoAcid, ScoreSpecPam250> {
         //
         // Lowest score = -8, Highest score = 17
         //
-        static int const _data[TAB_SIZE] = {
+        static TValue const _data[TAB_SIZE] = {
              2,  0, -2,  0,  0, -3,  1, -1, -1, -2, -1, -2, -1,  0,  0,  1,  0, -2,  1,  1,  0,  0, -6, -3,  0,  0, -8,
              0,  3, -4,  3,  3, -4,  0,  1, -2, -3,  1, -3, -2,  2, -1, -1,  1, -1,  0,  0, -1, -2, -5, -3,  2, -1, -8,
             -2, -4, 12, -5, -5, -4, -3, -3, -2, -4, -5, -6, -5, -4, -3, -3, -5, -4,  0, -2, -3, -2, -8,  0, -5, -3, -8,
@@ -874,14 +874,14 @@ typedef Vtml200_ ScoreSpecVtml200;
 typedef Score<int, ScoreMatrix<AminoAcid, ScoreSpecVtml200> > Vtml200;
 
 
-template <>
-struct ScoringMatrixData_<int, AminoAcid, ScoreSpecVtml200> {
+template <typename TValue>
+struct ScoringMatrixData_<TValue, AminoAcid, ScoreSpecVtml200> {
     enum {
         VALUE_SIZE = ValueSize<AminoAcid>::VALUE,
         TAB_SIZE = VALUE_SIZE * VALUE_SIZE
     };
 
-    static inline int const * getData() {
+    static inline TValue const * getData() {
         // VTML200
         //
         // This matrix was produced by scripts written by
@@ -907,7 +907,7 @@ struct ScoringMatrixData_<int, AminoAcid, ScoreSpecVtml200> {
         //
         // The latest version of this perl script can be downloaded at
         // http://www.molgen.mpg.de/~muelle_t
-        static int const _data[TAB_SIZE] = {
+        static TValue const _data[TAB_SIZE] = {
              4, -1,  1, -1, -1, -3,  0, -2, -1, -2, -1, -2, -1, -1, -1,  0, -1, -2,  1,  1, -1,  0, -4, -3, -1, -1, -6,
             -1,  4, -3,  5,  2, -5,  0,  1, -4, -5,  0, -5, -3,  4, -1, -1,  1, -1,  1,  0, -1, -3, -5, -3,  1, -1, -6,
              1, -3, 12, -4, -4, -3, -2, -2,  0, -2, -4, -3, -1, -2, -1, -3, -3, -3,  1,  0, -1,  1, -6,  0, -4, -1, -6,
diff --git a/include/seqan/score/score_matrix_dyn.h b/include/seqan/score/score_matrix_dyn.h
index 8f80070..4e4619e 100644
--- a/include/seqan/score/score_matrix_dyn.h
+++ b/include/seqan/score/score_matrix_dyn.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -137,7 +137,26 @@ class Score<TValue, ScoreMatrix<AminoAcid, ScoreSpecSelectable> > :
     public Score<TValue, ScoreMatrix<AminoAcid, Default> >
 {
 public:
+
+    using TBaseScore = Score<TValue, ScoreMatrix<AminoAcid, Default>>;
+
     AminoAcidScoreMatrixID _ident = static_cast<AminoAcidScoreMatrixID>(0u);
+
+    explicit Score(TValue _gap_extend = -1) :
+        TBaseScore(_gap_extend)
+    {}
+
+    Score(TValue _gap_extend, TValue _gap_open) :
+        TBaseScore(_gap_extend, _gap_open)
+    {}
+
+    Score(Score const &) = default;
+    Score(Score &&) = default;
+
+    Score & operator=(Score const &) = default;
+    Score & operator=(Score &&) = default;
+
+    ~Score() = default;
 };
 
 using SelectableAminoAcidMatrix =  Score<int, ScoreMatrix<AminoAcid, ScoreSpecSelectable> >;
diff --git a/include/seqan/score/score_matrix_io.h b/include/seqan/score/score_matrix_io.h
index 6190f42..cb253c3 100644
--- a/include/seqan/score/score_matrix_io.h
+++ b/include/seqan/score/score_matrix_io.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/score/score_simd_wrapper.h b/include/seqan/score/score_simd_wrapper.h
index 5bf95b4..66e255f 100644
--- a/include/seqan/score/score_simd_wrapper.h
+++ b/include/seqan/score/score_simd_wrapper.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -72,7 +72,13 @@ template <typename TScoreVec, typename TScore>
 class Score<TScoreVec, ScoreSimdWrapper<TScore> >
 {
 public:
+    using TVecValue = typename Value<TScoreVec>::Type;
     using TBaseScoreSpec = typename Spec<TScore>::Type;
+    using TBaseScore = Score<typename IfC<sizeof(TVecValue) <= 2,
+                                          int32_t,
+                                          typename IfC<sizeof(TVecValue) == 8, int64_t, TVecValue>::Type
+                                         >::Type,
+                             TBaseScoreSpec>;
 
     // We can be either a SimpleScore or a ScoreMatrix.
     TScoreVec data_match        = createVector<TScoreVec>(0);
@@ -80,7 +86,7 @@ public:
     TScoreVec data_gap_extend   = createVector<TScoreVec>(-1);
     TScoreVec data_gap_open     = createVector<TScoreVec>(-1);
 
-    TScore const * _baseScorePtr;   // Only needed for the ScoreMatrix data table.
+    TBaseScore _baseScore;   // Only needed for the ScoreMatrix data table.
 
     // Default Constructor.
     Score()
@@ -93,8 +99,7 @@ public:
             data_match(createVector<TScoreVec>(scoreMatch(pScore))),
             data_mismatch(createVector<TScoreVec>(scoreMismatch(pScore))),
             data_gap_extend(createVector<TScoreVec>(scoreGapExtend(pScore))),
-            data_gap_open(createVector<TScoreVec>(scoreGapOpen(pScore))),
-            _baseScorePtr(nullptr)
+            data_gap_open(createVector<TScoreVec>(scoreGapOpen(pScore)))
     {
         ignoreUnusedVariableWarning(dummy);
     }
@@ -104,10 +109,12 @@ public:
           SEQAN_CTOR_ENABLE_IF(And<IsScoreMatrix_<TScoreSpec2>, IsSameType<TScoreSpec2, TBaseScoreSpec> >)) :
             data_gap_extend(createVector<TScoreVec>(scoreGapExtend(pScore))),
             data_gap_open(createVector<TScoreVec>(scoreGapOpen(pScore))),
-            _baseScorePtr(&pScore)
+            _baseScore(pScore)
     {
         ignoreUnusedVariableWarning(dummy);
     }
+
+    //TODO(rrahn): implement the assignment operator.
 };
 
 // ============================================================================
@@ -119,63 +126,47 @@ public:
 // ============================================================================
 
 // ----------------------------------------------------------------------------
-// Function score(); SimpleScore Wrapper
+// Function baseScore();
 // ----------------------------------------------------------------------------
 
-template <typename TValue, typename TScore, typename TSeqHVal, typename TSeqVVal>
-inline SEQAN_FUNC_DISABLE_IF(IsScoreMatrix_<TScore>, TValue)
-score(Score<TValue, ScoreSimdWrapper<TScore> > const & me, TSeqHVal const & valH, TSeqVVal const & valV)
+template <typename TValue, typename TScore>
+inline auto &
+underlying(Score<TValue, ScoreSimdWrapper<TScore> > & me)
 {
-    return blend(scoreMismatch(me), scoreMatch(me), cmpEq(valH, valV));
+    return me._baseScore;
+}
+
+template <typename TValue, typename TScore>
+inline auto const &
+underlying(Score<TValue, ScoreSimdWrapper<TScore> > const & me)
+{
+    return me._baseScore;
 }
 
 // ----------------------------------------------------------------------------
-// Function score(); ScoreMatrix Wrapper
+// Function score(); SimpleScore Wrapper
 // ----------------------------------------------------------------------------
 
 template <unsigned LENGTH>
 struct VectorLength_
 {};
 
-#define SEQAN_FIXED_VECTOR_FILL_VALUE_IMPL_2(t, d, pos)     d[t[1 + pos]], d[t[pos]]
-#define SEQAN_FIXED_VECTOR_FILL_VALUE_IMPL_4(t, d, pos)     SEQAN_FIXED_VECTOR_FILL_VALUE_IMPL_2(t, d, pos + 2), SEQAN_FIXED_VECTOR_FILL_VALUE_IMPL_2(t, d, pos)
-#define SEQAN_FIXED_VECTOR_FILL_VALUE_IMPL_8(t, d, pos)     SEQAN_FIXED_VECTOR_FILL_VALUE_IMPL_4(t, d, pos + 4), SEQAN_FIXED_VECTOR_FILL_VALUE_IMPL_4(t, d, pos)
-#define SEQAN_FIXED_VECTOR_FILL_VALUE_IMPL_16(t, d, pos)    SEQAN_FIXED_VECTOR_FILL_VALUE_IMPL_8(t, d, pos + 8), SEQAN_FIXED_VECTOR_FILL_VALUE_IMPL_8(t, d, pos)
-#define SEQAN_FIXED_VECTOR_FILL_VALUE_IMPL_32(t, d, pos)    SEQAN_FIXED_VECTOR_FILL_VALUE_IMPL_16(t, d, pos + 16), SEQAN_FIXED_VECTOR_FILL_VALUE_IMPL_16(t, d, pos)
-
-#define SEQAN_FIXED_VECTOR_FILL_VALUE_IMPL_DELEGATE(MACRO, t, d) MACRO(t, d, 0)
-#define SEQAN_FIXED_VECTOR_FILL_VALUE_IMPL(t, d, SIZE) SEQAN_FIXED_VECTOR_FILL_VALUE_IMPL_DELEGATE(SEQAN_FIXED_VECTOR_FILL_VALUE_IMPL_##SIZE, t, d)
-
-#define SEQAN_FIXED_VECTOR_FILL_IMPL(SIZE)                                        \
-template <typename TTarget, typename TPos, typename TData>                        \
-inline void                                                                       \
-_fixedSizeVectorFill(TTarget & target,                                            \
-                     TPos const & pos,                                            \
-                     TData const & data,                                          \
-                     VectorLength_<SIZE> const & /*scope*/)                       \
-{                                                                                 \
-    fillVector(target, SEQAN_FIXED_VECTOR_FILL_VALUE_IMPL(pos, data, SIZE));      \
+template <typename TValue, typename TScore, typename TSeqHVal, typename TSeqVVal>
+inline SEQAN_FUNC_DISABLE_IF(IsScoreMatrix_<TScore>, TValue)
+score(Score<TValue, ScoreSimdWrapper<TScore> > const & me, TSeqHVal const & valH, TSeqVVal const & valV)
+{
+    return blend(scoreMismatch(me), scoreMatch(me), cmpEq(valH, valV));
 }
 
-SEQAN_FIXED_VECTOR_FILL_IMPL(2)
-SEQAN_FIXED_VECTOR_FILL_IMPL(4)
-SEQAN_FIXED_VECTOR_FILL_IMPL(8)
-SEQAN_FIXED_VECTOR_FILL_IMPL(16)
-SEQAN_FIXED_VECTOR_FILL_IMPL(32)
+// ----------------------------------------------------------------------------
+// Function score(); ScoreMatrix Wrapper
+// ----------------------------------------------------------------------------
 
-// TODO(rrahn): We should make the fixedSizeVectorFill the fall back gather interface, if gather is not implemented.
 template <typename TValue, typename TScore, typename TVal1, typename TVal2>
 inline SEQAN_FUNC_ENABLE_IF(IsScoreMatrix_<TScore>, TValue)
 score(Score<TValue, ScoreSimdWrapper<TScore> > const & sc, TVal1 const & val1, TVal2 const & val2)
 {
-    SEQAN_ASSERT(sc._baseScorePtr != nullptr);
-#ifdef __AVX2__
-    return gather(&sc._baseScorePtr->data_tab[0], val1 + val2);
-#else
-    TValue results;
-    _fixedSizeVectorFill(results, val1 + val2, sc._baseScorePtr->data_tab, VectorLength_<LENGTH<TVal1>::VALUE>());
-    return results;
-#endif
+    return gather(&sc._baseScore.data_tab[0], val1 + val2);
 }
 
 }
diff --git a/include/seqan/score/score_simple.h b/include/seqan/score/score_simple.h
index aa967fe..35e7cbb 100644
--- a/include/seqan/score/score_simple.h
+++ b/include/seqan/score/score_simple.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/seeds.h b/include/seqan/seeds.h
index c947f40..b7afc3c 100644
--- a/include/seqan/seeds.h
+++ b/include/seqan/seeds.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/seeds/banded_chain_alignment.h b/include/seqan/seeds/banded_chain_alignment.h
index d6b3739..0da9053 100644
--- a/include/seqan/seeds/banded_chain_alignment.h
+++ b/include/seqan/seeds/banded_chain_alignment.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/seeds/banded_chain_alignment_impl.h b/include/seqan/seeds/banded_chain_alignment_impl.h
index a99a14e..80eb7ef 100644
--- a/include/seqan/seeds/banded_chain_alignment_impl.h
+++ b/include/seqan/seeds/banded_chain_alignment_impl.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -89,9 +89,11 @@ template <typename TDist,
 inline bool _checkScoreOverflow(TDist const distance,
                                 Score<TScoreValue, TScoreSpec> const & score)
 {
-    auto mxScore = _max(scoreMatch(score), std::abs(scoreMismatch(score)));
-    return static_cast<decltype(BitsPerValue<TScoreValue>::VALUE)>(bitScanReverse(mxScore) + bitScanReverse(distance))
-            <= BitsPerValue<TScoreValue>::VALUE - 1;
+    using TBits = decltype(BitsPerValue<TScoreValue>::VALUE);
+    TScoreValue mxScore = _max(scoreMatch(score), std::abs(scoreMismatch(score)));
+
+    TBits bits = bitScanReverse(mxScore) + bitScanReverse(distance);
+    return bits <= BitsPerValue<TScoreValue>::VALUE - 1;
 }
 
 // ----------------------------------------------------------------------------
@@ -278,19 +280,19 @@ _horizontalCellInitialization(DPScout_<TDPCell, BandedChainAlignmentScout> const
 
 // Determines the various tracking options for the current dp matrix.
 template <typename TScout, typename TNavigator, typename TColumnDescriptor, typename TCellDescriptor, typename TFreeEndGaps,
-          typename TMatrixSpec, typename TGapCosts, typename TTracebackSpec>
+          typename TMatrixSpec, typename TGapCosts, typename TTracebackSpec, typename TExecPolicy>
 inline void _determineTrackingOptions(unsigned & res,
                                       TScout const & scout,
                                       TNavigator const & traceMatrixNavigator,
                                       TColumnDescriptor const & /*columnDescriptor*/,
                                       TCellDescriptor const & /*cellDescriptor*/,
-                                      DPProfile_<BandedChainAlignment_<TFreeEndGaps, TMatrixSpec>, TGapCosts, TTracebackSpec> const &)
+                                      DPProfile_<BandedChainAlignment_<TFreeEndGaps, TMatrixSpec>, TGapCosts, TTracebackSpec, TExecPolicy> const &)
 {
     if (coordinate(traceMatrixNavigator, +DPMatrixDimension_::HORIZONTAL) >=
         scout._dpScoutStatePtr->_horizontalNextGridOrigin)
     {
         // Matches an initialization row.
-        if (IsSameType<typename TColumnDescriptor::TLocation, PartialColumnBottom>::VALUE)
+        SEQAN_IF_CONSTEXPR (IsSameType<typename TColumnDescriptor::TLocation, PartialColumnBottom>::VALUE)
         {
             // Matches the cells that have to be stored for initializing the next matrix horizontally.
             if (coordinate(traceMatrixNavigator, +DPMatrixDimension_::VERTICAL) + traceMatrixNavigator._laneLeap ==
@@ -314,9 +316,9 @@ inline void _determineTrackingOptions(unsigned & res,
                 res |= BandedChainTracking::OPTION_STORE_INIT_COLUMN;
 
         // We are in the column that has to be tracked, if we are in the last cell.
-        if (IsSameType<TCellDescriptor, LastCell>::VALUE)
+        SEQAN_IF_CONSTEXPR (IsSameType<TCellDescriptor, LastCell>::VALUE)
         {
-            if (IsSameType<TMatrixSpec, BandedChainFinalDPMatrix>::VALUE)
+            SEQAN_IF_CONSTEXPR (IsSameType<TMatrixSpec, BandedChainFinalDPMatrix>::VALUE)
             {
                 if (IsFreeEndGap_<TFreeEndGaps, DPLastRow>::VALUE)
                     res |= BandedChainTracking::OPTION_IS_LAST_ROW;
@@ -329,18 +331,18 @@ inline void _determineTrackingOptions(unsigned & res,
 
         // We track the maximal score if we are in the final column
         // For the full column we need to check if we are beyond the initialization row.
-        if (IsSameType<typename TColumnDescriptor::TLocation, FullColumn>::VALUE)
+        SEQAN_IF_CONSTEXPR (IsSameType<typename TColumnDescriptor::TLocation, FullColumn>::VALUE)
         {
-            if (IsSameType<typename TColumnDescriptor::TColumnProperty, DPFinalColumn>::VALUE)
+            SEQAN_IF_CONSTEXPR (IsSameType<typename TColumnDescriptor::TColumnProperty, DPFinalColumn>::VALUE)
             {
-                if (IsSameType<TCellDescriptor, LastCell>::VALUE)
+                SEQAN_IF_CONSTEXPR (IsSameType<TCellDescriptor, LastCell>::VALUE)
                 {
                     res |= BandedChainTracking::OPTION_IS_LAST_COLUMN | BandedChainTracking::OPTION_IS_LAST_ROW;
                 }
                 else if (coordinate(traceMatrixNavigator, +DPMatrixDimension_::VERTICAL) >=
                          scout._dpScoutStatePtr->_verticalNextGridOrigin)
                 {
-                    if (IsSameType<TMatrixSpec, BandedChainFinalDPMatrix>::VALUE)
+                    SEQAN_IF_CONSTEXPR (IsSameType<TMatrixSpec, BandedChainFinalDPMatrix>::VALUE)
                     {
                         if (IsFreeEndGap_<TFreeEndGaps, DPLastColumn>::VALUE)
                             res |= BandedChainTracking::OPTION_IS_LAST_COLUMN;
@@ -354,15 +356,15 @@ inline void _determineTrackingOptions(unsigned & res,
         }
         else  // Banded version we track all scores - initialization row ends in first cell of final column
         {
-            if (IsSameType<typename TColumnDescriptor::TColumnProperty, DPFinalColumn>::VALUE)
+            SEQAN_IF_CONSTEXPR (IsSameType<typename TColumnDescriptor::TColumnProperty, DPFinalColumn>::VALUE)
             {
-                if (IsSameType<TCellDescriptor, LastCell>::VALUE)
+                SEQAN_IF_CONSTEXPR (IsSameType<TCellDescriptor, LastCell>::VALUE)
                 {
                     res |= BandedChainTracking::OPTION_IS_LAST_COLUMN | BandedChainTracking::OPTION_IS_LAST_ROW;
                 }
                 else
                 {
-                    if (IsSameType<TMatrixSpec, BandedChainFinalDPMatrix>::VALUE)
+                    SEQAN_IF_CONSTEXPR (IsSameType<TMatrixSpec, BandedChainFinalDPMatrix>::VALUE)
                     {
                         if (IsFreeEndGap_<TFreeEndGaps, DPLastColumn>::VALUE)
                             res |= BandedChainTracking::OPTION_IS_LAST_COLUMN;
@@ -405,64 +407,91 @@ _applyBandedChainTracking(TDPScout & scout,
 // ----------------------------------------------------------------------------
 
 // Overload of _computeCell function to add functionality specific to the bande chain alignment.
-template <typename TDPScout, typename TTraceMatrixNavigator, typename TScoreValue, typename TGapCosts,
-          typename TSeqHValue, typename TSeqVValue, typename TScoringScheme, typename TColumnDescriptor,
-          typename TCellDescriptor, typename TFreeEndGaps, typename TDPMatrixLocation, typename TTracebackConfig>
+template <typename TDPScout,
+          typename TTraceMatrixNavigator,
+          typename TDPCell,
+          typename TSeqHValue,
+          typename TSeqVValue,
+          typename TScoringScheme,
+          typename TColumnDescriptor,
+          typename TCellDescriptor,
+          typename TFreeEndGaps, typename TDPMatrixLocation, typename TGapCosts, typename TTracebackConfig, typename TExecPolicy>
 inline void
 _computeCell(TDPScout & scout,
              TTraceMatrixNavigator & traceMatrixNavigator,
-             DPCell_<TScoreValue, TGapCosts> & activeCell,
-             DPCell_<TScoreValue, TGapCosts> const & previousDiagonal,
-             DPCell_<TScoreValue, TGapCosts> const & previousHorizontal,
-             DPCell_<TScoreValue, TGapCosts> const & previousVertical,
+             TDPCell & current,
+             TDPCell & diagonal,
+             TDPCell const & horizontal,
+             TDPCell & vertical,
              TSeqHValue const & seqHVal,
              TSeqVValue const & seqVVal,
              TScoringScheme const & scoringScheme,
              TColumnDescriptor const &,
              TCellDescriptor const &,
-             DPProfile_<BandedChainAlignment_<TFreeEndGaps, TDPMatrixLocation>, TGapCosts, TracebackOn<TTracebackConfig> > const &)
+             DPProfile_<BandedChainAlignment_<TFreeEndGaps, TDPMatrixLocation>, TGapCosts, TracebackOn<TTracebackConfig>, TExecPolicy> const &)
 {
-    typedef DPProfile_<BandedChainAlignment_<TFreeEndGaps, TDPMatrixLocation>, TGapCosts, TracebackOn<TTracebackConfig> > TDPProfile;
+    typedef DPProfile_<BandedChainAlignment_<TFreeEndGaps, TDPMatrixLocation>,
+                       TGapCosts,
+                       TracebackOn<TTracebackConfig>,
+                       TExecPolicy> TDPProfile;
     typedef DPMetaColumn_<TDPProfile, TColumnDescriptor> TMetaColumnProfile;
 
     assignValue(
         traceMatrixNavigator,
-        _computeScore(activeCell, previousDiagonal, previousHorizontal, previousVertical, seqHVal, seqVVal,
+        _computeScore(current, diagonal, horizontal, vertical, seqHVal, seqVVal,
                       scoringScheme, typename RecursionDirection_<TMetaColumnProfile, TCellDescriptor>::Type(),
                       TDPProfile()));
+
     if (TrackingEnabled_<TMetaColumnProfile, TCellDescriptor>::VALUE)
-        _applyBandedChainTracking(scout, traceMatrixNavigator, activeCell, TColumnDescriptor(), TCellDescriptor(), TDPProfile());
+    {
+        _setVerticalScoreOfCell(current, _verticalScoreOfCell(vertical));
+        _applyBandedChainTracking(scout, traceMatrixNavigator, current, TColumnDescriptor(), TCellDescriptor(),
+                                  TDPProfile());
+    }
 }
 
 // ----------------------------------------------------------------------------
 // Function _computeCell()              [BandedChainAlignment, DPInitialColumn]
 // ----------------------------------------------------------------------------
 
-template <typename TDPScout, typename TDPTraceMatrixNavigator, typename TScoreValue, typename TGapCosts,
-          typename TSeqHValue, typename TSeqVValue, typename TScoringScheme, typename TColumnType, typename TCellDescriptor,
-          typename TSpec, typename TDPMatrixLocation, typename TTracebackConfig>
+template <typename TDPScout,
+          typename TDPTraceMatrixNavigator,
+          typename TDPCell,
+          typename TSeqHValue,
+          typename TSeqVValue,
+          typename TScoringScheme,
+          typename TColumnType,
+          typename TCellDescriptor,
+          typename TSpec, typename TDPMatrixLocation, typename TGapCosts, typename TTracebackConfig, typename TExecPolicy>
 inline void
 _computeCell(TDPScout & scout,
              TDPTraceMatrixNavigator & traceMatrixNavigator,
-             DPCell_<TScoreValue, TGapCosts> & activeCell,
-             DPCell_<TScoreValue, TGapCosts> const &,
-             DPCell_<TScoreValue, TGapCosts> const &,
-             DPCell_<TScoreValue, TGapCosts> const &,
+             TDPCell & current,
+             TDPCell & diagonal,
+             TDPCell const & horizontal,
+             TDPCell & vertical,
              TSeqHValue const &,
              TSeqVValue const &,
              TScoringScheme const & /*scoringScheme*/,
              MetaColumnDescriptor<DPInitialColumn, TColumnType> const & /*metaColumnDescriptor*/,
              TCellDescriptor const & /*cellDescriptor*/,
-             DPProfile_<BandedChainAlignment_<TSpec, TDPMatrixLocation>, TGapCosts, TracebackOn<TTracebackConfig> > const & /*dpProfile*/)
+             DPProfile_<BandedChainAlignment_<TSpec, TDPMatrixLocation>, TGapCosts, TracebackOn<TTracebackConfig>, TExecPolicy> const & /*dpProfile*/)
 {
-    typedef DPProfile_<BandedChainAlignment_<TSpec, TDPMatrixLocation>, TGapCosts, TracebackOn<TTracebackConfig> > TDPProfile;
+    typedef DPProfile_<BandedChainAlignment_<TSpec, TDPMatrixLocation>,
+                       TGapCosts,
+                       TracebackOn<TTracebackConfig>,
+                       TExecPolicy> TDPProfile;
     typedef MetaColumnDescriptor<DPInitialColumn, TColumnType> TColumnDescriptor;
     typedef DPMetaColumn_<TDPProfile, TColumnDescriptor> TMetaColumnProfile;
 
-    activeCell = _verticalCellInitialization(scout, traceMatrixNavigator);
-    assignValue(traceMatrixNavigator, +TraceBitMap_<>::NONE);
+    _scoreOfCell(diagonal) = _scoreOfCell(horizontal);
+    current = _verticalCellInitialization(scout, traceMatrixNavigator);
+    assignValue(traceMatrixNavigator, TraceBitMap_<>::NONE);
+    _scoreOfCell(vertical) = _scoreOfCell(current);
+    _setVerticalScoreOfCell(vertical, _verticalScoreOfCell(current));
     if (TrackingEnabled_<TMetaColumnProfile, TCellDescriptor>::VALUE)
-        _applyBandedChainTracking(scout, traceMatrixNavigator, activeCell, TColumnDescriptor(), TCellDescriptor(), TDPProfile());
+        _applyBandedChainTracking(scout, traceMatrixNavigator, current, TColumnDescriptor(), TCellDescriptor(),
+                                  TDPProfile());
 }
 
 // ----------------------------------------------------------------------------
@@ -482,7 +511,7 @@ _computeHorizontalInitCell(TDPScout & scout,
     typedef DPMetaColumn_<TDPProfile, TColumnDescriptor> TMetaColumnProfile;
 
     activeCell = _horizontalCellInitialization(scout, traceMatrixNavigator);
-    assignValue(traceMatrixNavigator, +TraceBitMap_<>::NONE);
+    assignValue(traceMatrixNavigator, TraceBitMap_<>::NONE);
     if (TrackingEnabled_<TMetaColumnProfile, TCellDescriptor>::VALUE)
         _applyBandedChainTracking(scout, traceMatrixNavigator, activeCell, TColumnDescriptor(), TCellDescriptor(), TDPProfile());
 }
@@ -492,49 +521,68 @@ _computeHorizontalInitCell(TDPScout & scout,
 // ----------------------------------------------------------------------------
 
 // For DPInnerColumn.
-template <typename TDPScout, typename TDPTraceMatrixNavigator, typename TScoreValue, typename TGapCosts,
-          typename TSeqHValue, typename TSeqVValue, typename TScoringScheme, typename TSpec, typename TDPMatrixLocation,
-          typename TTracebackConfig>
+template <typename TDPScout, typename TDPTraceMatrixNavigator,
+          typename TDPCell,
+          typename TSeqHValue,
+          typename TSeqVValue,
+          typename TScoringScheme,
+          typename TSpec, typename TDPMatrixLocation, typename TGapCosts, typename TTracebackConfig, typename TExecPolicy>
 inline void
 _computeCell(TDPScout & scout,
              TDPTraceMatrixNavigator & traceMatrixNavigator,
-             DPCell_<TScoreValue, TGapCosts> & activeCell,
-             DPCell_<TScoreValue, TGapCosts> const &,
-             DPCell_<TScoreValue, TGapCosts> const &,
-             DPCell_<TScoreValue, TGapCosts> const &,
+             TDPCell & current,
+             TDPCell & diagonal,
+             TDPCell const & horizontal,
+             TDPCell & vertical,
              TSeqHValue const &,
              TSeqVValue const &,
              TScoringScheme const &,
              MetaColumnDescriptor<DPInnerColumn, PartialColumnTop> const &,
              FirstCell const &,
-             DPProfile_<BandedChainAlignment_<TSpec, TDPMatrixLocation>, TGapCosts, TracebackOn<TTracebackConfig> > const &)
+             DPProfile_<BandedChainAlignment_<TSpec, TDPMatrixLocation>, TGapCosts, TracebackOn<TTracebackConfig>, TExecPolicy> const &)
 {
-    typedef DPProfile_<BandedChainAlignment_<TSpec, TDPMatrixLocation>, TGapCosts, TracebackOn<TTracebackConfig> > TDPProfile;
-    _computeHorizontalInitCell(scout, traceMatrixNavigator, activeCell,
+    typedef DPProfile_<BandedChainAlignment_<TSpec, TDPMatrixLocation>,
+                       TGapCosts,
+                       TracebackOn<TTracebackConfig>,
+                       TExecPolicy> TDPProfile;
+    _scoreOfCell(diagonal) = _scoreOfCell(horizontal);
+    _computeHorizontalInitCell(scout, traceMatrixNavigator, current,
                                MetaColumnDescriptor<DPInnerColumn, PartialColumnTop>(), FirstCell(), TDPProfile());
+    _scoreOfCell(vertical) = _scoreOfCell(current);
+    _setVerticalScoreOfCell(vertical, _verticalScoreOfCell(current));
 }
 
 // For DPFinalColumn.
-template <typename TDPScout, typename TDPTraceMatrixNavigator, typename TScoreValue, typename TGapCosts,
-          typename TSeqHValue, typename TSeqVValue, typename TScoringScheme, typename TSpec, typename TDPMatrixLocation,
-          typename TTracebackConfig>
+template <typename TDPScout,
+          typename TDPTraceMatrixNavigator,
+          typename TDPCell,
+          typename TSeqHValue,
+          typename TSeqVValue,
+          typename TScoringScheme,
+          typename TSpec, typename TDPMatrixLocation, typename TGapCosts, typename TTracebackConfig, typename TExecPolicy>
 inline void
 _computeCell(TDPScout & scout,
              TDPTraceMatrixNavigator & traceMatrixNavigator,
-             DPCell_<TScoreValue, TGapCosts> & activeCell,
-             DPCell_<TScoreValue, TGapCosts> const &,
-             DPCell_<TScoreValue, TGapCosts> const &,
-             DPCell_<TScoreValue, TGapCosts> const &,
+             TDPCell & current,
+             TDPCell & diagonal,
+             TDPCell const & horizontal,
+             TDPCell & vertical,
              TSeqHValue const &,
              TSeqVValue const &,
              TScoringScheme const &,
              MetaColumnDescriptor<DPFinalColumn, PartialColumnTop> const &,
              FirstCell const &,
-             DPProfile_<BandedChainAlignment_<TSpec, TDPMatrixLocation>, TGapCosts, TracebackOn<TTracebackConfig> > const &)
+             DPProfile_<BandedChainAlignment_<TSpec, TDPMatrixLocation>, TGapCosts, TracebackOn<TTracebackConfig>, TExecPolicy> const &)
 {
-    typedef DPProfile_<BandedChainAlignment_<TSpec, TDPMatrixLocation>, TGapCosts, TracebackOn<TTracebackConfig> > TDPProfile;
-    _computeHorizontalInitCell(scout, traceMatrixNavigator, activeCell,
+    typedef DPProfile_<BandedChainAlignment_<TSpec, TDPMatrixLocation>,
+                       TGapCosts,
+                       TracebackOn<TTracebackConfig>,
+                       TExecPolicy> TDPProfile;
+    _scoreOfCell(diagonal) = _scoreOfCell(horizontal);
+    _computeHorizontalInitCell(scout, traceMatrixNavigator, current,
                                MetaColumnDescriptor<DPFinalColumn, PartialColumnTop>(), FirstCell(), TDPProfile());
+    _scoreOfCell(vertical) = _scoreOfCell(current);
+    _setVerticalScoreOfCell(vertical, _verticalScoreOfCell(current));
 }
 
 // ----------------------------------------------------------------------------
@@ -542,49 +590,68 @@ _computeCell(TDPScout & scout,
 // ----------------------------------------------------------------------------
 
 // For DPInnerColumn.
-template <typename TDPScout, typename TDPTraceMatrixNavigator, typename TScoreValue, typename TGapCosts,
-          typename TSeqHValue, typename TSeqVValue, typename TScoringScheme, typename TSpec, typename TDPMatrixLocation,
-          typename TTracebackConfig>
+template <typename TDPScout,
+          typename TDPTraceMatrixNavigator,
+          typename TDPCell,
+          typename TSeqHValue,
+          typename TSeqVValue,
+          typename TScoringScheme,
+          typename TSpec, typename TDPMatrixLocation, typename TGapCosts, typename TTracebackConfig, typename TExecPolicy>
 inline void
 _computeCell(TDPScout & scout,
              TDPTraceMatrixNavigator & traceMatrixNavigator,
-             DPCell_<TScoreValue, TGapCosts> & activeCell,
-             DPCell_<TScoreValue, TGapCosts> const &,
-             DPCell_<TScoreValue, TGapCosts> const &,
-             DPCell_<TScoreValue, TGapCosts> const &,
+             TDPCell & current,
+             TDPCell & diagonal,
+             TDPCell const & horizontal,
+             TDPCell & vertical,
              TSeqHValue const &,
              TSeqVValue const &,
              TScoringScheme const &,
              MetaColumnDescriptor<DPInnerColumn, FullColumn> const &,
              FirstCell const &,
-             DPProfile_<BandedChainAlignment_<TSpec, TDPMatrixLocation>, TGapCosts, TracebackOn<TTracebackConfig> > const &)
+             DPProfile_<BandedChainAlignment_<TSpec, TDPMatrixLocation>, TGapCosts, TracebackOn<TTracebackConfig>, TExecPolicy> const &)
 {
-    typedef DPProfile_<BandedChainAlignment_<TSpec, TDPMatrixLocation>, TGapCosts, TracebackOn<TTracebackConfig> > TDPProfile;
-    _computeHorizontalInitCell(scout, traceMatrixNavigator, activeCell,
+    typedef DPProfile_<BandedChainAlignment_<TSpec, TDPMatrixLocation>,
+                       TGapCosts,
+                       TracebackOn<TTracebackConfig>,
+                       TExecPolicy> TDPProfile;
+    _scoreOfCell(diagonal) = _scoreOfCell(horizontal);
+    _computeHorizontalInitCell(scout, traceMatrixNavigator, current,
                                MetaColumnDescriptor<DPInnerColumn, FullColumn>(), FirstCell(), TDPProfile());
+    _scoreOfCell(vertical) = _scoreOfCell(current);
+    _setVerticalScoreOfCell(vertical, _verticalScoreOfCell(current));
 }
 
 // For DPFinalColumn.
-template <typename TDPScout, typename TDPTraceMatrixNavigator, typename TScoreValue, typename TGapCosts,
-          typename TSeqHValue, typename TSeqVValue, typename TScoringScheme, typename TSpec, typename TDPMatrixLocation,
-          typename TTracebackConfig>
+template <typename TDPScout,
+          typename TDPTraceMatrixNavigator,
+          typename TDPCell,
+          typename TSeqHValue,
+          typename TSeqVValue,
+          typename TScoringScheme,
+          typename TSpec, typename TDPMatrixLocation, typename TGapCosts, typename TTracebackConfig, typename TExecPolicy>
 inline void
 _computeCell(TDPScout & scout,
              TDPTraceMatrixNavigator & traceMatrixNavigator,
-             DPCell_<TScoreValue, TGapCosts> & activeCell,
-             DPCell_<TScoreValue, TGapCosts> const &,
-             DPCell_<TScoreValue, TGapCosts> const &,
-             DPCell_<TScoreValue, TGapCosts> const &,
+             TDPCell & current,
+             TDPCell & diagonal,
+             TDPCell const & horizontal,
+             TDPCell & vertical,
              TSeqHValue const &,
              TSeqVValue const &,
              TScoringScheme const &,
              MetaColumnDescriptor<DPFinalColumn, FullColumn> const &,
              FirstCell const &,
-             DPProfile_<BandedChainAlignment_<TSpec, TDPMatrixLocation>, TGapCosts, TracebackOn<TTracebackConfig> > const &)
+             DPProfile_<BandedChainAlignment_<TSpec, TDPMatrixLocation>, TGapCosts, TracebackOn<TTracebackConfig>, TExecPolicy> const &)
 {
-    typedef DPProfile_<BandedChainAlignment_<TSpec, TDPMatrixLocation>, TGapCosts, TracebackOn<TTracebackConfig> > TDPProfile;
-    _computeHorizontalInitCell(scout, traceMatrixNavigator, activeCell,
+    typedef DPProfile_<BandedChainAlignment_<TSpec, TDPMatrixLocation>,
+                      TGapCosts,
+                      TracebackOn<TTracebackConfig>,
+                      TExecPolicy> TDPProfile;
+    _scoreOfCell(diagonal) = _scoreOfCell(horizontal);
+    _computeHorizontalInitCell(scout, traceMatrixNavigator, current,
                                MetaColumnDescriptor<DPFinalColumn, FullColumn>(), FirstCell(), TDPProfile());
+    vertical = current;
 }
 
 // ----------------------------------------------------------------------------
@@ -678,20 +745,22 @@ void _printTraceSegments(T const & globalTraceSet)
 
 // Handles the initialization of cells for the very first dp matrix.
 template <typename TScoutState, typename TSizeH, typename TSizeV, typename TScoreScheme, typename TFreeEndGaps,
-          typename TDPMatrixLocation, typename TGapCosts, typename TTraceback>
+          typename TDPMatrixLocation, typename TGapCosts, typename TTraceback, typename TExecPolicy>
 inline void
 _initiaizeBeginningOfBandedChain(TScoutState & scoutState,
                                  TSizeH sizeH,
                                  TSizeV sizeV,
                                  TScoreScheme const & scoreScheme,
-                                 DPProfile_<BandedChainAlignment_<TFreeEndGaps, TDPMatrixLocation>, TGapCosts, TTraceback> const &)
+                                 DPProfile_<BandedChainAlignment_<TFreeEndGaps, TDPMatrixLocation>, TGapCosts, TTraceback, TExecPolicy> const &)
 {
     typedef typename TScoutState::TInitCell TInitCell;
     typedef typename Value<TInitCell, 3>::Type TDPCell;
-    typedef DPProfile_<BandedChainAlignment_<TFreeEndGaps, TDPMatrixLocation>, TGapCosts, TTraceback> TDPProfile;
+    typedef DPProfile_<BandedChainAlignment_<TFreeEndGaps, TDPMatrixLocation>, TGapCosts, TTraceback, TExecPolicy> TDPProfile;
 
     TDPCell dpInitCellHorizontal;
-    _computeScore(dpInitCellHorizontal, TDPCell(), TDPCell(), TDPCell(), Nothing(), Nothing(), Nothing(),
+    TDPCell dummy;
+    _computeScore(dpInitCellHorizontal, dummy, dummy, dummy,
+                  Nothing(), Nothing(), Nothing(),
                   RecursionDirectionZero(), TDPProfile());
     scoutState._nextInitializationCells.insert(TInitCell(0,0, dpInitCellHorizontal));
 
@@ -699,26 +768,31 @@ _initiaizeBeginningOfBandedChain(TScoutState & scoutState,
     {
         TDPCell prevCell = dpInitCellHorizontal;
         if (IsFreeEndGap_<TFreeEndGaps, DPFirstRow>::VALUE)
-            _computeScore(dpInitCellHorizontal, TDPCell(), TDPCell(), TDPCell(), Nothing(), Nothing(), scoreScheme,
+            _computeScore(dpInitCellHorizontal, dummy, dummy, dummy,
+                  Nothing(), Nothing(), scoreScheme,
                   RecursionDirectionZero(), TDPProfile());
         else
-            _computeScore(dpInitCellHorizontal, TDPCell(), prevCell, TDPCell(), Nothing(), Nothing(), scoreScheme,
+            _computeScore(dpInitCellHorizontal, dummy, prevCell, dummy,
+                  Nothing(), Nothing(), scoreScheme,
                   RecursionDirectionHorizontal(), TDPProfile());
         scoutState._nextInitializationCells.insert(TInitCell(activeColumn, 0, dpInitCellHorizontal));
     }
 
     TDPCell dpInitCellVertical;
-    _computeScore(dpInitCellVertical, TDPCell(), TDPCell(), TDPCell(), Nothing(), Nothing(), Nothing(),
+    _computeScore(dpInitCellVertical, dummy, dummy, dummy,
+                  Nothing(), Nothing(), Nothing(),
                   RecursionDirectionZero(), TDPProfile());
     for(TSizeV activeRow = 1; activeRow < sizeV; ++activeRow)
     {
-        TDPCell prevCell = dpInitCellVertical;
+//        TDPCell prevCell = dpInitCellVertical;
         if (IsFreeEndGap_<TFreeEndGaps, DPFirstColumn>::VALUE)
-            _computeScore(dpInitCellVertical, TDPCell(), TDPCell(), TDPCell(), Nothing(), Nothing(), scoreScheme,
-                  RecursionDirectionZero(), TDPProfile());
+            _computeScore(dpInitCellVertical, dummy, dummy, dummy,
+                          Nothing(), Nothing(), scoreScheme,
+                          RecursionDirectionZero(), TDPProfile());
         else
-            _computeScore(dpInitCellVertical, TDPCell(), TDPCell(), prevCell, Nothing(), Nothing(), scoreScheme,
-                  RecursionDirectionVertical(), TDPProfile());
+            _computeScore(dummy, dummy, dummy, dpInitCellVertical,
+                          Nothing(), Nothing(), scoreScheme,
+                          RecursionDirectionVertical(), TDPProfile());
         scoutState._nextInitializationCells.insert(TInitCell(0, activeRow, dpInitCellVertical));
     }
 
@@ -732,7 +806,7 @@ _initiaizeBeginningOfBandedChain(TScoutState & scoutState,
 // first gap-area followed by the first anchor.
 template <typename TTraceSet, typename TScoutState, typename TSeed, typename TSeqH, typename TSeqV,
           typename TScoreScheme, typename TFreeEndGaps, typename TDPMatrixLocation, typename TGaps,
-          typename TTracebackConfig>
+          typename TTracebackConfig, typename TExecPolicy>
 inline typename Value<TScoreScheme>::Type
 _initializeBandedChain(TTraceSet & globalTraceSet,
                        TScoutState & scoutState,
@@ -742,7 +816,7 @@ _initializeBandedChain(TTraceSet & globalTraceSet,
                        TSeqV const & seqV,
                        TScoreScheme const & scoreSchemeAnchor,
                        TScoreScheme const & scoreSchemeGap,
-                       DPProfile_<BandedChainAlignment_<TFreeEndGaps, TDPMatrixLocation>, TGaps, TracebackOn<TTracebackConfig> > const & dpProfile)
+                       DPProfile_<BandedChainAlignment_<TFreeEndGaps, TDPMatrixLocation>, TGaps, TracebackOn<TTracebackConfig>, TExecPolicy> const & dpProfile)
 {
     typedef typename Infix<TSeqH const>::Type TInfixH;
     typedef typename Infix<TSeqV const>::Type TInfixV;
@@ -798,7 +872,7 @@ _initializeBandedChain(TTraceSet & globalTraceSet,
         // Call the basic alignment function.
         score = _computeAlignment(globalTraceSet, scoutState, infixH, infixV, scoreSchemeGap, DPBandConfig<BandOff>(),
                                   DPProfile_<BandedChainAlignment_<TFreeEndGaps, BandedChainInitialDPMatrix>, TGaps,
-                                             TracebackOn<TTracebackConfig> >());
+                                             TracebackOn<TTracebackConfig>, TExecPolicy>());
     }
     else
     {
@@ -854,17 +928,17 @@ _initializeBandedChain(TTraceSet & globalTraceSet,
             resize(localTraceSet, 1);
             DPScoutState_<Default> noScout;
             score = _computeAlignment(localTraceSet[0], noScout, infixH, infixV, scoreSchemeGap, band,
-                      DPProfile_<GlobalAlignment_<TFreeEndGaps>, TGaps, TracebackOn<TTracebackConfig> >());
+                      DPProfile_<GlobalAlignment_<TFreeEndGaps>, TGaps, TracebackOn<TTracebackConfig>, TExecPolicy>());
         }
         else
             score = _computeAlignment(localTraceSet, scoutState, infixH, infixV, scoreSchemeGap, band,
-                      DPProfile_<BandedChainAlignment_<TFreeEndGaps, BandedChainInitialDPMatrix>, TGaps, TracebackOn<TTracebackConfig> >());
+                      DPProfile_<BandedChainAlignment_<TFreeEndGaps, BandedChainInitialDPMatrix>, TGaps, TracebackOn<TTracebackConfig>, TExecPolicy>());
     }
     else
     {
         if (gridEnd.i1 == length(seqH) && gridEnd.i2 == length(seqV))  // The anchor crosses the end of the matrix.
             score = _computeAlignment(localTraceSet, scoutState, infixH, infixV, scoreSchemeGap, band,
-                              DPProfile_<BandedChainAlignment_<TFreeEndGaps, BandedChainFinalDPMatrix>, TGaps, TracebackOn<TTracebackConfig> >());
+                              DPProfile_<BandedChainAlignment_<TFreeEndGaps, BandedChainFinalDPMatrix>, TGaps, TracebackOn<TTracebackConfig>, TExecPolicy>());
         else
             score = _computeAlignment(localTraceSet, scoutState, infixH, infixV, scoreSchemeGap, band, dpProfile);
     }
@@ -892,7 +966,8 @@ _initializeBandedChain(TTraceSet & globalTraceSet,
 // ----------------------------------------------------------------------------
 
 template <typename TTraceSet, typename TDPScoutState, typename TSeed, typename TSeqH, typename TSeqV,
-          typename TScoreScheme, typename TFreeEndGaps, typename TDPMatrixLocation, typename TGaps, typename TTracebackSpec>
+          typename TScoreScheme, typename TFreeEndGaps, typename TDPMatrixLocation, typename TGaps, typename TTracebackSpec,
+          typename TExecPolicy>
 inline typename Value<TScoreScheme>::Type
 _computeGapArea(TTraceSet & globalTraceSet,
                 TDPScoutState & scoutState,
@@ -901,7 +976,7 @@ _computeGapArea(TTraceSet & globalTraceSet,
                 TSeqH const & seqH,
                 TSeqV const & seqV,
                 TScoreScheme const & scoreScheme,
-                DPProfile_<BandedChainAlignment_<TFreeEndGaps, TDPMatrixLocation>, TGaps, TracebackOn<TTracebackSpec> > const & dpProfile)
+                DPProfile_<BandedChainAlignment_<TFreeEndGaps, TDPMatrixLocation>, TGaps, TracebackOn<TTracebackSpec>, TExecPolicy> const & dpProfile)
 {
     typedef typename Infix<TSeqH const>::Type TInfixH;
     typedef typename Infix<TSeqV const>::Type TInfixV;
@@ -953,7 +1028,8 @@ _computeGapArea(TTraceSet & globalTraceSet,
 // ----------------------------------------------------------------------------
 
 template <typename TTraceSet, typename TDPScoutState, typename TSeed, typename TSeqH, typename TSeqV,
-          typename TScoreScheme, typename TFreeEndGaps, typename TDPMatrixLocation, typename TGaps, typename TTracebackSpec>
+          typename TScoreScheme, typename TFreeEndGaps, typename TDPMatrixLocation, typename TGaps, typename TTracebackSpec,
+          typename TExecPolicy>
 inline typename Value<TScoreScheme>::Type
 _computeAnchorArea(TTraceSet & globalTraceSet,
                    TDPScoutState & scoutState,
@@ -962,7 +1038,7 @@ _computeAnchorArea(TTraceSet & globalTraceSet,
                    TSeqH const & seqH,
                    TSeqV const & seqV,
                    TScoreScheme const & scoreScheme,
-                   DPProfile_<BandedChainAlignment_<TFreeEndGaps, TDPMatrixLocation>, TGaps, TracebackOn<TTracebackSpec> > const & dpProfile)
+                   DPProfile_<BandedChainAlignment_<TFreeEndGaps, TDPMatrixLocation>, TGaps, TracebackOn<TTracebackSpec>, TExecPolicy> const & dpProfile)
 {
     typedef typename Infix<TSeqH const>::Type TInfixH;
     typedef typename Infix<TSeqV const>::Type TInfixV;
@@ -1025,7 +1101,8 @@ _computeAnchorArea(TTraceSet & globalTraceSet,
 // ----------------------------------------------------------------------------
 
 template <typename TTraceSet, typename TDPScoutState, typename TSeed, typename TSeqH, typename TSeqV,
-          typename TScoreScheme, typename TFreeEndGaps, typename TDPMatrixLocation, typename TGaps, typename TTracebackConfig>
+          typename TScoreScheme, typename TFreeEndGaps, typename TDPMatrixLocation, typename TGaps, typename TTracebackConfig,
+          typename TExecPolicy>
 inline typename Value<TScoreScheme>::Type
 _finishBandedChain(TTraceSet & globalTraceSet,
                    TDPScoutState & dpScoutState,
@@ -1035,7 +1112,7 @@ _finishBandedChain(TTraceSet & globalTraceSet,
                    TSeqV const & seqV,
                    TScoreScheme const & scoreSchemeAnchor,
                    TScoreScheme const & scoreSchemeGap,
-                   DPProfile_<BandedChainAlignment_<TFreeEndGaps, TDPMatrixLocation>, TGaps, TracebackOn<TTracebackConfig> > const & dpProfile)
+                   DPProfile_<BandedChainAlignment_<TFreeEndGaps, TDPMatrixLocation>, TGaps, TracebackOn<TTracebackConfig>, TExecPolicy> const & dpProfile)
 {
     //typedef typename Position<TSeqH const>::Type TPosH;
     //typedef typename Position<TSeqV const>::Type TPosV;
@@ -1106,7 +1183,7 @@ _finishBandedChain(TTraceSet & globalTraceSet,
             // Compute the last anchor which crosses the end of the global grid.
         clear(localTraceSet);
         TScoreValue score = _computeAlignment(localTraceSet, dpScoutState, infixH, infixV, scoreSchemeAnchor, band,
-                                  DPProfile_<BandedChainAlignment_<TFreeEndGaps, BandedChainFinalDPMatrix>, TGaps, TracebackOn<TTracebackConfig> >());
+                                  DPProfile_<BandedChainAlignment_<TFreeEndGaps, BandedChainFinalDPMatrix>, TGaps, TracebackOn<TTracebackConfig>, TExecPolicy>());
 
         _adaptLocalTracesToGlobalGrid(localTraceSet, gridBegin);
         if (!empty(localTraceSet))
@@ -1157,7 +1234,7 @@ _finishBandedChain(TTraceSet & globalTraceSet,
     clear(localTraceSet);
     score = _computeAlignment(localTraceSet, dpScoutState, suffix(seqH, gridBegin.i1), suffix(seqV,gridBegin.i2),
                               scoreSchemeGap, DPBandConfig<BandOff>(), DPProfile_<BandedChainAlignment_<TFreeEndGaps,
-                              BandedChainFinalDPMatrix>, TGaps, TracebackOn<TTracebackConfig> >());
+                              BandedChainFinalDPMatrix>, TGaps, TracebackOn<TTracebackConfig>, TExecPolicy>());
 
     _adaptLocalTracesToGlobalGrid(localTraceSet, gridBegin);
     if (!empty(localTraceSet))
@@ -1170,7 +1247,8 @@ _finishBandedChain(TTraceSet & globalTraceSet,
 // ----------------------------------------------------------------------------
 
 template <typename TGapScheme, typename TTraceTarget, typename TScoutState, typename TSequenceH, typename TSequenceV,
-          typename TScoreScheme, typename TBandSwitch, typename TAlignmentAlgorithm, typename TTraceFlag>
+          typename TScoreScheme, typename TBandSwitch, typename TAlignmentAlgorithm, typename TTraceFlag,
+          typename TExecPolicy>
 inline typename Value<TScoreScheme>::Type
 _computeAlignment(TTraceTarget & traceSegments,
                   TScoutState & scoutState,
@@ -1178,10 +1256,10 @@ _computeAlignment(TTraceTarget & traceSegments,
                   TSequenceV const & seqV,
                   TScoreScheme const & scoreScheme,
                   DPBandConfig<TBandSwitch> const & band,
-                  DPProfile_<TAlignmentAlgorithm, TGapScheme, TTraceFlag> const & dpProfile)
+                  DPProfile_<TAlignmentAlgorithm, TGapScheme, TTraceFlag, TExecPolicy> const & dpProfile)
 {
     typedef typename Value<TScoreScheme>::Type TScoreValue;
-    typedef DPContext<TScoreValue, TGapScheme> TDPContext;
+    typedef DPContext<DPCell_<TScoreValue, TGapScheme>, typename TraceBitMap_<TScoreValue>::Type> TDPContext;
     TDPContext dpContext;
     return _computeAlignment(dpContext, traceSegments, scoutState, seqH, seqV, scoreScheme, band, dpProfile);
 }
@@ -1195,7 +1273,7 @@ _computeAlignment(TTraceTarget & traceSegments,
 // the gap between them using a standard dp algorithm.
 template <typename TTraceSet, typename TSeedSet, typename TSequenceH, typename TSequenceV, typename TScoreValue,
           typename TScoreSpecAnchor, typename TScoreSpecGap, typename TFreeEndGaps, typename TDPMatrixLocation,
-          typename TGapSpec, typename TTracebackConfig>
+          typename TGapSpec, typename TTracebackConfig, typename TExecPolicy>
 inline TScoreValue
 _computeAlignment(TTraceSet & globalTraceSet,
                   TSeedSet const & seedSet,
@@ -1205,10 +1283,8 @@ _computeAlignment(TTraceSet & globalTraceSet,
                   Score<TScoreValue, TScoreSpecGap> const & scoreSchemeGap,
                   unsigned bandExtension,
                   DPProfile_<BandedChainAlignment_<TFreeEndGaps, TDPMatrixLocation>, TGapSpec,
-                             TracebackOn<TTracebackConfig> > const & profile)
+                             TracebackOn<TTracebackConfig>, TExecPolicy> const & profile)
 {
-    //typedef DPProfile_<BandedChainAlignment_<TFreeEndGaps, TDPMatrixLocation>, TGapSpec, TracebackOn<TTracebackConfig> > TAlignmentProfile;
-
     typedef typename Position<TSequenceH>::Type TPosH;
     typedef typename Position<TSequenceV>::Type TPosV;
     typedef typename Iterator<TSeedSet const, Standard>::Type TSeedSetIterator;
@@ -1225,7 +1301,7 @@ _computeAlignment(TTraceSet & globalTraceSet,
 
     // Handle case of empty seed set.
     if (length(seedSet) < 1)
-        return MinValue<TScoreValue>::VALUE;
+        return std::numeric_limits<TScoreValue>::min();
 
     // Find the first anchor that is not covered by the region between the beginning of the matrix and the next anchor
     // considering the minbandwidh parameter.
@@ -1259,7 +1335,7 @@ _computeAlignment(TTraceSet & globalTraceSet,
             TTraceSet localTraceSet;
             score = _computeAlignment(localTraceSet, scoutState, suffix(seqH, gridBeginH), suffix(seqV, gridBeginV),
                               scoreSchemeGap, DPBandConfig<BandOff>(), DPProfile_<BandedChainAlignment_<TFreeEndGaps,
-                              BandedChainFinalDPMatrix>, TGapSpec, TracebackOn<TTracebackConfig> >());
+                              BandedChainFinalDPMatrix>, TGapSpec, TracebackOn<TTracebackConfig>, TExecPolicy>());
             _adaptLocalTracesToGlobalGrid(localTraceSet, Pair<TPosH, TPosV>(gridBeginH, gridBeginV));
             _glueTracebacks(globalTraceSet, localTraceSet);
         }
diff --git a/include/seqan/seeds/banded_chain_alignment_profile.h b/include/seqan/seeds/banded_chain_alignment_profile.h
index e7ea493..6977d4c 100644
--- a/include/seqan/seeds/banded_chain_alignment_profile.h
+++ b/include/seqan/seeds/banded_chain_alignment_profile.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -85,8 +85,9 @@ struct BandedChainAlignment_{};
 // Class DPMetaColumn                                              [FullColumn]
 // ----------------------------------------------------------------------------
 
-template <typename TFreeEndGaps, typename TDPMatrixLocation, typename TGapCosts, typename TTraceback, typename TColumnType>
-struct DPMetaColumn_<DPProfile_<BandedChainAlignment_<TFreeEndGaps, TDPMatrixLocation>, TGapCosts, TTraceback>,
+template <typename TFreeEndGaps, typename TDPMatrixLocation, typename TGapCosts, typename TTraceback, typename TExecPolicy,
+          typename TColumnType>
+struct DPMetaColumn_<DPProfile_<BandedChainAlignment_<TFreeEndGaps, TDPMatrixLocation>, TGapCosts, TTraceback, TExecPolicy>,
                     MetaColumnDescriptor<TColumnType, FullColumn> >
 {
     // If InitialColumn -> replaced, replaced, replaced
@@ -106,8 +107,9 @@ struct DPMetaColumn_<DPProfile_<BandedChainAlignment_<TFreeEndGaps, TDPMatrixLoc
 // Class DPMetaColumn                                        [PartialColumnTop]
 // ----------------------------------------------------------------------------
 
-template <typename TFreeEndGaps, typename TDPMatrixLocation, typename TGapCosts, typename TTraceback, typename TColumnType>
-struct DPMetaColumn_<DPProfile_<BandedChainAlignment_<TFreeEndGaps, TDPMatrixLocation>, TGapCosts, TTraceback>,
+template <typename TFreeEndGaps, typename TDPMatrixLocation, typename TGapCosts, typename TTraceback, typename TExecPolicy,
+          typename TColumnType>
+struct DPMetaColumn_<DPProfile_<BandedChainAlignment_<TFreeEndGaps, TDPMatrixLocation>, TGapCosts, TTraceback, TExecPolicy>,
                     MetaColumnDescriptor<TColumnType, PartialColumnTop> >
 {
     // If InitialColumn -> replaced, replaced, replaced
@@ -127,8 +129,9 @@ struct DPMetaColumn_<DPProfile_<BandedChainAlignment_<TFreeEndGaps, TDPMatrixLoc
 // Class DPMetaColumn                                      [PartialColumnMiddle]
 // ----------------------------------------------------------------------------
 
-template <typename TFreeEndGaps, typename TDPMatrixLocation, typename TGapCosts, typename TTraceback, typename TColumnType>
-struct DPMetaColumn_<DPProfile_<BandedChainAlignment_<TFreeEndGaps, TDPMatrixLocation>, TGapCosts, TTraceback>,
+template <typename TFreeEndGaps, typename TDPMatrixLocation, typename TGapCosts, typename TTraceback, typename TExecPolicy,
+          typename TColumnType>
+struct DPMetaColumn_<DPProfile_<BandedChainAlignment_<TFreeEndGaps, TDPMatrixLocation>, TGapCosts, TTraceback, TExecPolicy>,
                     MetaColumnDescriptor<TColumnType, PartialColumnMiddle> >
 {
     // If InitialColumn -> replaced, replaced, replaced
@@ -148,9 +151,10 @@ struct DPMetaColumn_<DPProfile_<BandedChainAlignment_<TFreeEndGaps, TDPMatrixLoc
 // Class DPMetaColumn                                      [PartialColumnBottom]
 // ----------------------------------------------------------------------------
 
-template <typename TFreeEndGaps, typename TDPMatrixLocation, typename TGapCosts, typename TTraceback, typename TColumnType>
-struct DPMetaColumn_<DPProfile_<BandedChainAlignment_<TFreeEndGaps, TDPMatrixLocation>, TGapCosts, TTraceback>,
-                    MetaColumnDescriptor<TColumnType, PartialColumnBottom> >
+template <typename TFreeEndGaps, typename TDPMatrixLocation, typename TGapCosts, typename TTraceback, typename TExecPolicy,
+          typename TColumnType>
+struct DPMetaColumn_<DPProfile_<BandedChainAlignment_<TFreeEndGaps, TDPMatrixLocation>, TGapCosts, TTraceback, TExecPolicy>,
+                     MetaColumnDescriptor<TColumnType, PartialColumnBottom> >
 {
     // If InitialColumn -> replaced, replaced, replaced
     // If InnerColumn -> UpperDiagonal, All, All
@@ -200,7 +204,7 @@ template <typename TAlignConfig, typename TGapCosts, typename TGapsPlacement>
 struct SetupBandedChainAlignmentProfile_
 {
     typedef typename SubstituteAlignConfig_<TAlignConfig>::Type TFreeEndGaps_;
-    typedef DPProfile_<BandedChainAlignment_<TFreeEndGaps_, BandedChainInnerDPMatrix>, TGapCosts, TracebackOn<TracebackConfig_<CompleteTrace,TGapsPlacement> > > Type;
+    typedef DPProfile_<BandedChainAlignment_<TFreeEndGaps_, BandedChainInnerDPMatrix>, TGapCosts, TracebackOn<TracebackConfig_<CompleteTrace,TGapsPlacement> >, Serial> Type;
 };
 
 
diff --git a/include/seqan/seeds/banded_chain_alignment_scout.h b/include/seqan/seeds/banded_chain_alignment_scout.h
index 02f45f4..520de3e 100644
--- a/include/seqan/seeds/banded_chain_alignment_scout.h
+++ b/include/seqan/seeds/banded_chain_alignment_scout.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/seeds/banded_chain_alignment_traceback.h b/include/seqan/seeds/banded_chain_alignment_traceback.h
index 40970b2..37bc64f 100644
--- a/include/seqan/seeds/banded_chain_alignment_traceback.h
+++ b/include/seqan/seeds/banded_chain_alignment_traceback.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -59,13 +59,13 @@ namespace seqan {
 // Metafunction PreferGapsAtEnd_
 // ----------------------------------------------------------------------------
 
-template <typename TFreeEndGaps, typename TMatrixSpec, typename TTracebackSpec>
+template <typename TFreeEndGaps, typename TMatrixSpec, typename TTracebackSpec, typename TExecPolicy>
 struct PreferGapsAtEnd_<DPProfile_<BandedChainAlignment_<TFreeEndGaps, TMatrixSpec>,
-                                   AffineGaps, TTracebackSpec> > : False{};
+                                   AffineGaps, TTracebackSpec, TExecPolicy> > : False{};
 
-template <typename TFreeEndGaps, typename TTracebackSpec>
+template <typename TFreeEndGaps, typename TTracebackSpec, typename TExecPolicy>
 struct PreferGapsAtEnd_<DPProfile_<BandedChainAlignment_<TFreeEndGaps, BandedChainFinalDPMatrix>,
-                                   AffineGaps, TTracebackSpec> > : True{};
+                                   AffineGaps, TTracebackSpec, TExecPolicy> > : True{};
 
 // ============================================================================
 // Functions
@@ -235,7 +235,7 @@ _correctDPCellForAffineGaps(DPCell_<TScoreValue, AffineGaps> & dpCell, TTraceVal
 
 template<typename TTarget, typename TDPTraceMatrixNavigator, typename TDPCell, typename TScoutSpec,
          typename TSequenceH, typename TSequenceV, typename TBandFlag, typename TFreeEndGaps, typename TDPMatrixLocation,
-         typename TGapCosts, typename TTracebackSpec>
+         typename TGapCosts, typename TTracebackSpec, typename TExecPolicy>
 void _computeTraceback(TTarget & target,
                        TDPTraceMatrixNavigator & matrixNavigator,
                        unsigned maxHostPosition,
@@ -243,7 +243,7 @@ void _computeTraceback(TTarget & target,
                        TSequenceH const & seqH,
                        TSequenceV const & seqV,
                        DPBandConfig<TBandFlag> const & band,
-                       DPProfile_<BandedChainAlignment_<TFreeEndGaps, TDPMatrixLocation>, TGapCosts, TTracebackSpec> const & dpProfile)
+                       DPProfile_<BandedChainAlignment_<TFreeEndGaps, TDPMatrixLocation>, TGapCosts, TTracebackSpec, TExecPolicy> const & dpProfile)
 {
     typedef DPScout_<TDPCell, TScoutSpec> TDPScout_;
     typedef typename TDPScout_::TScoutState TScoutState_;
@@ -257,7 +257,7 @@ void _computeTraceback(TTarget & target,
     typedef typename Size<TSequenceV>::Type TSizeSeqV;
     typedef typename TraceBitMap_<>::Type TTraceValue;
 
-    if (IsSameType<TTracebackSpec, TracebackOff>::VALUE)
+    SEQAN_IF_CONSTEXPR (IsSameType<TTracebackSpec, TracebackOff>::VALUE)
         return;
 
     TSizeSeqH seqHSize = length(seqH);
@@ -283,14 +283,14 @@ void _computeTraceback(TTarget & target,
                                                           band, seqHSize, seqVSize);
 
     // Record trailing gaps if any.
-    if (IsSameType<TDPMatrixLocation, BandedChainFinalDPMatrix>::VALUE)
+    SEQAN_IF_CONSTEXPR (IsSameType<TDPMatrixLocation, BandedChainFinalDPMatrix>::VALUE)
     {
         if (tracebackCoordinator._currRow != seqVSize)
             _recordSegment(target, seqHSize, tracebackCoordinator._currRow, seqVSize - tracebackCoordinator._currRow,
-                           +TraceBitMap_<>::VERTICAL);
+                           TraceBitMap_<>::VERTICAL);
         if (tracebackCoordinator._currColumn != seqHSize)
             _recordSegment(target, tracebackCoordinator._currColumn, tracebackCoordinator._currRow, seqHSize -
-                           tracebackCoordinator._currColumn, +TraceBitMap_<>::HORIZONTAL);
+                           tracebackCoordinator._currColumn, TraceBitMap_<>::HORIZONTAL);
 
         _computeTraceback(target, matrixNavigator, position(matrixNavigator), seqHSize, seqVSize, band, dpProfile);
         return;
@@ -298,7 +298,7 @@ void _computeTraceback(TTarget & target,
 
     TSize fragmentLength = 0;
     TTarget tmp;
-    while(!_hasReachedEnd(tracebackCoordinator) && traceValue != +TraceBitMap_<>::NONE)
+    while(!_hasReachedEnd(tracebackCoordinator) && traceValue != TraceBitMap_<>::NONE)
         _doTraceback(tmp, matrixNavigator, traceValue, lastTraceValue, fragmentLength, tracebackCoordinator, TGapCosts(), TIsGapsLeft());
 
     TSignedPosition horizontalInitPos = static_cast<TSignedPosition>(tracebackCoordinator._currColumn) -
@@ -332,22 +332,22 @@ void _computeTraceback(TTarget & target,
         _computeTraceback(target, matrixNavigator, position(matrixNavigator), seqHSize, seqVSize, band, dpProfile);
     }
 
-    if (IsSameType<TDPMatrixLocation, BandedChainInitialDPMatrix>::VALUE)
+    SEQAN_IF_CONSTEXPR (IsSameType<TDPMatrixLocation, BandedChainInitialDPMatrix>::VALUE)
     {
         TPosition currCol = coordinate(matrixNavigator, +DPMatrixDimension_::HORIZONTAL);
         TPosition currRow = coordinate(matrixNavigator, +DPMatrixDimension_::VERTICAL);
 
         // Correct the row position.
-        if (IsSameType<TBandFlag, BandOn>::VALUE)
+        SEQAN_IF_CONSTEXPR (IsSameType<TBandFlag, BandOn>::VALUE)
             if (upperDiagonal(band) > 0)
                 if (currCol < tracebackCoordinator._breakpoint1)
                     if (currCol < tracebackCoordinator._breakpoint2)
                         currRow -= length(container(matrixNavigator), +DPMatrixDimension_::VERTICAL) - 1 + lowerDiagonal(band) - currCol;
         // Record leading gaps if any.
         if (currRow != 0u)
-            _recordSegment(target, 0, 0, currRow, +TraceBitMap_<>::VERTICAL);
+            _recordSegment(target, 0, 0, currRow, TraceBitMap_<>::VERTICAL);
         if (currCol != 0u)
-            _recordSegment(target, 0, 0, currCol, +TraceBitMap_<>::HORIZONTAL);
+            _recordSegment(target, 0, 0, currCol, TraceBitMap_<>::HORIZONTAL);
     }
 }
 
@@ -360,14 +360,14 @@ template <typename TTarget,
           typename TDPCell, typename TScoutSpec,
           typename TSequenceH, typename TSequenceV,
           typename TBandFlag,
-          typename TFreeEndGaps, typename TDPMatrixLocation, typename TGapCosts, typename TTracebackSpec>
+          typename TFreeEndGaps, typename TDPMatrixLocation, typename TGapCosts, typename TTracebackSpec, typename TExecPolicy>
 void _computeTraceback(StringSet<TTarget> & targetSet,
                        TDPTraceMatrixNavigator & matrixNavigator,
                        DPScout_<TDPCell, TScoutSpec> & dpScout,
                        TSequenceH const & seqH,
                        TSequenceV const & seqV,
                        DPBandConfig<TBandFlag> const & band,
-                       DPProfile_<BandedChainAlignment_<TFreeEndGaps, TDPMatrixLocation>, TGapCosts, TTracebackSpec> const & dpProfile)
+                       DPProfile_<BandedChainAlignment_<TFreeEndGaps, TDPMatrixLocation>, TGapCosts, TTracebackSpec, TExecPolicy> const & dpProfile)
 {
     typedef DPScout_<TDPCell, TScoutSpec> TDPScout;
     typedef typename TDPScout::TMaxHostPositionString TMaxHostPositions;
diff --git a/include/seqan/seeds/basic_iter_indirect.h b/include/seqan/seeds/basic_iter_indirect.h
index f2b78b9..1de61a5 100644
--- a/include/seqan/seeds/basic_iter_indirect.h
+++ b/include/seqan/seeds/basic_iter_indirect.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/seeds/seeds_base.h b/include/seqan/seeds/seeds_base.h
index 7082267..87979d2 100644
--- a/include/seqan/seeds/seeds_base.h
+++ b/include/seqan/seeds/seeds_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/seeds/seeds_combination.h b/include/seqan/seeds/seeds_combination.h
index 6856519..7291a1d 100644
--- a/include/seqan/seeds/seeds_combination.h
+++ b/include/seqan/seeds/seeds_combination.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/seeds/seeds_extension.h b/include/seqan/seeds/seeds_extension.h
index 9f724f6..d544706 100644
--- a/include/seqan/seeds/seeds_extension.h
+++ b/include/seqan/seeds/seeds_extension.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -627,14 +627,14 @@ _extendSeedGappedXDropOneDirection(
         return 0;
 
     TScoreValue len = 2 * _max(cols, rows); // number of antidiagonals
-    TScoreValue const minErrScore = minValue<TScoreValue>() / len; // minimal allowed error penalty
+    TScoreValue const minErrScore = std::numeric_limits<TScoreValue>::min() / len; // minimal allowed error penalty
     setScoreGap(scoringScheme, _max(scoreGap(scoringScheme), minErrScore));
     typename Value<TQuerySegment>::Type * tag = 0;
     (void)tag;
     _extendSeedGappedXDropOneDirectionLimitScoreMismatch(scoringScheme, minErrScore, tag);
 
     TScoreValue gapCost = scoreGap(scoringScheme);
-    TScoreValue undefined = minValue<TScoreValue>() - gapCost;
+    TScoreValue undefined = std::numeric_limits<TScoreValue>::min() - gapCost;
 
     // DP matrix is calculated by anti-diagonals
     String<TScoreValue> antiDiag1;    //smallest anti-diagonal
diff --git a/include/seqan/seeds/seeds_global_chaining.h b/include/seqan/seeds/seeds_global_chaining.h
index 2f49a50..fffd74c 100644
--- a/include/seqan/seeds/seeds_global_chaining.h
+++ b/include/seqan/seeds/seeds_global_chaining.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -62,6 +62,23 @@ typedef Tag<SparseChaining_> SparseChaining;
 // Functions
 // ===========================================================================
 
+template <typename TIntermediate>
+inline bool _checkScoreInvariant(TIntermediate const & list)
+{
+    if (list.empty())
+        return true;
+    auto it = list.begin();
+    auto score = it->i2;
+    ++it;
+    for (; it != list.end(); ++it)
+    {
+        if (score > it->i2)
+            return false;
+        score = it->i2;
+    }
+    return true;
+}
+
 /*!
  * @fn chainSeedsGlobally
  * @headerfile <seqan/seeds.h>
@@ -97,6 +114,13 @@ typedef Tag<SparseChaining_> SparseChaining;
  */
 
 // TODO(holtgrew): Implement scored!
+// NOTE(rrahn): Some general notes regarding the sparse chaining algorithm by Gusfield.
+// From the text it is hard to follow the correct algorithm, as one usually expects the y-coordinates to
+// be increasing integers (sequence positions). However, the algorithm assumes the coordinates of the
+// rectangles to be placed in the fourth quadrant of the cartesian coordinate system (negative y-coordinates).
+// To adapt the algorithm for the positive sequence space we sort the y-coordinates in *L* in ascending order.
+// We then can use lower_bound and upper_bound on the sorted set to find the corresponding seed j as described in
+// the algorithm.
 template <typename TTargetContainer, typename TSeed, typename TSeedSetSpec>
 void
 chainSeedsGlobally(
@@ -138,7 +162,7 @@ chainSeedsGlobally(
         // sparse chaining algorithm expects.
         // std::cout << "| " << **it << std::endl;
         qualityOfChainEndingIn[i] = seedSize(seeds[i]);
-        predecessor[i] = maxValue<unsigned>();
+        predecessor[i] = std::numeric_limits<unsigned>::max();
         appendValue(intervalPoints, TIntervalPoint(beginPositionH(seeds[i]), true, i));
         appendValue(intervalPoints, TIntervalPoint(endPositionH(seeds[i]), false, i));
     }
@@ -153,8 +177,8 @@ chainSeedsGlobally(
     // -----------------------------------------------------------------------
     // Step 2: Build the chain.
     // -----------------------------------------------------------------------
-    // We build a list of "intermediate solutions".  Each such
-    // solution is represented by the triple (end position in dim1,
+    // We build a list of "intermediate solutions" (referred to as *L* in the Gusfield book).
+    // Each such solution is represented by the triple (end position in dim1,
     // value of best chain so far, last seed of the chain).
     typedef Triple<TPosition, TSize, unsigned> TIntermediateSolution;
     typedef std::multiset<TIntermediateSolution> TIntermediateSolutions;
@@ -162,89 +186,99 @@ chainSeedsGlobally(
 
     // For all interval points...
     TIntermediateSolutions intermediateSolutions;
-    for (TIntervalPointsIterator it = begin(intervalPoints), itEnd = end(intervalPoints); it != itEnd; ++it) {
+    for (TIntervalPointsIterator it_k = begin(intervalPoints), itEnd = end(intervalPoints); it_k != itEnd; ++it_k) {
         // The seed belonging ot the interval point is seed k.
-        TSeed const & seedK = seeds[it->i3];
+        TSeed const & seed_k = seeds[it_k->i3];
 
         // std::cout << "Processing interval point (" << it->i1 << ", " << it->i2 << ", " << it->i3 << ")" << std::endl;
-        if (it->i2) {  // Is is begin point.
-            // Find the closest seed (in dimension 1) to seed k with an
-            // entry in intermediateSolutions whose end coordinate in
-            // dimension 1 is <= the begin coordinate in dimension 1
-            // of seedK.
+        if (it_k->i2) {  // Is is begin point.
+            // Find the closest seed j (in y-dimension) with an
+            // entry in L whose end coordinate is less or equal the begin position of k.
             //
             // STL gives us upper_bound which returns a pointer to the
             // *first* one that compares greater than the reference
             // one.  Searching for the this one and decrementing the
             // result iterator gives the desired result.
-            TIntermediateSolution referenceSolution(beginPositionV(seedK), maxValue<TSize>(), maxValue<unsigned>());
-            // std::cout << "    intermediateSolutions.upper_bound(" << beginPositionV(seedK) << ")" << std::endl;
-            TIntermediateSolutionsIterator itJ = intermediateSolutions.upper_bound(referenceSolution);
-            if (itJ == intermediateSolutions.begin()) {
-                if (intermediateSolutions.size() > 0 &&
-                    intermediateSolutions.rbegin()->i1 <= beginPositionV(seedK)) {
-                    itJ = intermediateSolutions.end();
-                    --itJ;
-                } else {
-                    continue;
-                }
-            } else {
-                SEQAN_ASSERT_GT(intermediateSolutions.size(), 0u);  // TODO(holtgrew): Remove this assertion?
-                --itJ;
+            TIntermediateSolution referenceSolution(beginPositionV(seed_k), std::numeric_limits<TSize>::max(), std::numeric_limits<unsigned>::max());
+            // std::cout << "    intermediateSolutions.upper_bound(" << beginPositionV(seed_k) << ")" << std::endl;
+            TIntermediateSolutionsIterator it_j = intermediateSolutions.upper_bound(referenceSolution);
+
+            // Special case not dealt with in the book: If L is empty or there is no chain
+            // that ends before k begins, simply continue with the next point in I.
+            if (intermediateSolutions.empty() || it_j == intermediateSolutions.begin())
+            {
+                continue;
             }
-            // std::cout << "     --> " << seeds[itJ->i3] << std::endl;
+            // Go to the last value in L, i.e. l_j <= h_k.
+            --it_j;
+            // std::cout << "     --> " << seeds[it_j->i3] << std::endl;
             // Now, we have found such a seed j.
-            SEQAN_ASSERT_LEQ(endPositionV(seeds[itJ->i3]), endPositionV(seedK));
+            SEQAN_ASSERT_LEQ(endPositionV(seeds[it_j->i3]), beginPositionV(seed_k));
             // Update the intermediate solution value for k and set predecessor.
-            qualityOfChainEndingIn[it->i3] += itJ->i2;
+            qualityOfChainEndingIn[it_k->i3] += it_j->i2;
             // std::cout << "  UPDATE qualityOfChainEndingIn[" << it->i3 << "] == " << qualityOfChainEndingIn[it->i3] << std::endl;
-            predecessor[it->i3] = itJ->i3;
+            predecessor[it_k->i3] = it_j->i3;
             // std::cout << "         predecessor[" << it->i3 << "] == " << itJ->i3 << std::endl;
         } else {  // Is end point.
-            // Search for the first triple in intermediateSolutions
-            // where the end coordinate in dimension 1 is >= end
-            // coordinate in dimension 1 for seed k.  The corresponding
-            // seed is seed j.
+            // Search for the first triple j in L with l_j >= l_k.
+            // Or to put it in differently, find the first chain that ends
+            // left and below the chain that ends in k. These are other possible solutions,
+            // that either result in a better score or must be deleted as the score of the chain ending in k
+            // is bigger. Hence, every other seed that could connect to both j and k, prefers the one with the higher
+            // score.
             //
-            // We work with upper_bound here which gives us the first
-            // value that is > so we have to work around this to get
-            // >= again...
-            SEQAN_ASSERT_GT(endPositionV(seedK), 0u);
-            TIntermediateSolution referenceSolution(endPositionV(seedK), 0, maxValue<unsigned>());
-            TIntermediateSolutionsIterator itSol = intermediateSolutions.upper_bound(referenceSolution);
-            if (itSol == intermediateSolutions.end()) {
-                // None found.  Insert a new triple for seed k.
-                TIntermediateSolution sol(endPositionV(seedK), qualityOfChainEndingIn[it->i3], it->i3);
-                // std::cout << "  INSERT (" << sol.i1 << ", " << sol.i2 << ", " << sol.i3 << ") " << __LINE__ << std::endl;
-                intermediateSolutions.insert(sol);
-            } else {
+            // We can use the lower_bound, which gives the first triple j such that l_j >= l_k
+            SEQAN_ASSERT_GT(endPositionV(seed_k), 0u);
+            TIntermediateSolution referenceSolution(endPositionV(seed_k), 0, std::numeric_limits<unsigned>::max());
+            TIntermediateSolutionsIterator it_j = intermediateSolutions.lower_bound(referenceSolution);
+
+            // If there was a valid solution in L...
+            if (it_j != intermediateSolutions.end())
+            {
                 // Found this intermediate solution.
-                SEQAN_ASSERT_GEQ(itSol->i1, endPositionV(seedK));
-                TSeed const & seedJ = seeds[itSol->i3];
-                // Possibly start a new chain at k if the end1 is
-                // before the end1 of the chain ending in j or they
-                // end at the same coordinate in dim1 but k already
-                // has a higher quality than the whole chaing ending
-                // at j.
-                if (endPositionV(seedJ) > endPositionV(seedK) ||
-                    (endPositionV(seedJ) == endPositionV(seedK) && qualityOfChainEndingIn[it->i3] > itSol->i2)) {
-                    TIntermediateSolution sol(endPositionV(seedK), qualityOfChainEndingIn[it->i3], it->i3);
+                SEQAN_ASSERT_GEQ(it_j->i1, endPositionV(seed_k));
+                TSeed const & seed_j = seeds[it_j->i3];
+                // ... start a new chain at k if the vertical end of k is
+                // above the vertical end of the chain ending in j or if
+                // both k and j end at the same vertical position, while
+                // the score of the chain ending in k is bigger than the
+                // score of the chain ending in j.
+                if (endPositionV(seed_j) > endPositionV(seed_k) ||
+                    (endPositionV(seed_j) == endPositionV(seed_k) && qualityOfChainEndingIn[it_k->i3] > it_j->i2))
+                {
+                    TIntermediateSolution sol(endPositionV(seed_k), qualityOfChainEndingIn[it_k->i3], it_k->i3);
                     // std::cout << "  INSERT (" << sol.i1 << ", " << sol.i2 << ", " << sol.i3 << ")" << __LINE__  << std::endl;
                     intermediateSolutions.insert(sol);
-                }
-            }
 
-            // Delete all intermediate solutions where end1 >= end1 of k and have a lower quality than k.
-            TIntermediateSolutionsIterator itDel = intermediateSolutions.upper_bound(referenceSolution);
-            TIntermediateSolutionsIterator itDelEnd = intermediateSolutions.end();
-            while (itDel != itDelEnd) {
-                TIntermediateSolutionsIterator ptr = itDel;
-                ++itDel;
-                if (qualityOfChainEndingIn[it->i3] > ptr->i2) {
-                    // std::cout << "  ERASE (" << ptr->i1 << ", " << ptr->i2 << ", " << ptr->i3 << ")" << std::endl;
-                    intermediateSolutions.erase(ptr);
+                    // Delete all intermediate solutions where end1 >= end1 of k and have a lower score than k
+                    // to ensure that the invariant of V(j) >= V(j'), with j' <= j holds.
+                    // Roughly then, there is no chain ending in a seed below the seed_k, that has a lower score
+                    // than the chain ending in seed_k. Thus the last value in `intermediateSolutions` will
+                    // always point to the optimal chain.
+                    TIntermediateSolutionsIterator itDel = intermediateSolutions.upper_bound(referenceSolution);
+                    TIntermediateSolutionsIterator itDelEnd = intermediateSolutions.end();
+                    while (itDel != itDelEnd)
+                    {
+                        TIntermediateSolutionsIterator ptr = itDel;
+                        ++itDel;
+                        if (qualityOfChainEndingIn[it_k->i3] > ptr->i2)
+                        {
+                            // std::cout << "  ERASE (" << ptr->i1 << ", " << ptr->i2 << ", " << ptr->i3 << ")" << std::endl;
+                            intermediateSolutions.erase(ptr);
+                        }
+                    }
                 }
+            } // ... otherwise, add a triple for k in L if either L is empty or the last triple in
+              // L has a lower score than the chain ending in k.
+            else if (intermediateSolutions.empty() || (--it_j)->i2 < qualityOfChainEndingIn[it_k->i3])
+            {
+                // None found.  Insert a new triple for seed k.
+                TIntermediateSolution sol(endPositionV(seed_k), qualityOfChainEndingIn[it_k->i3], it_k->i3);
+                // std::cout << "  INSERT (" << sol.i1 << ", " << sol.i2 << ", " << sol.i3 << ") " << __LINE__ << std::endl;
+                intermediateSolutions.insert(sol);
             }
+            // Check if the invariant holds, that the scores in L are in a non-decreasing order.
+            SEQAN_ASSERT(_checkScoreInvariant(intermediateSolutions));
         }
     }
 
@@ -256,7 +290,7 @@ chainSeedsGlobally(
     // TODO(holtgrew): We could use two different algorithms for target containers that are strings and those that are lists.
     clear(target);
     unsigned next = intermediateSolutions.rbegin()->i3;
-    while (next != maxValue<unsigned>())
+    while (next != std::numeric_limits<unsigned>::max())
     {
         appendValue(target, seeds[next]);
         next = predecessor[next];
diff --git a/include/seqan/seeds/seeds_global_chaining_base.h b/include/seqan/seeds/seeds_global_chaining_base.h
index 30f0aab..c3bf51f 100644
--- a/include/seqan/seeds/seeds_global_chaining_base.h
+++ b/include/seqan/seeds/seeds_global_chaining_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/seeds/seeds_global_chaining_gusfield.h b/include/seqan/seeds/seeds_global_chaining_gusfield.h
index b9da182..0e3814b 100644
--- a/include/seqan/seeds/seeds_global_chaining_gusfield.h
+++ b/include/seqan/seeds/seeds_global_chaining_gusfield.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/seeds/seeds_seed_base.h b/include/seqan/seeds/seeds_seed_base.h
index 7be7f7b..ab91f42 100644
--- a/include/seqan/seeds/seeds_seed_base.h
+++ b/include/seqan/seeds/seeds_seed_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/seeds/seeds_seed_chained.h b/include/seqan/seeds/seeds_seed_chained.h
index b599e39..ff9831e 100644
--- a/include/seqan/seeds/seeds_seed_chained.h
+++ b/include/seqan/seeds/seeds_seed_chained.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/seeds/seeds_seed_diagonal.h b/include/seqan/seeds/seeds_seed_diagonal.h
index 8e50e54..69f73d7 100644
--- a/include/seqan/seeds/seeds_seed_diagonal.h
+++ b/include/seqan/seeds/seeds_seed_diagonal.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/seeds/seeds_seed_set_base.h b/include/seqan/seeds/seeds_seed_set_base.h
index c5a4e2e..758d0bc 100644
--- a/include/seqan/seeds/seeds_seed_set_base.h
+++ b/include/seqan/seeds/seeds_seed_set_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/seeds/seeds_seed_set_non_scored.h b/include/seqan/seeds/seeds_seed_set_non_scored.h
index a33a43c..d49aab0 100644
--- a/include/seqan/seeds/seeds_seed_set_non_scored.h
+++ b/include/seqan/seeds/seeds_seed_set_non_scored.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/seeds/seeds_seed_set_scored.h b/include/seqan/seeds/seeds_seed_set_scored.h
index 5b16edd..967c275 100644
--- a/include/seqan/seeds/seeds_seed_set_scored.h
+++ b/include/seqan/seeds/seeds_seed_set_scored.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/seeds/seeds_seed_set_unordered.h b/include/seqan/seeds/seeds_seed_set_unordered.h
index ad514dc..b318f05 100644
--- a/include/seqan/seeds/seeds_seed_set_unordered.h
+++ b/include/seqan/seeds/seeds_seed_set_unordered.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/seeds/seeds_seed_simple.h b/include/seqan/seeds/seeds_seed_simple.h
index d3c3920..2a1173a 100644
--- a/include/seqan/seeds/seeds_seed_simple.h
+++ b/include/seqan/seeds/seeds_seed_simple.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/seq_io.h b/include/seqan/seq_io.h
index f7e5477..f1e4f4d 100644
--- a/include/seqan/seq_io.h
+++ b/include/seqan/seq_io.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/seq_io/bam_sam.h b/include/seqan/seq_io/bam_sam.h
index 521ff4a..63ace07 100644
--- a/include/seqan/seq_io/bam_sam.h
+++ b/include/seqan/seq_io/bam_sam.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -115,6 +115,7 @@ inline int32_t readBamRecord(TIdString & meta,
     // BamAlignmentRecordCore.
     BamAlignmentRecordCore recordCore;
     arrayCopyForward(it, it + sizeof(BamAlignmentRecordCore), reinterpret_cast<char *>(&recordCore));
+    enforceLittleEndian(recordCore);
     it += sizeof(BamAlignmentRecordCore);
 
     clear(meta);
@@ -143,9 +144,9 @@ inline int32_t readBamRecord(TIdString & meta,
     {
         unsigned char ui = getValue(it);
         ++it;
-        assignValue(sit, Iupac(ui >> 4));
+        *sit =  Iupac(ui >> 4);
         ++sit;
-        assignValue(sit, Iupac(ui & 0x0f));
+        *sit =  Iupac(ui & 0x0f);
         ++sit;
     }
     if (recordCore._l_qseq & 1)
diff --git a/include/seqan/seq_io/fai_index.h b/include/seqan/seq_io/fai_index.h
index db6fc76..3f65cc5 100644
--- a/include/seqan/seq_io/fai_index.h
+++ b/include/seqan/seq_io/fai_index.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/seq_io/fasta_fastq.h b/include/seqan/seq_io/fasta_fastq.h
index fae8004..751b792 100644
--- a/include/seqan/seq_io/fasta_fastq.h
+++ b/include/seqan/seq_io/fasta_fastq.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -235,7 +235,7 @@ struct QualityExtractor : public std::unary_function<TValue, char>
 // ----------------------------------------------------------------------------
 
 template <typename TIdString, typename TSeqString, typename TFwdIterator>
-inline SEQAN_FUNC_ENABLE_IF(Not<IsSameType<TFwdIterator, FormattedFile<Fastq, Input> > >, void)
+inline SEQAN_FUNC_ENABLE_IF(Not<IsInputFile<TFwdIterator> >, void)
 readRecord(TIdString & meta, TSeqString & seq, TFwdIterator & iter, Raw)
 {
     typedef typename Value<TSeqString>::Type                        TAlphabet;
@@ -252,7 +252,7 @@ readRecord(TIdString & meta, TSeqString & seq, TFwdIterator & iter, Raw)
 // ----------------------------------------------------------------------------
 
 template <typename TIdString, typename TSeqString, typename TQualString, typename TFwdIterator>
-inline SEQAN_FUNC_ENABLE_IF(Not<IsSameType<TFwdIterator, FormattedFile<Fastq, Input> > >, void)
+inline SEQAN_FUNC_ENABLE_IF(Not<IsInputFile<TFwdIterator> >, void)
 readRecord(TIdString & meta, TSeqString & seq, TQualString & qual, TFwdIterator & iter, Raw const & raw)
 {
     clear(qual);
@@ -264,7 +264,7 @@ readRecord(TIdString & meta, TSeqString & seq, TQualString & qual, TFwdIterator
 // ----------------------------------------------------------------------------
 
 template <typename TIdString, typename TSeqString, typename TFwdIterator>
-inline SEQAN_FUNC_ENABLE_IF(Not<IsSameType<TFwdIterator, FormattedFile<Fastq, Input> > >, void)
+inline SEQAN_FUNC_ENABLE_IF(Not<IsInputFile<TFwdIterator> >, void)
 readRecord(TIdString & meta, TSeqString & seq, TFwdIterator & iter, Fasta)
 {
     typedef typename Value<TSeqString>::Type                        TAlphabet;
@@ -286,7 +286,7 @@ readRecord(TIdString & meta, TSeqString & seq, TFwdIterator & iter, Fasta)
 // ----------------------------------------------------------------------------
 
 template <typename TIdString, typename TSeqString, typename TQualString, typename TFwdIterator>
-inline SEQAN_FUNC_ENABLE_IF(Not<IsSameType<TFwdIterator, FormattedFile<Fastq, Input> > >, void)
+inline SEQAN_FUNC_ENABLE_IF(Not<IsInputFile<TFwdIterator> >, void)
 readRecord(TIdString & meta, TSeqString & seq, TQualString & qual, TFwdIterator & iter, Fasta)
 {
     clear(qual);
@@ -298,7 +298,7 @@ readRecord(TIdString & meta, TSeqString & seq, TQualString & qual, TFwdIterator
 // ----------------------------------------------------------------------------
 
 template <typename TIdString, typename TSeqString, typename TFwdIterator >
-inline SEQAN_FUNC_ENABLE_IF(Not<IsSameType<TFwdIterator, FormattedFile<Fastq, Input> > >, void)
+inline SEQAN_FUNC_ENABLE_IF(Not<IsInputFile<TFwdIterator> >, void)
 readRecord(TIdString & meta, TSeqString & seq, TFwdIterator & iter, Fastq)
 {
     typedef typename Value<TSeqString>::Type                                TAlphabet;
@@ -349,7 +349,7 @@ readRecord(TIdString & meta, TSeqString & seq, TFwdIterator & iter, Fastq)
 // ----------------------------------------------------------------------------
 
 template <typename TIdString, typename TSeqString, typename TQualString, typename TFwdIterator>
-inline SEQAN_FUNC_ENABLE_IF(Not<IsSameType<TFwdIterator, FormattedFile<Fastq, Input> > >, void)
+inline SEQAN_FUNC_ENABLE_IF(Not<IsInputFile<TFwdIterator> >, void)
 readRecord(TIdString & meta, TSeqString & seq, TQualString & qual, TFwdIterator & iter, Fastq)
 {
     typedef typename Value<TSeqString>::Type                                TSeqAlphabet;
diff --git a/include/seqan/seq_io/genomic_region.h b/include/seqan/seq_io/genomic_region.h
index 231b577..7eb2e1e 100644
--- a/include/seqan/seq_io/genomic_region.h
+++ b/include/seqan/seq_io/genomic_region.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/seq_io/read_embl.h b/include/seqan/seq_io/read_embl.h
index f7774c0..ffb31d0 100644
--- a/include/seqan/seq_io/read_embl.h
+++ b/include/seqan/seq_io/read_embl.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -156,7 +156,7 @@ nextIs(TFwdIterator & iter, EmblSequence)
 // Read all sequence, eat/ignore '//' line.
 
 template <typename TSeqString, typename TFwdIterator>
-inline SEQAN_FUNC_ENABLE_IF(Not<IsSameType<TFwdIterator, FormattedFile<Fastq, Input> > >, void)
+inline SEQAN_FUNC_ENABLE_IF(Not<IsInputFile<TFwdIterator> >, void)
 readRecord(TSeqString & seq, TFwdIterator & iter, EmblSequence)
 {
     typedef typename Value<TSeqString>::Type TSeqAlphabet;
@@ -185,7 +185,7 @@ readRecord(TSeqString & seq, TFwdIterator & iter, EmblSequence)
 // readRecord() for EMBL id/seq pairs.
 
 template <typename TIdString, typename TSeqString, typename TFwdIterator>
-inline SEQAN_FUNC_ENABLE_IF(Not<IsSameType<TFwdIterator, FormattedFile<Fastq, Input> > >, void)
+inline SEQAN_FUNC_ENABLE_IF(Not<IsInputFile<TFwdIterator> >, void)
 readRecord(TIdString & meta, TSeqString & seq, TFwdIterator & iter, Embl)
 {
     IsBlank isBlank;
@@ -211,7 +211,7 @@ readRecord(TIdString & meta, TSeqString & seq, TFwdIterator & iter, Embl)
 }
 
 template <typename TIdString, typename TSeqString, typename TQualString, typename TFwdIterator>
-inline SEQAN_FUNC_ENABLE_IF(Not<IsSameType<TFwdIterator, FormattedFile<Fastq, Input> > >, void)
+inline SEQAN_FUNC_ENABLE_IF(Not<IsInputFile<TFwdIterator> >, void)
 readRecord(TIdString & meta, TSeqString & seq, TQualString & qual, TFwdIterator & iter, Embl)
 {
     clear(qual);
diff --git a/include/seqan/seq_io/read_genbank.h b/include/seqan/seq_io/read_genbank.h
index afddfb9..6701f4c 100644
--- a/include/seqan/seq_io/read_genbank.h
+++ b/include/seqan/seq_io/read_genbank.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -171,7 +171,7 @@ nextIs(TFwdIterator & iter, GenBankSequence)
 // Read all sequence, eat/ignore '//' line.
 
 template <typename TSeqString, typename TFwdIterator>
-inline SEQAN_FUNC_ENABLE_IF(Not<IsSameType<TFwdIterator, FormattedFile<Fastq, Input> > >, void)
+inline SEQAN_FUNC_ENABLE_IF(Not<IsInputFile<TFwdIterator> >, void)
 readRecord(TSeqString & seq, TFwdIterator & iter, GenBankSequence)
 {
     typedef typename Value<TSeqString>::Type TSeqAlphabet;
@@ -201,7 +201,7 @@ readRecord(TSeqString & seq, TFwdIterator & iter, GenBankSequence)
 // readRecord() for GenBank id/seq pairs.
 
 template <typename TIdString, typename TSeqString, typename TFwdIterator>
-inline SEQAN_FUNC_ENABLE_IF(Not<IsSameType<TFwdIterator, FormattedFile<Fastq, Input> > >, void)
+inline SEQAN_FUNC_ENABLE_IF(Not<IsInputFile<TFwdIterator> >, void)
 readRecord(TIdString & meta, TSeqString & seq, TFwdIterator & iter, GenBank)
 {
     IsWhitespace isWhite;
@@ -236,7 +236,7 @@ readRecord(TIdString & meta, TSeqString & seq, TFwdIterator & iter, GenBank)
 }
 
 template <typename TIdString, typename TSeqString, typename TQualString, typename TFwdIterator>
-inline SEQAN_FUNC_ENABLE_IF(Not<IsSameType<TFwdIterator, FormattedFile<Fastq, Input> > >, void)
+inline SEQAN_FUNC_ENABLE_IF(Not<IsInputFile<TFwdIterator> >, void)
 readRecord(TIdString & meta, TSeqString & seq, TQualString & qual, TFwdIterator & iter, GenBank)
 {
     clear(qual);
diff --git a/include/seqan/seq_io/sequence_file.h b/include/seqan/seq_io/sequence_file.h
index 9be397a..0fd99a1 100644
--- a/include/seqan/seq_io/sequence_file.h
+++ b/include/seqan/seq_io/sequence_file.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -110,7 +110,7 @@ typedef
 typedef TagSelector<SeqInFormats>   SeqInFormat;
 typedef TagSelector<SeqOutFormats>  SeqOutFormat;
 
-// deprecated
+[[deprecated]]
 typedef SeqInFormat AutoSeqFormat;
 
 // ============================================================================
@@ -359,7 +359,7 @@ inline void readRecords(TIdStringSet & meta,
                         TSeqStringSet & seq,
                         FormattedFile<Fastq, Input, TSpec> & file)
 {
-    readRecords(meta, seq, file, MaxValue<uint64_t>::VALUE);
+    readRecords(meta, seq, file, std::numeric_limits<uint64_t>::max());
 }
 
 // ----------------------------------------------------------------------------
@@ -406,7 +406,7 @@ inline void readRecords(TIdStringSet & meta,
                         TQualStringSet & qual,
                         FormattedFile<Fastq, Input, TSpec> & file)
 {
-    readRecords(meta, seq, qual, file, MaxValue<uint64_t>::VALUE);
+    readRecords(meta, seq, qual, file, std::numeric_limits<uint64_t>::max());
 }
 
 // ----------------------------------------------------------------------------
diff --git a/include/seqan/sequence.h b/include/seqan/sequence.h
index 9966590..67fd263 100644
--- a/include/seqan/sequence.h
+++ b/include/seqan/sequence.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // Copyright (c) 2013 NVIDIA Corporation
 // All rights reserved.
 //
diff --git a/include/seqan/sequence/adapt_array_pointer.h b/include/seqan/sequence/adapt_array_pointer.h
index f8fcfd8..6e3b218 100644
--- a/include/seqan/sequence/adapt_array_pointer.h
+++ b/include/seqan/sequence/adapt_array_pointer.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/sequence/adapt_stl_container.h b/include/seqan/sequence/adapt_stl_container.h
index ee7ea0b..7535a96 100644
--- a/include/seqan/sequence/adapt_stl_container.h
+++ b/include/seqan/sequence/adapt_stl_container.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -539,7 +539,8 @@ capacity(std::array<TChar, N> const & me)
 // VC2015 implements some C++17 functions which would collide for
 // applications that do using namespace std
 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4280.pdf
-#ifndef _MSC_VER
+// Disable those functions for C++17 and upwards (pre-C++17 defines __cplusplus as <=201402L).
+#if !(defined(STDLIB_VS) || __cplusplus > 201402L)
 template <typename TContainer>
 inline SEQAN_FUNC_ENABLE_IF(Is<StlContainerConcept<TContainer> >, bool)
 empty(TContainer const & me)
diff --git a/include/seqan/sequence/container_view_zip.h b/include/seqan/sequence/container_view_zip.h
index 7c45d97..0fad61b 100644
--- a/include/seqan/sequence/container_view_zip.h
+++ b/include/seqan/sequence/container_view_zip.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/sequence/iter_concat_virtual.h b/include/seqan/sequence/iter_concat_virtual.h
index 540b848..fbf3ee7 100644
--- a/include/seqan/sequence/iter_concat_virtual.h
+++ b/include/seqan/sequence/iter_concat_virtual.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/sequence/segment_base.h b/include/seqan/sequence/segment_base.h
index 98b0dd9..2ee17b6 100644
--- a/include/seqan/sequence/segment_base.h
+++ b/include/seqan/sequence/segment_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/sequence/segment_infix.h b/include/seqan/sequence/segment_infix.h
index 963ec26..dd1add0 100644
--- a/include/seqan/sequence/segment_infix.h
+++ b/include/seqan/sequence/segment_infix.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/sequence/segment_prefix.h b/include/seqan/sequence/segment_prefix.h
index a762ea3..8ada2d2 100644
--- a/include/seqan/sequence/segment_prefix.h
+++ b/include/seqan/sequence/segment_prefix.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/sequence/segment_suffix.h b/include/seqan/sequence/segment_suffix.h
index 7cbbe79..203c095 100644
--- a/include/seqan/sequence/segment_suffix.h
+++ b/include/seqan/sequence/segment_suffix.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/sequence/segment_utils.h b/include/seqan/sequence/segment_utils.h
index 4ebb62a..80ee68d 100644
--- a/include/seqan/sequence/segment_utils.h
+++ b/include/seqan/sequence/segment_utils.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/sequence/sequence_concatenator.h b/include/seqan/sequence/sequence_concatenator.h
index e506c51..952c732 100644
--- a/include/seqan/sequence/sequence_concatenator.h
+++ b/include/seqan/sequence/sequence_concatenator.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/sequence/sequence_forwards.h b/include/seqan/sequence/sequence_forwards.h
index ac0cebd..39b2b01 100644
--- a/include/seqan/sequence/sequence_forwards.h
+++ b/include/seqan/sequence/sequence_forwards.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // Copyright (c) 2013 NVIDIA Corporation
 // All rights reserved.
 //
@@ -135,8 +135,11 @@ template <typename TContainer, typename TPos> inline SEQAN_FUNC_ENABLE_IF(And<Is
 template <typename TContainer, typename TPos> inline SEQAN_FUNC_ENABLE_IF(And<Is<StlContainerConcept<TContainer> >, Not<HasSubscriptOperator<TContainer> > >, typename Reference<TContainer>::Type) value(TContainer & me, TPos const pos);
 template <typename TContainer, typename TPos> inline SEQAN_FUNC_ENABLE_IF(And<Is<StlContainerConcept<TContainer> >, Not<HasSubscriptOperator<TContainer> > >, typename Reference<TContainer const>::Type) value(TContainer const & me, TPos const pos);
 template <typename TContainer, typename TPos> inline SEQAN_FUNC_ENABLE_IF(And<Is<StlContainerConcept<TContainer> >, Not<HasSubscriptOperator<TContainer> > >, typename Value<TContainer>::Type) value(TContainer && me, TPos const pos);
+
+#if !(defined(STDLIB_VS) || __cplusplus > 201402L)
 template <typename TContainer> inline SEQAN_FUNC_ENABLE_IF(Is<StlContainerConcept<TContainer> >, bool) empty(TContainer const & me);
 template <typename T> inline SEQAN_FUNC_DISABLE_IF(Is<StlContainerConcept<typename RemoveReference<T>::Type> >, bool) empty(T const & me);
+#endif
 
 // --------------------------------------------------------------------------
 // Forwards For arrays and pointers.
diff --git a/include/seqan/sequence/sequence_interface.h b/include/seqan/sequence/sequence_interface.h
index 31297e8..524d47a 100644
--- a/include/seqan/sequence/sequence_interface.h
+++ b/include/seqan/sequence/sequence_interface.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/sequence/sequence_lexical.h b/include/seqan/sequence/sequence_lexical.h
index 66e6f43..67cee24 100644
--- a/include/seqan/sequence/sequence_lexical.h
+++ b/include/seqan/sequence/sequence_lexical.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/sequence/sequence_shortcuts.h b/include/seqan/sequence/sequence_shortcuts.h
index cbe7ff3..9d06c4b 100644
--- a/include/seqan/sequence/sequence_shortcuts.h
+++ b/include/seqan/sequence/sequence_shortcuts.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/sequence/string_alloc.h b/include/seqan/sequence/string_alloc.h
index 3f485ec..6966692 100644
--- a/include/seqan/sequence/string_alloc.h
+++ b/include/seqan/sequence/string_alloc.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -78,7 +78,9 @@ public:
         SEQAN_ASSERT_LEQ_MSG(data_begin, data_end, "String end is before begin!");
     }
 
-    template <typename TSource>
+    template <typename TSource,
+              typename Dummy = void,
+              typename = std::enable_if_t<std::is_convertible<typename Value<TSource>::Type,TValue>::value, Dummy> >
     String(TSource & source)
         : data_begin(0),
           data_end(0),
@@ -89,7 +91,9 @@ public:
         SEQAN_ASSERT_LEQ_MSG(data_begin, data_end, "String end is before begin!");
     }
 
-    template <typename TSource>
+    template <typename TSource,
+              typename Dummy = void,
+              typename = std::enable_if_t<std::is_convertible<typename Value<TSource>::Type, TValue>::value, Dummy> >
     String(TSource const & source)
         : data_begin(0),
           data_end(0),
@@ -140,7 +144,10 @@ public:
         SEQAN_ASSERT_LEQ_MSG(data_begin, data_end, "String end is before begin!");
     }
 
-    template <typename TSource, typename TSize>
+    template <typename TSource,
+              typename TSize,
+              typename Dummy = void,
+              typename = std::enable_if_t<std::is_convertible<typename Value<TSource>::Type, TValue>::value, Dummy> >
     String(TSource & source, TSize limit)
             : data_begin(0),
               data_end(0),
@@ -151,7 +158,10 @@ public:
         SEQAN_ASSERT_LEQ_MSG(data_begin, data_end, "String end is before begin!");
     }
 
-    template <typename TSource, typename TSize>
+    template <typename TSource,
+              typename TSize,
+              typename Dummy = void,
+              typename = std::enable_if_t<std::is_convertible<typename Value<TSource>::Type, TValue>::value, Dummy> >
     String(TSource const & source, TSize limit)
             : data_begin(0),
               data_end(0),
@@ -163,7 +173,9 @@ public:
     }
 
 
-    template <typename TSource>
+    template <typename TSource,
+              typename Dummy = void,
+              typename = std::enable_if_t<std::is_convertible<typename Value<TSource>::Type, TValue>::value, Dummy> >
     inline
     String & operator=(TSource const & source)
     {
diff --git a/include/seqan/sequence/string_array.h b/include/seqan/sequence/string_array.h
index 0399e65..d508640 100644
--- a/include/seqan/sequence/string_array.h
+++ b/include/seqan/sequence/string_array.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/sequence/string_base.h b/include/seqan/sequence/string_base.h
index 3b10a6f..c208518 100644
--- a/include/seqan/sequence/string_base.h
+++ b/include/seqan/sequence/string_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -2034,6 +2034,30 @@ operator<<(TStream & target,
     return target;
 }
 
+// A specialization needed to avoid an ambiguous call combined with googletest.
+//
+// We use `std::basic_ostream<char>` instead of `std::ostream`, because we would
+// need to redefine a lot of CONCEPTS within seqan. Unfortunately,
+// `std::basic_ostream<char>` does not work, because `directionIterator` might not
+// be included yet (defined in <iter_stream.h>). Thus using `TChar` with the
+// restriction that it can only be `char`.
+//
+// We do not use the more generic `std::basic_ostream<TChar, Traits>` type,
+// because this would clash with other overloads of `<<` where `TSpec` within
+// String<TValue, ...> is more specific. E.g. in the case of `TSpec =
+// Journaled<...>`.
+//
+// https://github.com/seqan/seqan/issues/2182
+template <typename TChar, typename TValue>
+inline SEQAN_FUNC_ENABLE_IF(IsSameType<TChar, char>, std::basic_ostream<TChar> &)
+operator<<(std::basic_ostream<TChar> & target,
+           String<TValue> const & source)
+{
+    auto it = directionIterator(target, Output());
+    write(it, source);
+    return target;
+}
+
 // ----------------------------------------------------------------------------
 // Function operator>>() for streams.
 // ----------------------------------------------------------------------------
diff --git a/include/seqan/sequence/string_block.h b/include/seqan/sequence/string_block.h
index b1c2136..54edae8 100644
--- a/include/seqan/sequence/string_block.h
+++ b/include/seqan/sequence/string_block.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // Copyright (c) 2013 NVIDIA Corporation
 // All rights reserved.
 //
diff --git a/include/seqan/sequence/string_cstyle.h b/include/seqan/sequence/string_cstyle.h
index 3b3eb55..d8e6ec7 100644
--- a/include/seqan/sequence/string_cstyle.h
+++ b/include/seqan/sequence/string_cstyle.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -582,11 +582,10 @@ struct CreateArrayStringExpand_
                 _deallocateStorage(target, buf, old_target_capacity);
             }
         }
-        assignValue(begin(target, Standard()), 0); //set target length to 0
+        assign(*begin(target, Standard()), 0); //set target length to 0
         assign(begin(target, Standard()), source, Insist());
         typedef typename Iterator<TTarget>::Type TTargetIterator;
         _setEnd(target, TTargetIterator( begin(target) + source_length));
-
     }
 
     template <typename TTarget, typename TSource, typename TLimit>
diff --git a/include/seqan/sequence/string_packed.h b/include/seqan/sequence/string_packed.h
index ba0af1f..8dd9242 100644
--- a/include/seqan/sequence/string_packed.h
+++ b/include/seqan/sequence/string_packed.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -594,7 +594,7 @@ resize(String<TValue, Packed<THostspec> > & me,
     // create WORD
     THostValue tmp;
     tmp.i = 0;
-    __uint64 ord = ordValue(TValue(newValue));
+    uint64_t ord = ordValue(TValue(newValue));
     for (unsigned j = 0; j < TTraits::VALUES_PER_HOST_VALUE; ++j)
         tmp.i |= ord << (j * TTraits::BITS_PER_VALUE);
 
@@ -611,7 +611,7 @@ resize(String<TValue, Packed<THostspec> > & me,
         TStringSize alreadySet = old_length % TTraits::VALUES_PER_HOST_VALUE;
 
         // clear non-set positions (which may be uninitialized ( != 0 )
-        tmp.i = (~static_cast<__uint64>(0) << (64 - alreadySet * TTraits::BITS_PER_VALUE)) >> TTraits::WASTED_BITS;
+        tmp.i = (~static_cast<uint64_t>(0) << (64 - alreadySet * TTraits::BITS_PER_VALUE)) >> TTraits::WASTED_BITS;
         host(me)[old_host_length-1].i &= tmp.i;
 
         for (TStringSize i = alreadySet; i < TTraits::VALUES_PER_HOST_VALUE; ++i)
@@ -1063,7 +1063,7 @@ arrayCopyBackward(Iter<TPackedString, Packed<TSpec> > source_begin,
             {
                 --hostIterator(source_end);
                 --hostIterator(target_begin);
-                assignValue(hostIterator(target_begin), getValue(hostIterator(source_end)));
+                *hostIterator(target_begin) = getValue(hostIterator(source_end));
             }
         }
 
@@ -1246,7 +1246,7 @@ struct ClearSpaceStringPacked_
         typename Size<T>::Type start,
         typename Size<T>::Type end)
     {
-        return _clearSpace_(seq, size, start, end, maxValue<typename Size<T>::Type >());
+        return _clearSpace_(seq, size, start, end, std::numeric_limits<typename Size<T>::Type >::max());
     }
 
     template <typename T>
@@ -1753,7 +1753,7 @@ bitScanReverse(String<bool, Packed<THostSpec> > const & obj)
     typedef typename THostValue::TBitVector TBitVector;
 
     if (empty(host(obj)))
-        return MaxValue<TPosition>::VALUE;
+        return std::numeric_limits<TPosition>::max();
 
     TConstPackedHostIterator it = end(host(obj), Standard()) - 1;
     TConstPackedHostIterator itBegin = begin(host(obj), Standard());
@@ -1792,7 +1792,7 @@ bitScanForward(String<bool, Packed<THostSpec> > const & obj)
     typedef typename THostValue::TBitVector TBitVector;
 
     if (empty(host(obj)))
-        return MaxValue<TPosition>::VALUE;
+        return std::numeric_limits<TPosition>::max();
 
     TConstPackedHostIterator itBegin = begin(host(obj), Standard()) + 1;
     TConstPackedHostIterator it = itBegin;
diff --git a/include/seqan/sequence/string_packed_old.h b/include/seqan/sequence/string_packed_old.h
index 13a2e61..5f8291c 100644
--- a/include/seqan/sequence/string_packed_old.h
+++ b/include/seqan/sequence/string_packed_old.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -701,7 +701,7 @@ struct ClearSpaceStringPacked2_
         typename Size<T>::Type start,
         typename Size<T>::Type end)
     {
-        return _clearSpace_(seq, size, start, end, maxValue<typename Size<T>::Type >());
+        return _clearSpace_(seq, size, start, end, std::numeric_limits<typename Size<T>::Type >::max());
     }
 
     template <typename T>
diff --git a/include/seqan/sequence/string_set_base.h b/include/seqan/sequence/string_set_base.h
index 3e7eee4..7c7f069 100644
--- a/include/seqan/sequence/string_set_base.h
+++ b/include/seqan/sequence/string_set_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -1345,7 +1345,7 @@ assign(StringSet<TString, TSpec> & target,
     TSourceIterator it = begin(source, Standard());
     TSourceIterator itEnd = end(source, Standard());
     for (; it != itEnd; ++it)
-        appendValue(target, getValue(it), tag);
+        appendValue(target, *it, tag);
 }
 
 template <typename TString, typename TSpec, typename TSource>
@@ -1619,6 +1619,7 @@ concat(StringSet<TString, TSpec> const & constMe)
 
 // this function is deprecated and the return value is very ungeneric, e.g. doesn't work if strings are std::string
 template <typename TStrings, typename TDelim>
+[[deprecated]]
 inline String<typename Value<typename Value<TStrings>::Type>::Type>
 concat(TStrings const & strings, TDelim const & delimiter, bool ignoreEmptyStrings = false)
 {
@@ -1665,7 +1666,7 @@ inline void prefixSums(TPrefixSums & sums, TText const & text)
     // Compute symbol frequencies.
     TIter itEnd = end(concat(text), Standard());
     for (TIter it = begin(concat(text), Standard()); it != itEnd; goNext(it))
-        sums[ordValue(static_cast<TValue>(value(it))) + 1]++;
+        sums[ordValue(static_cast<TValue>(*it)) + 1]++;
 
     // Cumulate symbol frequencies.
     partialSum(sums);
diff --git a/include/seqan/sequence/string_set_concat_direct.h b/include/seqan/sequence/string_set_concat_direct.h
index 83285af..ad62793 100644
--- a/include/seqan/sequence/string_set_concat_direct.h
+++ b/include/seqan/sequence/string_set_concat_direct.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // Copyright (c) 2013 NVIDIA Corporation
 // All rights reserved.
 //
@@ -103,21 +103,21 @@ public:
     {}
 
     template <typename TOtherString, typename TOtherSpec>
-    StringSet(StringSet<TOtherString, TOtherSpec> &other)
+    StringSet(StringSet<TOtherString, TOtherSpec> & other)
     {
         _initStringSetLimits(*this);
         assign(*this, other);
     }
 
     template <typename TOtherString, typename TOtherSpec>
-    StringSet(StringSet<TOtherString, TOtherSpec> const &other)
+    StringSet(StringSet<TOtherString, TOtherSpec> const & other)
     {
         _initStringSetLimits(*this);
         assign(*this, other);
     }
 
     template <typename TOtherSpec>
-    StringSet(String<TString, TOtherSpec> const &other)
+    StringSet(String<TString, TOtherSpec> const & other)
     {
         _initStringSetLimits(*this);
         assign(*this, other);
diff --git a/include/seqan/sequence/string_set_dependent_generous.h b/include/seqan/sequence/string_set_dependent_generous.h
index 2209563..7a148dd 100644
--- a/include/seqan/sequence/string_set_dependent_generous.h
+++ b/include/seqan/sequence/string_set_dependent_generous.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/sequence/string_set_dependent_tight.h b/include/seqan/sequence/string_set_dependent_tight.h
index cc89c40..45b74eb 100644
--- a/include/seqan/sequence/string_set_dependent_tight.h
+++ b/include/seqan/sequence/string_set_dependent_tight.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/sequence/string_set_owner.h b/include/seqan/sequence/string_set_owner.h
index dd33981..1dda47b 100644
--- a/include/seqan/sequence/string_set_owner.h
+++ b/include/seqan/sequence/string_set_owner.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -91,7 +91,7 @@ public:
     }
 
     template <typename TOtherString, typename TOtherSpec>
-    StringSet(StringSet<TOtherString, TOtherSpec> const &other) :
+    StringSet(StringSet<TOtherString, TOtherSpec> const & other) :
         limitsValid(true)
     {
         _initStringSetLimits(*this);
@@ -99,7 +99,7 @@ public:
     }
 
     template <typename TOtherSpec>
-    StringSet(String<TString, TOtherSpec> const &other) :
+    StringSet(String<TString, TOtherSpec> const & other) :
         limitsValid(true)
     {
         _initStringSetLimits(*this);
@@ -328,6 +328,7 @@ erase(StringSet<TString, Owner<Default> > & me, TPos pos, TPosEnd posEnd)
 // --------------------------------------------------------------------------
 
 template <typename TString, typename TSpec, typename TId>
+// [[deprecated("Use the subscript operator (operator[]) instead.")]]
 inline typename Reference<StringSet<TString, Owner<TSpec> > >::Type
 getValueById(StringSet<TString, Owner<TSpec> >& me,
             TId const id)
@@ -352,6 +353,7 @@ getValueById(StringSet<TString, Owner<TSpec> > const & me,
 // --------------------------------------------------------------------------
 
 template <typename TString, typename TSpec, typename TId>
+// [[deprecated("Use assignValue instead.")]]
 inline typename Id<StringSet<TString, Owner<TSpec> > >::Type
 assignValueById(StringSet<TString, Owner<TSpec> > & me,
                 TString& obj,
@@ -372,6 +374,7 @@ assignValueById(StringSet<TString, Owner<TSpec> > & me,
 // --------------------------------------------------------------------------
 
 template<typename TString, typename TSpec, typename TId>
+// [[deprecated("Use erase instead.")]]
 inline void
 removeValueById(StringSet<TString, Owner<TSpec> > & me, TId const id)
 {
@@ -385,6 +388,7 @@ removeValueById(StringSet<TString, Owner<TSpec> > & me, TId const id)
 // --------------------------------------------------------------------------
 
 template <typename TString, typename TSpec, typename TPos>
+// [[deprecated("ID is the same as the position")]]
 inline typename Id<StringSet<TString, Owner<TSpec> > >::Type
 positionToId(StringSet<TString, Owner<TSpec> > &,
             TPos const pos)
@@ -397,6 +401,7 @@ positionToId(StringSet<TString, Owner<TSpec> > &,
 // --------------------------------------------------------------------------
 
 template <typename TString, typename TSpec, typename TPos>
+// [[deprecated("ID is the same as the position")]]
 inline typename Id<StringSet<TString, Owner<TSpec> > >::Type
 positionToId(StringSet<TString, Owner<TSpec> > const &,
             TPos const pos)
@@ -409,6 +414,7 @@ positionToId(StringSet<TString, Owner<TSpec> > const &,
 // --------------------------------------------------------------------------
 
 template <typename TString, typename TSpec, typename TId>
+// [[deprecated("ID is the same as the position")]]
 inline typename Id<StringSet<TString, Owner<TSpec> > >::Type
 idToPosition(StringSet<TString, Owner<TSpec> > const&,
             TId const id)
diff --git a/include/seqan/sequence/string_set_segment.h b/include/seqan/sequence/string_set_segment.h
index eb4169d..37569f5 100644
--- a/include/seqan/sequence/string_set_segment.h
+++ b/include/seqan/sequence/string_set_segment.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/sequence_journaled.h b/include/seqan/sequence_journaled.h
index 211adc0..6cfd5e3 100644
--- a/include/seqan/sequence_journaled.h
+++ b/include/seqan/sequence_journaled.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/sequence_journaled/journal_entries_sorted_array.h b/include/seqan/sequence_journaled/journal_entries_sorted_array.h
index 7b39de3..8716d8e 100644
--- a/include/seqan/sequence_journaled/journal_entries_sorted_array.h
+++ b/include/seqan/sequence_journaled/journal_entries_sorted_array.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/sequence_journaled/journal_entry.h b/include/seqan/sequence_journaled/journal_entry.h
index e6bf94e..f7b92cb 100644
--- a/include/seqan/sequence_journaled/journal_entry.h
+++ b/include/seqan/sequence_journaled/journal_entry.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/sequence_journaled/sequence_journaled.h b/include/seqan/sequence_journaled/sequence_journaled.h
index 6713e32..408889e 100644
--- a/include/seqan/sequence_journaled/sequence_journaled.h
+++ b/include/seqan/sequence_journaled/sequence_journaled.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/sequence_journaled/sequence_journaled_iterator.h b/include/seqan/sequence_journaled/sequence_journaled_iterator.h
index 0c5233a..b566ce7 100644
--- a/include/seqan/sequence_journaled/sequence_journaled_iterator.h
+++ b/include/seqan/sequence_journaled/sequence_journaled_iterator.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/sequence_journaled/sequence_journaled_iterator_fast.h b/include/seqan/sequence_journaled/sequence_journaled_iterator_fast.h
index bbec4b8..09436d3 100644
--- a/include/seqan/sequence_journaled/sequence_journaled_iterator_fast.h
+++ b/include/seqan/sequence_journaled/sequence_journaled_iterator_fast.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/simd.h b/include/seqan/simd.h
new file mode 100644
index 0000000..7a29f06
--- /dev/null
+++ b/include/seqan/simd.h
@@ -0,0 +1,143 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Marcel Ehrhardt <marcel.ehrhardt at fu-berlin.de>
+// ==========================================================================
+// generic SIMD interface for SSE3 / AVX2
+// ==========================================================================
+
+#ifndef SEQAN_INCLUDE_SEQAN_SIMD_H_
+#define SEQAN_INCLUDE_SEQAN_SIMD_H_
+
+#include <seqan/basic.h>
+
+// Check if more than simd back end is selected
+#if SEQAN_SEQANSIMD_ENABLED && SEQAN_UMESIMD_ENABLED
+    #error UME::SIMD and SEQAN::SIMD are both enabled, you can only use one SIMD back end.
+#endif
+
+// MSVC doesn't define SSE4 macros, even if instruction set is available (e.g.
+// when AVX is defined)
+#if defined(COMPILER_MSVC) && defined(__AVX__) && !defined(__SSE4_1__) && !defined(__SSE4_2__)
+    #define __SSE4_1__ 1
+    #define __SSE4_2__ 1
+#endif
+
+// Define global macro to check if simd instructions are enabled.
+#if defined(__AVX512F__) || defined(__AVX2__) || (defined(__SSE4_1__) && defined(__SSE4_2__))
+    #define SEQAN_SIMD_ENABLED
+#else
+    #undef SEQAN_SIMD_ENABLED
+    #undef SEQAN_SEQANSIMD_ENABLED
+    #undef SEQAN_UMESIMD_ENABLED
+#endif
+
+// SIMD operations make only sense on modern 64bit architectures.
+#if SEQAN_IS_32_BIT
+    // TODO(marehr): If we switch to jenkins, filter out these warnings
+    #if !(defined(NDEBUG) || defined(SEQAN_ENABLE_TESTING))
+        #pragma message("SIMD acceleration is only available on 64bit systems")
+    #endif
+    #undef SEQAN_SIMD_ENABLED
+    #undef SEQAN_SEQANSIMD_ENABLED
+    #undef SEQAN_UMESIMD_ENABLED
+#endif // SEQAN_IS_32_BIT
+
+// Fallback to seqan's simd implementation if nothing was specified.
+#if defined(SEQAN_SIMD_ENABLED) && !defined(SEQAN_UMESIMD_ENABLED) && !defined(SEQAN_SEQANSIMD_ENABLED)
+    #define SEQAN_SEQANSIMD_ENABLED
+#endif
+
+// Seqan's simd implementation supports only avx2 and sse4.
+#if defined(SEQAN_SEQANSIMD_ENABLED) && !(defined(__AVX2__) || (defined(__SSE4_1__) && defined(__SSE4_2__)))
+    #undef SEQAN_SIMD_ENABLED
+    #undef SEQAN_SEQANSIMD_ENABLED
+#endif
+
+#if defined(SEQAN_SEQANSIMD_ENABLED) && (defined(COMPILER_MSVC) || defined(COMPILER_WINTEL))
+    #error SEQAN::SIMD (vector extension) is not supported by msvc and windows intel compiler, try compiling with -DSEQAN_UMESIMD_ENABLED
+#endif
+
+// SIMD operations have severe performance issues on <= gcc4.9
+#if defined(SEQAN_SEQANSIMD_ENABLED) && defined(COMPILER_GCC) && (__GNUC__ <= 4)
+    // TODO(marehr): If we switch to jenkins, filter out these warnings
+    #if !(defined(NDEBUG) || defined(SEQAN_ENABLE_TESTING))
+        #pragma message("SIMD acceleration was disabled for <=gcc4.9, because of known performance issues " \
+                        "https://github.com/seqan/seqan/issues/2017. Use a more recent gcc compiler.")
+    #endif
+    #undef SEQAN_SIMD_ENABLED
+    #undef SEQAN_SEQANSIMD_ENABLED
+    #undef SEQAN_UMESIMD_ENABLED
+#endif // defined(COMPILER_GCC) && __GNUC__ <= 4
+
+// Define maximal size of vector in byte.
+#if defined(SEQAN_SEQANSIMD_ENABLED) && defined(__AVX512F__) && defined(COMPILER_GCC)
+    // gcc compiler supports auto vectorization
+    #define SEQAN_SIZEOF_MAX_VECTOR 64
+#elif defined(SEQAN_SEQANSIMD_ENABLED) && defined(__AVX512F__)
+    // TODO(marehr): If we switch to jenkins, filter out these warnings
+    #if !(defined(NDEBUG) || defined(SEQAN_ENABLE_TESTING))
+        #pragma message("SEQAN_SIMD doesn't support AVX512 (except gcc), thus falling back to AVX2 " \
+                        "(we are using some back ported instruction for AVX2 which where introduced since AVX512)")
+    #endif
+    #define SEQAN_SIZEOF_MAX_VECTOR 32
+#elif defined(__AVX512F__)
+    #define SEQAN_SIZEOF_MAX_VECTOR 64
+#elif defined(__AVX2__)
+    #define SEQAN_SIZEOF_MAX_VECTOR 32
+#elif defined(__SSE4_1__) && defined(__SSE4_2__)
+    #define SEQAN_SIZEOF_MAX_VECTOR 16
+#endif
+
+#include "simd/simd_base.h"
+#include "simd/simd_base_seqan_impl.h"
+
+#if defined(SEQAN_SEQANSIMD_ENABLED)
+    #if SEQAN_SIZEOF_MAX_VECTOR >= 16
+    #include "simd/simd_base_seqan_impl_sse4.2.h"
+    #endif // SEQAN_SIZEOF_MAX_VECTOR >= 16
+
+    #if SEQAN_SIZEOF_MAX_VECTOR >= 32
+    #include "simd/simd_base_seqan_impl_avx2.h"
+    #endif // SEQAN_SIZEOF_MAX_VECTOR >= 32
+
+    #if SEQAN_SIZEOF_MAX_VECTOR >= 64
+    #include "simd/simd_base_seqan_impl_avx512.h"
+    #endif // SEQAN_SIZEOF_MAX_VECTOR >= 64
+
+    #include "simd/simd_base_seqan_interface.h"
+#endif // defined(SEQAN_SEQANSIMD_ENABLED)
+
+#if defined(SEQAN_UMESIMD_ENABLED)
+    #include "simd/simd_base_umesimd_impl.h"
+#endif
+
+#endif // SEQAN_INCLUDE_SEQAN_SIMD_H_
diff --git a/include/seqan/simd/simd_base.h b/include/seqan/simd/simd_base.h
new file mode 100644
index 0000000..59f5dcd
--- /dev/null
+++ b/include/seqan/simd/simd_base.h
@@ -0,0 +1,390 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Marcel Ehrhardt <marcel.ehrhardt at fu-berlin.de>
+// ==========================================================================
+// generic SIMD interface for SSE3 / AVX2
+// ==========================================================================
+
+#ifndef SEQAN_INCLUDE_SEQAN_SIMD_SIMD_BASE_H_
+#define SEQAN_INCLUDE_SEQAN_SIMD_SIMD_BASE_H_
+
+namespace seqan
+{
+
+// a metafunction returning the biggest supported SIMD vector
+template <typename TValue, int LENGTH>
+struct SimdVector;
+
+template <typename TValue, int LENGTH>
+struct Value<SimdVector<TValue, LENGTH> >
+{
+    typedef TValue Type;
+};
+
+template <typename TValue, int LENGTH>
+struct Value<SimdVector<TValue, LENGTH> const> :
+    public Value<SimdVector<TValue, LENGTH> >
+{};
+
+template <typename TValue, int LENGTH_>
+struct LENGTH<SimdVector<TValue, LENGTH_> >
+{
+    enum { VALUE = LENGTH_ };
+};
+
+template <typename TValue, int LENGTH_>
+struct LENGTH<SimdVector<TValue, LENGTH_> const> :
+    public LENGTH<SimdVector<TValue, LENGTH_> >
+{};
+
+// define a concept and its models
+// they allow us to define generic vector functions
+SEQAN_CONCEPT(SimdMaskVectorConcept, (TSimdMaskVector))
+{
+    typedef typename Reference<TSimdMaskVector>::Type TReference;
+
+    TSimdMaskVector a;
+
+    SEQAN_CONCEPT_USAGE(SimdMaskVectorConcept)
+    {
+        static_assert(IsSameType<decltype(a[0]), TReference>::VALUE, "Type of a[] should be the same as the reference type of a.");
+    }
+};
+
+SEQAN_CONCEPT_REFINE(SimdVectorConcept, (TSimdVector), (SimdMaskVectorConcept))
+{
+    SEQAN_CONCEPT_USAGE(SimdVectorConcept)
+    {}
+};
+
+template <typename TSimdVector, typename TIsSimdVec>
+struct SimdMaskVectorImpl {
+    using Type = Nothing;
+};
+
+/**
+ * SimdMaskVector is the return type of all logical operations of simd vectors
+ * like comparisons.
+ *
+ * ```
+ * using TSimdVector = SimdVector<uint32_t, 4>::Type;
+ * using TSimdMaskVector = SimdMaskVector<TSimdVector>::Type;
+ *
+ * TSimdVector vec1 {2, 4, 8, 16}, vec2 {16, 8, 4, 2};
+ * TSimdMaskVector cmp = vec1 > vec2; // cmp = {false, false, true, true}
+ * ```
+ */
+template <typename TSimdVector>
+struct SimdMaskVector : SimdMaskVectorImpl<TSimdVector, typename Is<SimdVectorConcept<TSimdVector> >::Type >
+{
+};
+
+template <typename TSimdVector, typename TIsSimdVec>
+struct SimdSwizzleVectorImpl;
+
+/**
+ * SimdSwizzleVector is needed for shuffleVector() as index type.
+ *
+ * ```
+ * using TSimdVector = SimdVector<uint32_t, 4>::Type;
+ * using TSimdSwizzleVector = SimdSwizzleVector<TSimdVector>::Type;
+ *
+ * TSimdVector vec {2, 4, 8, 16}, res;
+ * TSimdSwizzleVector swizzle {3, 2, 0, 2};
+ *
+ * res = shuffleVector(vec, swizzle); // res = {16, 8, 2, 8}
+ * ```
+ */
+template <typename TSimdVector>
+struct SimdSwizzleVector : SimdSwizzleVectorImpl<TSimdVector, typename Is<SimdVectorConcept<TSimdVector> >::Type >
+{};
+
+/**
+ * ```
+ * getValue(a, pos);
+ *
+ * // same as
+ *
+ * a[pos];
+ * ```
+ */
+template <typename TSimdVector, typename TPosition>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, typename Value<TSimdVector>::Type)
+getValue(TSimdVector const & vector, TPosition const pos);
+
+/**
+ * ```
+ * value(a, pos);
+ *
+ * // same as
+ *
+ * a[pos];
+ * ```
+ */
+template <typename TSimdVector, typename TPosition>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, typename Value<TSimdVector>::Type)
+value(TSimdVector const & vector, TPosition const pos);
+
+/**
+ * ```
+ * assignValue(a, pos, value);
+ *
+ * // same as
+ *
+ * a[pos] = value;
+ * ```
+ */
+template <typename TSimdVector, typename TPosition, typename TValue2>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, void)
+assignValue(TSimdVector & vector, TPosition const pos, TValue2 const value);
+
+template <int ROWS, typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, void)
+transpose(TSimdVector matrix[ROWS]);
+
+/**
+ * ```
+ * clearVector(a);
+ *
+ * // same as
+ *
+ * for(auto i = 0u; i < LENGTH; ++i)
+ *     c[i] = 0;
+ * ```
+ */
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, void)
+clearVector(TSimdVector & vector);
+
+/**
+ * ```
+ * auto c = createVector<SimdVector4Int>(a);
+ *
+ * // same as
+ *
+ * for(auto i = 0u; i < LENGTH; ++i)
+ *     c[i] = a;
+ * ```
+ */
+template <typename TSimdVector, typename TValue>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+createVector(TValue const x);
+
+/**
+ * ```
+ * fillVector(a, 1, 3, 23, 1337);
+ *
+ * // same as
+ *
+ * a[0] = 1;
+ * a[1] = 3;
+ * a[2] = 13;
+ * a[3] = 1337;
+ * ```
+ */
+template <typename TSimdVector, typename ...TValue>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, void)
+fillVector(TSimdVector & vector, TValue const... args);
+
+/**
+ * ```
+ * auto c = cmpEq(a, b);
+ *
+ * // same as
+ *
+ * auto c = a == b;
+ * ```
+ *
+ * NOTE:
+ * The type of c might change from unsigned to signed if auto is used
+ *
+ * ```
+ * using TSimdVector = SimdVector<uint32_t, 4>::Type;
+ * TSimdVector a, b;
+ *
+ * auto c = a == b; // type of c might change to SimdVector<int32_t, 4>::Type
+ * TSimdVector d = a == b; // has the same type
+ * ```
+ */
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, typename SimdMaskVector<TSimdVector>::Type)
+cmpEq (TSimdVector const & a, TSimdVector const & b);
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, typename SimdMaskVector<TSimdVector>::Type)
+operator==(TSimdVector const & a, TSimdVector const & b);
+
+/**
+ * ```
+ * auto c = cmpGt(a, b);
+ *
+ * // same as
+ *
+ * auto c = a > b;
+ * ```
+ *
+ * NOTE:
+ * The type of c might change from unsigned to signed if auto is used
+ *
+ * ```
+ * using TSimdVector = SimdVector<uint32_t, 4>::Type;
+ * using TSimdMaskVector = SimdMaskVector<TSimdVector>::Type;
+ * TSimdVector a, b;
+ *
+ * auto c = a > b; // type of c might change to SimdVector<int32_t, 4>::Type
+ * TSimdMaskVector d = a > b; // has the same type
+ * ```
+ */
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, typename SimdMaskVector<TSimdVector>::Type)
+cmpGt (TSimdVector const & a, TSimdVector const & b);
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, typename SimdMaskVector<TSimdVector>::Type)
+operator>(TSimdVector const & a, TSimdVector const & b);
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+max(TSimdVector const & a, TSimdVector const & b);
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+min(TSimdVector const & a, TSimdVector const & b);
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+operator|(TSimdVector const & a, TSimdVector const & b);
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector &)
+operator|=(TSimdVector & a, TSimdVector const & b);
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+operator&(TSimdVector const & a, TSimdVector const & b);
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector &)
+operator&=(TSimdVector & a, TSimdVector const & b);
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+operator~(TSimdVector const & a);
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+operator+(TSimdVector const & a, TSimdVector const & b);
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+operator-(TSimdVector const & a, TSimdVector const & b);
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+operator*(TSimdVector const & a, TSimdVector const & b);
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+operator/(TSimdVector const & a, TSimdVector const & b);
+
+/**
+ * ```
+ * c = andNot(a, b);
+ *
+ * // same as
+ *
+ * for(auto i = 0u; i < LENGTH; ++i)
+ *     c[i] = (~a[i]) & b[i];
+ * ```
+ */
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+andNot(TSimdVector const & a, TSimdVector const & b);
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+shiftRightLogical(TSimdVector const & vector, const int imm);
+
+template <typename TSimdVector, typename TSimdVectorMask>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+blend(TSimdVector const & a, TSimdVector const & b, TSimdVectorMask const & mask);
+
+/**
+ * Unaligned store, i.e. memAddr does not need to be aligned (e.g. SEE4.2 16byte
+ * aligned, AVX2 32byte aligned).
+ */
+template <typename T, typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, void)
+storeu(T * memAddr, TSimdVector const & vec);
+
+/**
+ * Aligned load, i.e. memAddr MUST be aligned (e.g. SEE4.2 16byte
+ * aligned, AVX2 32byte aligned).
+ */
+template <typename TSimdVector, typename T>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+load(T const * memAddr);
+
+template <typename TValue, typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+gather(TValue const * memAddr, TSimdVector const & idx);
+
+template <typename TSimdVector1, typename TSimdVector2>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector1> >, TSimdVector1)
+shuffleVector(TSimdVector1 const & vector, TSimdVector2 const & indices);
+
+// NOTE(rmaerker): Make this function available, also if SIMD is not enabled.
+template <typename TSimdVector, typename TValue>
+inline SEQAN_FUNC_ENABLE_IF(Is<NumberConcept<TSimdVector>>, TSimdVector)
+createVector(TValue const x)
+{
+    return x;
+}
+
+// --------------------------------------------------------------------------
+// Function print()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdMaskVectorConcept<TSimdVector> >, std::ostream &)
+print(std::ostream & stream, TSimdVector const & vector)
+{
+    stream << '<';
+    for (int i = 0; i < LENGTH<TSimdVector>::VALUE; ++i)
+        stream << '\t' << vector[i];
+    stream << "\t>\n";
+    return stream;
+}
+
+}  // namespace seqan
+
+#endif // SEQAN_INCLUDE_SEQAN_SIMD_SIMD_BASE_H_
diff --git a/include/seqan/simd/simd_base_seqan_impl.h b/include/seqan/simd/simd_base_seqan_impl.h
new file mode 100644
index 0000000..6f98254
--- /dev/null
+++ b/include/seqan/simd/simd_base_seqan_impl.h
@@ -0,0 +1,154 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+//         René Rahn <rene.rahn at fu-berlin.de>
+//         Stefan Budach <stefan.budach at fu-berlin.de>
+// ==========================================================================
+// generic SIMD interface for SSE3 / AVX2
+// ==========================================================================
+
+#ifndef SEQAN_INCLUDE_SEQAN_SIMD_SIMD_BASE_SEQAN_IMPL_H_
+#define SEQAN_INCLUDE_SEQAN_SIMD_SIMD_BASE_SEQAN_IMPL_H_
+
+#include <utility>
+#include <tuple>
+
+#if defined(PLATFORM_WINDOWS_VS)
+  /* Microsoft C/C++-compatible compiler */
+  #include <intrin.h>
+#elif defined(PLATFORM_GCC) && (defined(__x86_64__) || defined(__i386__))
+  /* GCC-compatible compiler, targeting x86/x86-64 */
+  #include <x86intrin.h>
+#elif defined(SEQAN_SIMD_ENABLED)
+  #pragma message "You are trying to build with -DSEQAN_SIMD_ENABLED, which might be " \
+  "auto-defined if AVX or SSE was enabled (e.g. -march=native, -msse4, ...), " \
+  "but we only support x86/x86-64 architectures for SIMD vectorization! " \
+  "You might want to use UME::SIMD (https://github.com/edanor/umesimd) combined " \
+  "with -DSEQAN_UMESIMD_ENABLED for a different SIMD backend."
+#endif
+
+namespace seqan {
+
+#ifdef COMPILER_LINTEL
+#include <type_traits>
+#define SEQAN_VECTOR_CAST_(T, v) static_cast<typename std::decay<T>::type>(v)
+#define SEQAN_VECTOR_CAST_LVALUE_(T, v) static_cast<T>(v)
+#else
+#define SEQAN_VECTOR_CAST_(T, v) reinterpret_cast<T>(v)
+#define SEQAN_VECTOR_CAST_LVALUE_(T, v) reinterpret_cast<T>(v)
+#endif
+
+// ============================================================================
+// Forwards
+// ============================================================================
+
+// ============================================================================
+// Useful Macros
+// ============================================================================
+
+#define SEQAN_DEFINE_SIMD_VECTOR_GETVALUE_(TSimdVector)                                                 \
+template <typename TPosition>                                                                           \
+inline typename Value<TSimdVector>::Type                                                                \
+getValue(TSimdVector & vector, TPosition const pos)                                                     \
+{                                                                                                       \
+    return vector[pos];                                                                                 \
+}
+
+#define SEQAN_DEFINE_SIMD_VECTOR_VALUE_(TSimdVector)                                                    \
+template <typename TPosition>                                                                           \
+inline typename Value<TSimdVector>::Type                                                                \
+value(TSimdVector & vector, TPosition const pos)                                                        \
+{                                                                                                       \
+    return getValue(vector, pos);                                                                       \
+}
+
+#define SEQAN_DEFINE_SIMD_VECTOR_ASSIGNVALUE_(TSimdVector)                                              \
+template <typename TPosition, typename TValue2>                                                         \
+inline void                                                                                             \
+assignValue(TSimdVector & vector, TPosition const pos, TValue2 const value)                             \
+{                                                                                                       \
+    vector[pos] = value;                                                                                \
+}
+
+// Only include following code if simd instructions are enabled.
+#ifdef SEQAN_SIMD_ENABLED
+
+// ============================================================================
+// Tags, Classes, Enums
+// ============================================================================
+
+// a metafunction returning the biggest supported SIMD vector
+template <typename TValue, int LENGTH = SEQAN_SIZEOF_MAX_VECTOR / sizeof(TValue)>
+struct SimdVector;
+
+// internal struct to specialize for vector parameters
+// VEC_SIZE    = Vector size := sizeof(vec)
+// LENGTH      = number of elements := VEC_SIZE / sizeof(InnerValue<TVec>::Type)
+// SCALAR_TYPE = the scalar type of the vector (maybe optional, if the type
+//               doesn't matter for the operation)
+template <int VEC_SIZE, int LENGTH = 0, typename SCALAR_TYPE = void>
+struct SimdParams_
+{};
+
+// internal traits meta-function to capture correct the mask type.
+template <typename TSimdVector, typename TSimdParams>
+struct SimdVectorTraits
+{
+    using MaskType = TSimdVector;
+};
+
+// internal struct to specialize for matrix parameters
+template <int ROWS, int COLS, int BITS_PER_VALUE>
+struct SimdMatrixParams_
+{};
+
+#define SEQAN_DEFINE_SIMD_VECTOR_(TSimdVector, TValue, SIZEOF_VECTOR)                                           \
+        typedef TValue TSimdVector __attribute__ ((__vector_size__(SIZEOF_VECTOR)));                            \
+        template <> struct SimdVector<TValue, SIZEOF_VECTOR / sizeof(TValue)> {  typedef TSimdVector Type; };   \
+        template <> struct Value<TSimdVector>           { typedef TValue Type; };                               \
+        template <> struct Value<TSimdVector const>:  public Value<TSimdVector> {};                             \
+        template <> struct LENGTH<TSimdVector>          { enum { VALUE = SIZEOF_VECTOR / sizeof(TValue) }; };   \
+        template <> struct LENGTH<TSimdVector const>: public LENGTH<TSimdVector> {};                            \
+        SEQAN_DEFINE_SIMD_VECTOR_GETVALUE_(TSimdVector)                                                         \
+        SEQAN_DEFINE_SIMD_VECTOR_GETVALUE_(TSimdVector const)                                                   \
+        SEQAN_DEFINE_SIMD_VECTOR_VALUE_(TSimdVector)                                                            \
+        SEQAN_DEFINE_SIMD_VECTOR_VALUE_(TSimdVector const)                                                      \
+        SEQAN_DEFINE_SIMD_VECTOR_ASSIGNVALUE_(TSimdVector)                                                      \
+        template <>                                                                                             \
+        SEQAN_CONCEPT_IMPL((TSimdVector),       (SimdVectorConcept));                                           \
+        template <>                                                                                             \
+        SEQAN_CONCEPT_IMPL((TSimdVector const), (SimdVectorConcept));
+#endif  // SEQAN_SIMD_ENABLED
+
+} // namespace seqan
+
+#endif // SEQAN_INCLUDE_SEQAN_SIMD_SIMD_BASE_SEQAN_IMPL_H_
diff --git a/include/seqan/simd/simd_base_seqan_impl_avx2.h b/include/seqan/simd/simd_base_seqan_impl_avx2.h
new file mode 100644
index 0000000..cae230f
--- /dev/null
+++ b/include/seqan/simd/simd_base_seqan_impl_avx2.h
@@ -0,0 +1,1492 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+//         René Rahn <rene.rahn at fu-berlin.de>
+//         Stefan Budach <stefan.budach at fu-berlin.de>
+// ==========================================================================
+// generic SIMD interface for SSE3 / AVX2
+// ==========================================================================
+
+#ifndef SEQAN_INCLUDE_SEQAN_SIMD_SIMD_BASE_SEQAN_IMPL_AVX2_H_
+#define SEQAN_INCLUDE_SEQAN_SIMD_SIMD_BASE_SEQAN_IMPL_AVX2_H_
+
+namespace seqan {
+
+// SimdParams_<32, 32>: 256bit = 32 elements * 8bit
+SEQAN_DEFINE_SIMD_VECTOR_(SimdVector32Char,     char,           32)
+SEQAN_DEFINE_SIMD_VECTOR_(SimdVector32SChar,    signed char,    32)
+SEQAN_DEFINE_SIMD_VECTOR_(SimdVector32UChar,    unsigned char,  32)
+
+// SimdParams_<32, 16>: 256bit = 16 elements * 2 * 8bit
+SEQAN_DEFINE_SIMD_VECTOR_(SimdVector16Short,    short,          32)
+SEQAN_DEFINE_SIMD_VECTOR_(SimdVector16UShort,   unsigned short, 32)
+
+// SimdParams_<32, 8>: 256bit = 8 elements * 4 * 8bit
+SEQAN_DEFINE_SIMD_VECTOR_(SimdVector8Int,       int,            32)
+SEQAN_DEFINE_SIMD_VECTOR_(SimdVector8UInt,      unsigned int,   32)
+
+// SimdParams_<32, 4>: 256bit = 4 elements * 8 * 8bit
+SEQAN_DEFINE_SIMD_VECTOR_(SimdVector4Int64,     int64_t,        32)
+SEQAN_DEFINE_SIMD_VECTOR_(SimdVector4UInt64,    uint64_t,       32)
+
+// ============================================================================
+// Functions
+// ============================================================================
+
+// ============================================================================
+// AVX/AVX2 wrappers (256bit vectors)
+// ============================================================================
+
+// --------------------------------------------------------------------------
+// _fillVector (256bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector, typename ...TValue>
+inline void
+_fillVector(TSimdVector & vector,
+            std::tuple<TValue...> const & x,
+            std::index_sequence<0> const &, SimdParams_<32, 32>)
+{
+    vector = SEQAN_VECTOR_CAST_(TSimdVector, _mm256_set1_epi8(std::get<0>(x)));
+}
+
+template <typename TSimdVector, typename ...TValue>
+inline void
+_fillVector(TSimdVector & vector,
+            std::tuple<TValue...> const & x,
+            std::index_sequence<0> const &, SimdParams_<32, 16>)
+{
+    vector = SEQAN_VECTOR_CAST_(TSimdVector, _mm256_set1_epi16(std::get<0>(x)));
+}
+
+template <typename TSimdVector, typename ...TValue>
+inline void
+_fillVector(TSimdVector & vector,
+            std::tuple<TValue...> const & x,
+            std::index_sequence<0> const &, SimdParams_<32, 8>)
+{
+    vector = SEQAN_VECTOR_CAST_(TSimdVector, _mm256_set1_epi32(std::get<0>(x)));
+}
+
+template <typename TSimdVector, typename ...TValue>
+inline void
+_fillVector(TSimdVector & vector,
+            std::tuple<TValue...> const & x,
+            std::index_sequence<0> const &, SimdParams_<32, 4>)
+{
+    vector = SEQAN_VECTOR_CAST_(TSimdVector, _mm256_set1_epi64x(std::get<0>(x)));
+}
+
+template <typename TSimdVector, typename ...TValue, size_t ...INDICES>
+inline void
+_fillVector(TSimdVector & vector,
+            std::tuple<TValue...> const & args, std::index_sequence<INDICES...> const &, SimdParams_<32, 32>)
+{
+    vector = SEQAN_VECTOR_CAST_(TSimdVector, _mm256_setr_epi8(std::get<INDICES>(args)...));
+}
+
+template <typename TSimdVector, typename ...TValue, size_t ...INDICES>
+inline void
+_fillVector(TSimdVector & vector,
+            std::tuple<TValue...> const & args, std::index_sequence<INDICES...> const &, SimdParams_<32, 16>)
+{
+    vector = SEQAN_VECTOR_CAST_(TSimdVector, _mm256_setr_epi16(std::get<INDICES>(args)...));
+}
+template <typename TSimdVector, typename ...TValue, size_t ...INDICES>
+inline void
+_fillVector(TSimdVector & vector,
+            std::tuple<TValue...> const & args, std::index_sequence<INDICES...> const &, SimdParams_<32, 8>)
+{
+    vector = SEQAN_VECTOR_CAST_(TSimdVector, _mm256_setr_epi32(std::get<INDICES>(args)...));
+}
+
+template <typename TSimdVector, typename ...TValue, size_t ...INDICES>
+inline void
+_fillVector(TSimdVector & vector,
+            std::tuple<TValue...> const & args, std::index_sequence<INDICES...> const &, SimdParams_<32, 4>)
+{
+    // reverse argument list 0, 1, 2, 3 -> 3, 2, 1, 0
+    // NOTE(marehr): Intel linux fails to reverse argument list and only
+    // _mm256_set_epi64x has no reverse equivalent
+    vector = SEQAN_VECTOR_CAST_(TSimdVector, _mm256_set_epi64x(std::get<sizeof...(INDICES) - 1 - INDICES>(args)...));
+}
+
+// --------------------------------------------------------------------------
+// _clearVector (256bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector, int L>
+inline void _clearVector(TSimdVector & vector, SimdParams_<32, L>)
+{
+    vector = SEQAN_VECTOR_CAST_(TSimdVector, _mm256_setzero_si256());
+}
+
+// --------------------------------------------------------------------------
+// _createVector (256bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector, typename TValue>
+inline TSimdVector _createVector(TValue const x, SimdParams_<32, 32>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_set1_epi8(x));
+}
+
+template <typename TSimdVector, typename TValue>
+inline TSimdVector _createVector(TValue const x, SimdParams_<32, 16>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_set1_epi16(x));
+}
+
+template <typename TSimdVector, typename TValue>
+inline TSimdVector _createVector(TValue const x, SimdParams_<32, 8>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_set1_epi32(x));
+}
+
+template <typename TSimdVector, typename TValue>
+inline TSimdVector _createVector(TValue const x, SimdParams_< 32, 4>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_set1_epi64x(x));
+}
+
+// --------------------------------------------------------------------------
+// _cmpEq (256bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline TSimdVector _cmpEq(TSimdVector const & a, TSimdVector const & b, SimdParams_<32, 32>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_cmpeq_epi8(SEQAN_VECTOR_CAST_(const __m256i&, a),
+                                                             SEQAN_VECTOR_CAST_(const __m256i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _cmpEq(TSimdVector const & a, TSimdVector const & b, SimdParams_<32, 16>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_cmpeq_epi16(SEQAN_VECTOR_CAST_(const __m256i&, a),
+                                                              SEQAN_VECTOR_CAST_(const __m256i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _cmpEq(TSimdVector const & a, TSimdVector const & b, SimdParams_<32, 8>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_cmpeq_epi32(SEQAN_VECTOR_CAST_(const __m256i&, a),
+                                                              SEQAN_VECTOR_CAST_(const __m256i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _cmpEq(TSimdVector const & a, TSimdVector const & b, SimdParams_<32, 4>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_cmpeq_epi64(SEQAN_VECTOR_CAST_(const __m256i&, a),
+                                                              SEQAN_VECTOR_CAST_(const __m256i&, b)));
+}
+
+// --------------------------------------------------------------------------
+// _cmpGt (256bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline TSimdVector _cmpGt(TSimdVector const & a, TSimdVector const & b, SimdParams_<32, 32, int8_t>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_cmpgt_epi8(SEQAN_VECTOR_CAST_(const __m256i&, a),
+                                                             SEQAN_VECTOR_CAST_(const __m256i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _cmpGt(TSimdVector const & a, TSimdVector const & b, SimdParams_<32, 32, uint8_t>)
+{
+    // There is no unsigned cmpgt, we reduce it to the signed case.
+    // Note that 0x80 = ~0x7F (prevent overflow messages).
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm256_cmpgt_epi8(
+                                  _mm256_xor_si256(SEQAN_VECTOR_CAST_(const __m256i&, a), _mm256_set1_epi8(~0x7F)),
+                                  _mm256_xor_si256(SEQAN_VECTOR_CAST_(const __m256i&, b), _mm256_set1_epi8(~0x7F))));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _cmpGt(TSimdVector const & a, TSimdVector const & b, SimdParams_<32, 16, int16_t>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_cmpgt_epi16(SEQAN_VECTOR_CAST_(const __m256i&, a),
+                                                              SEQAN_VECTOR_CAST_(const __m256i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _cmpGt(TSimdVector const & a, TSimdVector const & b, SimdParams_<32, 16, uint16_t>)
+{
+    // There is no unsigned cmpgt, we reduce it to the signed case.
+    // Note that 0x8000 = ~0x7FFF (prevent overflow messages).
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm256_cmpgt_epi16(
+                                  _mm256_xor_si256(SEQAN_VECTOR_CAST_(const __m256i&, a), _mm256_set1_epi16(~0x7FFF)),
+                                  _mm256_xor_si256(SEQAN_VECTOR_CAST_(const __m256i&, b), _mm256_set1_epi16(~0x7FFF))));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _cmpGt(TSimdVector const & a, TSimdVector const & b, SimdParams_<32, 8, int32_t>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_cmpgt_epi32(SEQAN_VECTOR_CAST_(const __m256i&, a),
+                                                              SEQAN_VECTOR_CAST_(const __m256i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _cmpGt(TSimdVector const & a, TSimdVector const & b, SimdParams_<32, 8, uint32_t>)
+{
+    // There is no unsigned cmpgt, we reduce it to the signed case.
+    // Note that 0x80000000 = ~0x7FFFFFFF (prevent overflow messages).
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm256_cmpgt_epi32(
+                                  _mm256_xor_si256(SEQAN_VECTOR_CAST_(const __m256i&, a), _mm256_set1_epi32(~0x7FFFFFFF)),
+                                  _mm256_xor_si256(SEQAN_VECTOR_CAST_(const __m256i&, b), _mm256_set1_epi32(~0x7FFFFFFF))));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _cmpGt(TSimdVector const & a, TSimdVector const & b, SimdParams_<32, 4, int64_t>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_cmpgt_epi64(SEQAN_VECTOR_CAST_(const __m256i&, a),
+                                                              SEQAN_VECTOR_CAST_(const __m256i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _cmpGt(TSimdVector const & a, TSimdVector const & b, SimdParams_<32, 4, uint64_t>)
+{
+    // There is no unsigned cmpgt, we reduce it to the signed case.
+    // Note that 0x8000000000000000ul = ~0x7FFFFFFFFFFFFFFFul (prevent overflow messages).
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm256_cmpgt_epi64(
+                                  _mm256_xor_si256(SEQAN_VECTOR_CAST_(const __m256i&, a) ,_mm256_set1_epi64x(~0x7FFFFFFFFFFFFFFFul)),
+                                  _mm256_xor_si256(SEQAN_VECTOR_CAST_(const __m256i&, b), _mm256_set1_epi64x(~0x7FFFFFFFFFFFFFFFul))));
+}
+
+// --------------------------------------------------------------------------
+// _bitwiseOr (256bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector, int L>
+inline TSimdVector _bitwiseOr(TSimdVector const & a, TSimdVector const & b, SimdParams_<32, L>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_or_si256(SEQAN_VECTOR_CAST_(const __m256i&, a),
+                                                           SEQAN_VECTOR_CAST_(const __m256i&, b)));
+}
+
+// --------------------------------------------------------------------------
+// _bitwiseAnd (256bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector, int L>
+inline TSimdVector _bitwiseAnd(TSimdVector const & a, TSimdVector const & b, SimdParams_<32, L>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_and_si256(SEQAN_VECTOR_CAST_(const __m256i&, a),
+                                                            SEQAN_VECTOR_CAST_(const __m256i&, b)));
+}
+
+// --------------------------------------------------------------------------
+// _bitwiseAndNot (256bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector, int L>
+inline TSimdVector _bitwiseAndNot(TSimdVector const & a, TSimdVector const & b, SimdParams_<32, L>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_andnot_si256(SEQAN_VECTOR_CAST_(const __m256i&, a),
+                                                               SEQAN_VECTOR_CAST_(const __m256i&, b)));
+}
+
+// --------------------------------------------------------------------------
+// _bitwiseNot (256bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline TSimdVector _bitwiseNot(TSimdVector const & a, SimdParams_<32, 32>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm256_cmpeq_epi8(SEQAN_VECTOR_CAST_(const __m256i&, a), _mm256_setzero_si256()));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _bitwiseNot(TSimdVector const & a, SimdParams_<32, 16>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm256_cmpeq_epi16(SEQAN_VECTOR_CAST_(const __m256i&, a), _mm256_setzero_si256()));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _bitwiseNot(TSimdVector const & a, SimdParams_<32, 8>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm256_cmpeq_epi32(SEQAN_VECTOR_CAST_(const __m256i&, a), _mm256_setzero_si256()));
+
+}
+template <typename TSimdVector>
+inline TSimdVector _bitwiseNot(TSimdVector const & a, SimdParams_<32, 4>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm256_cmpeq_epi64(SEQAN_VECTOR_CAST_(const __m256i&, a), _mm256_setzero_si256()));
+}
+
+// --------------------------------------------------------------------------
+// _divide (256bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline TSimdVector _divide(TSimdVector const & a, int b, SimdParams_<32, 32>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_div_epi8(a, _mm256_set1_epi8(b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _divide(TSimdVector const & a, int b, SimdParams_<32, 16>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_div_epi16(a, _mm256_set1_epi16(b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _divide(TSimdVector const & a, int b, SimdParams_<32, 8>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_div_epi32(a, _mm256_set1_epi32(b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _divide(TSimdVector const & a, int b, SimdParams_<32, 4>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_div_epi64(a, _mm256_set1_epi64x(b)));
+}
+
+// --------------------------------------------------------------------------
+// _add (256bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline TSimdVector _add(TSimdVector const & a, TSimdVector const & b, SimdParams_<32, 32>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm256_add_epi8(SEQAN_VECTOR_CAST_(const __m256i&, a),
+                                              SEQAN_VECTOR_CAST_(const __m256i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _add(TSimdVector const & a, TSimdVector const & b, SimdParams_<32, 16>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm256_add_epi16(SEQAN_VECTOR_CAST_(const __m256i&, a),
+                                               SEQAN_VECTOR_CAST_(const __m256i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _add(TSimdVector const & a, TSimdVector const & b, SimdParams_<32, 8>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm256_add_epi32(SEQAN_VECTOR_CAST_(const __m256i&, a),
+                                               SEQAN_VECTOR_CAST_(const __m256i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _add(TSimdVector const & a, TSimdVector const & b, SimdParams_<32, 4>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm256_add_epi64(SEQAN_VECTOR_CAST_(const __m256i&, a),
+                                               SEQAN_VECTOR_CAST_(const __m256i&, b)));
+}
+
+// --------------------------------------------------------------------------
+// _sub (256bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline TSimdVector _sub(TSimdVector const & a, TSimdVector const & b, SimdParams_<32, 32>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm256_sub_epi8(SEQAN_VECTOR_CAST_(const __m256i&, a),
+                                              SEQAN_VECTOR_CAST_(const __m256i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _sub(TSimdVector const & a, TSimdVector const & b, SimdParams_<32, 16>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm256_sub_epi16(SEQAN_VECTOR_CAST_(const __m256i&, a),
+                                               SEQAN_VECTOR_CAST_(const __m256i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _sub(TSimdVector const & a, TSimdVector const & b, SimdParams_<32, 8>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm256_sub_epi32(SEQAN_VECTOR_CAST_(const __m256i&, a),
+                                               SEQAN_VECTOR_CAST_(const __m256i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _sub(TSimdVector const & a, TSimdVector const & b, SimdParams_<32, 4>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm256_sub_epi64(SEQAN_VECTOR_CAST_(const __m256i&, a),
+                                               SEQAN_VECTOR_CAST_(const __m256i&, b)));
+}
+
+// --------------------------------------------------------------------------
+// _mult (256bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline TSimdVector _mult(TSimdVector const & a, TSimdVector const &/*b*/, SimdParams_<32, 32>)
+{
+    SEQAN_SKIP_TEST;
+    SEQAN_ASSERT_FAIL("AVX2 intrinsics for multiplying 8 bit values not implemented!");
+    return a;
+}
+
+template <typename TSimdVector>
+inline TSimdVector _mult(TSimdVector const & a, TSimdVector const & b, SimdParams_<32, 16>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm256_mullo_epi16(SEQAN_VECTOR_CAST_(const __m256i&, a),
+                                                 SEQAN_VECTOR_CAST_(const __m256i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _mult(TSimdVector const & a, TSimdVector const & b, SimdParams_<32, 8>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm256_mullo_epi32(SEQAN_VECTOR_CAST_(const __m256i&, a),
+                                                 SEQAN_VECTOR_CAST_(const __m256i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _mult(TSimdVector const & a, TSimdVector const &/*b*/, SimdParams_<32, 4>)
+{
+    SEQAN_SKIP_TEST;
+    SEQAN_ASSERT_FAIL("AVX2 intrinsics for multiplying 64 bit values not implemented!");
+    return a;
+}
+
+// --------------------------------------------------------------------------
+// _max (256bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline TSimdVector _max(TSimdVector const & a, TSimdVector const & b, SimdParams_<32, 32, int8_t>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm256_max_epi8(SEQAN_VECTOR_CAST_(const __m256i&, a),
+                                              SEQAN_VECTOR_CAST_(const __m256i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _max(TSimdVector const & a, TSimdVector const & b, SimdParams_<32, 32, uint8_t>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm256_max_epu8(SEQAN_VECTOR_CAST_(const __m256i&, a),
+                                              SEQAN_VECTOR_CAST_(const __m256i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _max(TSimdVector const & a, TSimdVector const & b, SimdParams_<32, 16, int16_t>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm256_max_epi16(SEQAN_VECTOR_CAST_(const __m256i&, a),
+                                               SEQAN_VECTOR_CAST_(const __m256i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _max(TSimdVector const & a, TSimdVector const & b, SimdParams_<32, 16, uint16_t>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm256_max_epu16(SEQAN_VECTOR_CAST_(const __m256i&, a),
+                                               SEQAN_VECTOR_CAST_(const __m256i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _max(TSimdVector const & a, TSimdVector const & b, SimdParams_<32, 8, int32_t>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm256_max_epi32(SEQAN_VECTOR_CAST_(const __m256i&, a),
+                                               SEQAN_VECTOR_CAST_(const __m256i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _max(TSimdVector const & a, TSimdVector const & b, SimdParams_<32, 8, uint32_t>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm256_max_epu32(SEQAN_VECTOR_CAST_(const __m256i&, a),
+                                               SEQAN_VECTOR_CAST_(const __m256i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _max(TSimdVector const & a, TSimdVector const & b, SimdParams_<32, 4, int64_t>)
+{
+    #if defined(__AVX512VL__)
+        return SEQAN_VECTOR_CAST_(TSimdVector,
+                                  _mm256_max_epi64(SEQAN_VECTOR_CAST_(const __m256i&, a),
+                                                   SEQAN_VECTOR_CAST_(const __m256i&, b)));
+    #else // defined(__AVX512VL__)
+        return blend(b, a, cmpGt(a, b));
+    #endif // defined(__AVX512VL__)
+}
+
+template <typename TSimdVector>
+inline TSimdVector _max(TSimdVector const & a, TSimdVector const & b, SimdParams_<32, 4, uint64_t>)
+{
+    #if defined(__AVX512VL__)
+        return SEQAN_VECTOR_CAST_(TSimdVector,
+                                  _mm256_max_epu64(SEQAN_VECTOR_CAST_(const __m256i&, a),
+                                                   SEQAN_VECTOR_CAST_(const __m256i&, b)));
+    #else // defined(__AVX512VL__)
+        return blend(b, a, cmpGt(a, b));
+    #endif // defined(__AVX512VL__)
+}
+
+
+// --------------------------------------------------------------------------
+// _min (256bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline TSimdVector _min(TSimdVector const & a, TSimdVector const & b, SimdParams_<32, 32, int8_t>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm256_min_epi8(SEQAN_VECTOR_CAST_(const __m256i&, a),
+                                              SEQAN_VECTOR_CAST_(const __m256i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _min(TSimdVector const & a, TSimdVector const & b, SimdParams_<32, 32, uint8_t>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm256_min_epu8(SEQAN_VECTOR_CAST_(const __m256i&, a),
+                                              SEQAN_VECTOR_CAST_(const __m256i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _min(TSimdVector const & a, TSimdVector const & b, SimdParams_<32, 16, int16_t>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm256_min_epi16(SEQAN_VECTOR_CAST_(const __m256i&, a),
+                                               SEQAN_VECTOR_CAST_(const __m256i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _min(TSimdVector const & a, TSimdVector const & b, SimdParams_<32, 16, uint16_t>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm256_min_epu16(SEQAN_VECTOR_CAST_(const __m256i&, a),
+                                               SEQAN_VECTOR_CAST_(const __m256i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _min(TSimdVector const & a, TSimdVector const & b, SimdParams_<32, 8, int32_t>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm256_min_epi32(SEQAN_VECTOR_CAST_(const __m256i&, a),
+                                               SEQAN_VECTOR_CAST_(const __m256i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _min(TSimdVector const & a, TSimdVector const & b, SimdParams_<32, 8, uint32_t>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm256_min_epu32(SEQAN_VECTOR_CAST_(const __m256i&, a),
+                                               SEQAN_VECTOR_CAST_(const __m256i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _min(TSimdVector const & a, TSimdVector const & b, SimdParams_<32, 4, int64_t>)
+{
+    #if defined(__AVX512VL__)
+        return SEQAN_VECTOR_CAST_(TSimdVector,
+                                  _mm256_min_epi64(SEQAN_VECTOR_CAST_(const __m256i&, a),
+                                                   SEQAN_VECTOR_CAST_(const __m256i&, b)));
+    #else // defined(__AVX512VL__)
+        return blend(a, b, cmpGt(a, b));
+    #endif // defined(__AVX512VL__)
+}
+
+template <typename TSimdVector>
+inline TSimdVector _min(TSimdVector const & a, TSimdVector const & b, SimdParams_<32, 4, uint64_t>)
+{
+    #if defined(__AVX512VL__)
+        return SEQAN_VECTOR_CAST_(TSimdVector,
+                                  _mm256_min_epu64(SEQAN_VECTOR_CAST_(const __m256i&, a),
+                                                   SEQAN_VECTOR_CAST_(const __m256i&, b)));
+    #else // defined(__AVX512VL__)
+        return blend(a, b, cmpGt(a, b));
+    #endif // defined(__AVX512VL__)
+}
+
+// --------------------------------------------------------------------------
+// _blend (256bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector, typename TSimdVectorMask, int L>
+inline TSimdVector _blend(TSimdVector const & a, TSimdVector const & b, TSimdVectorMask const & mask, SimdParams_<32, L>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm256_blendv_epi8(SEQAN_VECTOR_CAST_(const __m256i &, a),
+                                                 SEQAN_VECTOR_CAST_(const __m256i &, b),
+                                                 SEQAN_VECTOR_CAST_(const __m256i &, mask)));
+}
+
+// --------------------------------------------------------------------------
+// _storeu (256bit)
+// --------------------------------------------------------------------------
+
+template <typename T, typename TSimdVector, int L>
+inline void _storeu(T * memAddr, TSimdVector const & vec, SimdParams_<32, L>)
+{
+    _mm256_storeu_si256((__m256i*)memAddr, SEQAN_VECTOR_CAST_(const __m256i&, vec));
+}
+
+// ----------------------------------------------------------------------------
+// Function _load() 256bit
+// ----------------------------------------------------------------------------
+
+template <typename TSimdVector, typename T, int L>
+inline TSimdVector _load(T const * memAddr, SimdParams_<32, L>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_load_si256((__m256i const *) memAddr));
+}
+
+// --------------------------------------------------------------------------
+// _shiftRightLogical (256bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline TSimdVector _shiftRightLogical(TSimdVector const & vector, const int imm, SimdParams_<32, 32>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_srli_epi16(SEQAN_VECTOR_CAST_(const __m256i &, vector), imm) & _mm256_set1_epi8(0xff >> imm));
+}
+template <typename TSimdVector>
+inline TSimdVector _shiftRightLogical(TSimdVector const & vector, const int imm, SimdParams_<32, 16>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_srli_epi16(SEQAN_VECTOR_CAST_(const __m256i &, vector), imm));
+}
+template <typename TSimdVector>
+inline TSimdVector _shiftRightLogical(TSimdVector const & vector, const int imm, SimdParams_<32, 8>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_srli_epi32(SEQAN_VECTOR_CAST_(const __m256i &, vector), imm));
+}
+template <typename TSimdVector>
+inline TSimdVector _shiftRightLogical(TSimdVector const & vector, const int imm, SimdParams_<32, 4>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector, _mm256_srli_epi64(SEQAN_VECTOR_CAST_(const __m256i &, vector), imm));
+}
+
+// --------------------------------------------------------------------------
+// Extend sign from integer types 256bit
+// --------------------------------------------------------------------------
+
+inline __m256i
+seqan_mm256_i16sign_extend_epis8(__m256i const & v)
+{
+    return _mm256_or_si256( // extend sign (v | hi-bits)
+        v,
+        _mm256_and_si256( // select hi-bits (hi-bits = msk & 0xff00)
+            _mm256_sub_epi16( // msk = msb - 1
+                _mm256_andnot_si256( //msb = ~v & 0x80 (select msb)
+                    v,
+                    _mm256_set1_epi16(0x80)
+                ),
+                _mm256_set1_epi16(1)
+            ),
+            _mm256_set1_epi16(static_cast<uint16_t>(0xff00u))
+        )
+    );
+}
+
+inline __m256i
+seqan_mm256_i32sign_extend_epis8(__m256i const & v)
+{
+    return _mm256_or_si256( // extend sign (v | hi-bits)
+        v,
+        _mm256_and_si256( // select hi-bits (hi-bits = msk & 0xffffff00u)
+            _mm256_sub_epi32( // msk = msb - 1
+                _mm256_andnot_si256( //msb = ~v & 0x80 (select msb)
+                    v,
+                    _mm256_set1_epi32(0x80)
+                ),
+                _mm256_set1_epi32(1)
+            ),
+            _mm256_set1_epi32(static_cast<uint32_t>(0xffffff00u))
+        )
+    );
+}
+
+inline __m256i
+seqan_mm256_i32sign_extend_epis16(__m256i const & v)
+{
+    return _mm256_or_si256( // extend sign (v | hi-bits)
+        v,
+        _mm256_and_si256( // select hi-bits (hi-bits = msk & 0xffff0000u)
+            _mm256_sub_epi32( // msk = msb - 1
+                _mm256_andnot_si256( //msb = ~v & 0x8000 (select msb)
+                    v,
+                    _mm256_set1_epi32(0x8000)
+                ),
+                _mm256_set1_epi32(1)
+            ),
+            _mm256_set1_epi32(static_cast<uint32_t>(0xffff0000u))
+        )
+    );
+}
+
+inline __m256i
+seqan_mm256_i64sign_extend_epis8(__m256i const & v)
+{
+    return _mm256_or_si256( // extend sign (v | hi-bits)
+        v,
+        _mm256_and_si256( // select hi-bits (hi-bits = msk & 0xffffffffffffff00ul)
+            _mm256_sub_epi64( // msk = msb - 1
+                _mm256_andnot_si256( //msb = ~v & 0x80 (select msb)
+                    v,
+                    _mm256_set1_epi64x(0x80)
+                ),
+                _mm256_set1_epi64x(1)
+            ),
+            _mm256_set1_epi64x(static_cast<uint64_t>(0xffffffffffffff00ul))
+        )
+    );
+}
+
+inline __m256i
+seqan_mm256_i64sign_extend_epis16(__m256i const & v)
+{
+    return _mm256_or_si256( // extend sign (v | hi-bits)
+        v,
+        _mm256_and_si256( // select hi-bits (hi-bits = msk & 0xffffffffffff0000ul)
+            _mm256_sub_epi64( // msk = msb - 1
+                _mm256_andnot_si256( //msb = ~v & 0x8000 (select msb)
+                    v,
+                    _mm256_set1_epi64x(0x8000)
+                ),
+                _mm256_set1_epi64x(1)
+            ),
+            _mm256_set1_epi64x(static_cast<uint64_t>(0xffffffffffff0000ul))
+        )
+    );
+}
+
+inline __m256i
+seqan_mm256_i64sign_extend_epis32(__m256i const & v)
+{
+    return _mm256_or_si256( // extend sign (v | hi-bits)
+        v,
+        _mm256_and_si256( // select hi-bits (hi-bits = msk & 0xffffffffffff0000ul)
+            _mm256_sub_epi64( // msk = msb - 1
+                _mm256_andnot_si256( //msb = ~v & 0x80000000 (select msb)
+                    v,
+                    _mm256_set1_epi64x(0x80000000)
+                ),
+                _mm256_set1_epi64x(1)
+            ),
+            _mm256_set1_epi64x(static_cast<uint64_t>(0xffffffff00000000ul))
+        )
+    );
+}
+
+// --------------------------------------------------------------------------
+// _gather (256bit)
+// --------------------------------------------------------------------------
+
+template <typename TValue, typename TSize, TSize SCALE>
+inline __m256i
+seqan_mm256_i8gather_epi(TValue const * memAddr,
+                         __m256i const & idx,
+                         std::integral_constant<TSize, SCALE> const & /*scale*/)
+{
+    // mem:    ( 0,  3,  6,  9 | 12, 15, 18, 21 | 24, 27, 30, 33 | 36, 39, 42, 45 || 48, 51, 54, 57 | 60, 63, 66, 69 | 72, 75, 78, 81 | 84, 87, 90, 93)
+    // idx:    (31, 30, 29, 28 | 27, 26, 25, 24 | 23, 22, 21, 20 | 19, 18, 17, 16 || 15, 14, 13, 12 | 11, 10,  9,  8 |  7,  6,  5,  4 |  3,  2,  1,  0)
+    // pack:   (93, 90, 87, 84 | 81, 78, 75, 72 | 69, 66, 63, 60 | 57, 54, 51, 48 || 45, 42, 39, 36 | 33, 30, 27, 24 | 21, 18, 15, 12 |  9,  6,  3,  0)
+    return _mm256_packus_epi16(
+        // pckLow: (93,  0, 90,  0 | 87,  0, 84,  0 | 81,  0, 78,  0 | 75,  0, 72,  0 || 45,  0, 42,  0 | 39,  0, 36,  0 | 33,  0, 30,  0 | 27,  0, 24,  0)
+        _mm256_packus_epi16(
+            // mskLL:  (93,  0,  0,  0 | 90,  0,  0,  0 | 87,  0,  0,  0 | 84,  0,  0,  0 || 45,  0,  0,  0 | 42,  0,  0,  0 | 39,  0,  0,  0 | 36,  0,  0,  0)
+            _mm256_and_si256(
+                // gtrLL:  (93, 31, 30, 29 | 90, 93, 31, 30 | 87, 90, 93, 31 | 84, 87, 90, 93 || 45, 48, 51, 54 | 42, 45, 48, 51 | 39, 42, 45, 48 | 36, 39, 42, 45)
+                _mm256_i32gather_epi32(
+                    (const int *) memAddr,
+                    // lowlow: (31,  0,  0,  0 | 30,  0,  0,  0 | 29,  0,  0,  0 | 28,  0,  0,  0 || 15,  0,  0,  0 | 14,  0,  0,  0 | 13,  0,  0,  0 | 12,  0,  0,  0)
+                    _mm256_shuffle_epi8(idx, __m256i {
+                        ~0xFF000000FFl | 0x0100000000, ~0xFF000000FFl | 0x0300000002,
+                        ~0xFF000000FFl | 0x0100000000, ~0xFF000000FFl | 0x0300000002
+                    }),
+                    SCALE
+                ),
+                _mm256_set1_epi32(0xFF)
+            ),
+            // mskLH:  (81,  0,  0,  0 | 78,  0,  0,  0 | 75,  0,  0,  0 | 72,  0,  0,  0 || 33,  0,  0,  0 | 30,  0,  0,  0 | 27,  0,  0,  0 | 24,  0,  0,  0)
+            _mm256_and_si256(
+                // gtrLH:  (81, 84, 87, 90 | 78, 81, 84, 87 | 75, 78, 81, 84 | 72, 75, 78, 81 || 33, 36, 39, 42 | 30, 33, 36, 39 | 27, 30, 33, 36 | 24, 27, 30, 33)
+                _mm256_i32gather_epi32(
+                    (const int *) memAddr,
+                    // lowhig: (27,  0,  0,  0 | 26,  0,  0,  0 | 25,  0,  0,  0 | 24,  0,  0,  0 || 11,  0,  0,  0 | 10,  0,  0,  0 |  9,  0,  0,  0 |  8,  0,  0,  0)
+                    _mm256_shuffle_epi8(idx, __m256i {
+                        ~0xFF000000FFl | 0x0500000004, ~0xFF000000FFl | 0x0700000006,
+                        ~0xFF000000FFl | 0x0500000004, ~0xFF000000FFl | 0x0700000006
+                    }),
+                    SCALE
+                ),
+                _mm256_set1_epi32(0xFF)
+            )
+        ),
+        // pckHih: (69,  0, 66,  0 | 63,  0, 60,  0 | 57,  0, 54,  0 | 51,  0, 48,  0 || 21,  0, 18,  0 | 15,  0, 12,  0 |  9,  0,  6,  0 |  3,  0,  0,  0)
+        _mm256_packus_epi16(
+            // mskHL:  (69,  0,  0,  0 | 66,  0,  0,  0 | 63,  0,  0,  0 | 60,  0,  0,  0 || 21,  0,  0,  0 | 18,  0,  0,  0 | 15,  0,  0,  0 | 12,  0,  0,  0)
+            _mm256_and_si256(
+                // gtrHL:  (69, 72, 75, 78 | 66, 69, 72, 75 | 63, 66, 69, 72 | 60, 63, 66, 69 || 21, 24, 27, 30 | 18, 21, 24, 27 | 15, 18, 21, 24 | 12, 15, 18, 21)
+                _mm256_i32gather_epi32(
+                    (const int *) memAddr,
+                    // higlow: (23,  0,  0,  0 | 22,  0,  0,  0 | 21,  0,  0,  0 | 20,  0,  0,  0 ||  7,  0,  0,  0 |  6,  0,  0,  0 |  5,  0,  0,  0 |  4,  0,  0,  0)
+                    _mm256_shuffle_epi8(idx, __m256i {
+                        ~0xFF000000FFl | 0x0900000008, ~0xFF000000FFl | 0x0B0000000A,
+                        ~0xFF000000FFl | 0x0900000008, ~0xFF000000FFl | 0x0B0000000A
+                    }),
+                    SCALE
+                ),
+                _mm256_set1_epi32(0xFF)
+            ),
+            // mskHH:  (57,  0,  0,  0 | 54,  0,  0,  0 | 51,  0,  0,  0 | 48,  0,  0,  0 ||  9,  0,  0,  0 |  6,  0,  0,  0 |  3,  0,  0,  0 |  0,  0,  0,  0)
+            _mm256_and_si256(
+                // gtrHH:  (57, 60, 63, 66 | 54, 57, 60, 63 | 51, 54, 57, 60 | 48, 51, 54, 57 ||  9, 12, 15, 18 |  6,  9, 12, 15 |  3,  6,  9, 12 |  0,  3,  6,  9)
+                _mm256_i32gather_epi32(
+                    (const int *) memAddr,
+                    // highig: (19,  0,  0,  0 | 18,  0,  0,  0 | 17,  0,  0,  0 | 16,  0,  0,  0 ||  3,  0,  0,  0 |  2,  0,  0,  0 |  1,  0,  0,  0 |  0,  0,  0,  0)
+                    _mm256_shuffle_epi8(idx, __m256i {
+                        ~0xFF000000FFl | 0x0D0000000C, ~0xFF000000FFl | 0x0F0000000E,
+                        ~0xFF000000FFl | 0x0D0000000C, ~0xFF000000FFl | 0x0F0000000E
+                    }),
+                    SCALE
+                ),
+                _mm256_set1_epi32(0xFF)
+            )
+        )
+    );
+}
+
+template <typename TValue, typename TSize, TSize SCALE>
+inline __m256i
+seqan_mm256_i16gather_epi(TValue const * memAddr,
+                          __m256i const & idx,
+                          std::integral_constant<TSize, SCALE> const & /*scale*/)
+{
+    using TUnsignedValue = typename MakeUnsigned<TValue>::Type;
+
+    // The cast makes sure that the max value of TValue = (u)int64_t and
+    // (u)int32_t will be max value of int16_t (i.e. `~0` in int16_t), because
+    // the resulting __m256i can only hold int16_t values.
+    //
+    // NOTE(marehr): the masking is only needed for TValue = (u)int8_t and
+    // (u)int16_t. It could be omitted if _mm256_packus_epi32 would be exchanged
+    // by _mm256_packs_epi32, because for (u)int32_t and (u)int64_t the masking
+    // operations are basically the identity function.
+    constexpr int const mask = static_cast<uint16_t>(MaxValue<TUnsignedValue>::VALUE);
+
+    // 1. Unpack low idx values and interleave with 0 and gather from memAddr.
+    // 2. Unpack high idx values and interleave with 0, than gather from memAddr.
+    // 3. Merge 2 8x32 vectors into 1x16 vector by signed saturation. This operation reverts the interleave by the unpack operations above.
+    //
+    // The following is an example for SimdVector<uint16_t, 16> idx and uint16_t
+    // const * memAddr:
+    // mem:    ( 0,  0,  3,  0 |  6,  0,  9,  0 | 12,  0, 15,  0 | 18,  0, 21,  0 || 24,  0, 27,  0 | 30,  0, 33,  0 | 36,  0, 39,  0 | 42,  0, 45,  0)
+    // idx:    (15,  0, 14,  0 | 13,  0, 12,  0 | 11,  0, 10,  0 |  9,  0,  8,  0 ||  7,  0,  6,  0 |  5,  0,  4,  0 |  3,  0,  2,  0 |  1,  0,  0,  0)
+    // pack:   (45,  0, 42,  0 | 39,  0, 36,  0 | 33,  0, 30,  0 | 27,  0, 24,  0 || 21,  0, 18,  0 | 15,  0, 12,  0 |  9,  0,  6,  0 |  3,  0,  0,  0)
+    return _mm256_packus_epi32(
+        // mskLow: (45,  0,  0,  0 | 42,  0,  0,  0 | 39,  0,  0,  0 | 36,  0,  0,  0 || 21,  0,  0,  0 | 18,  0,  0,  0 | 15,  0,  0,  0 | 12,  0,  0,  0)
+        _mm256_and_si256(
+            // gtrLow: (45,  0, 15,  0 | 42,  0, 45,  0 | 39,  0, 42,  0 | 36,  0, 39,  0 || 21,  0, 24,  0 | 18,  0, 21,  0 | 15,  0, 18,  0 | 12,  0, 15,  0)
+            _mm256_i32gather_epi32(
+                (const int *) memAddr,
+                // low:    (15,  0,  0,  0 | 14,  0,  0,  0 | 13,  0,  0,  0 | 12,  0,  0,  0 ||  7,  0,  0,  0 |  6,  0,  0,  0 |  5,  0,  0,  0 |  4,  0,  0,  0)
+                _mm256_unpacklo_epi16(
+                    idx, _mm256_set1_epi16(0)
+                ),
+                SCALE
+            ),
+            _mm256_set1_epi32(mask)
+        ),
+        // mskHih: (33,  0,  0,  0 | 30,  0,  0,  0 | 27,  0,  0,  0 | 24,  0,  0,  0 ||  9,  0,  0,  0 |  6,  0,  0,  0 |  3,  0,  0,  0 |  0,  0,  0,  0)
+        _mm256_and_si256(
+            // gtrHih: (33,  0, 36,  0 | 30,  0, 33,  0 | 27,  0, 30,  0 | 24,  0, 27,  0 ||  9,  0, 12,  0 |  6,  0,  9,  0 |  3,  0,  6,  0 |  0,  0,  3,  0)
+            _mm256_i32gather_epi32(
+                (const int *) memAddr,
+                // high:   (11,  0,  0,  0 | 10,  0,  0,  0 |  9,  0,  0,  0 |  8,  0,  0,  0 ||  3,  0,  0,  0 |  2,  0,  0,  0 |  1,  0,  0,  0 |  0,  0,  0,  0)
+                _mm256_unpackhi_epi16(
+                    idx, _mm256_set1_epi16(0)
+                ),
+                SCALE
+            ),
+            _mm256_set1_epi32(mask)
+        )
+    );
+}
+
+template <typename TValue, typename TSize, TSize SCALE>
+inline __m256i
+seqan_mm256_i32gather_epi(TValue const * memAddr,
+                          __m256i const & idx,
+                          std::integral_constant<TSize, SCALE> const & /*scale*/)
+{
+    using TUnsignedValue = typename MakeUnsigned<TValue>::Type;
+    constexpr auto const mask = static_cast<uint32_t>(MaxValue<TUnsignedValue>::VALUE);
+
+    return _mm256_and_si256(
+        _mm256_i32gather_epi32((const int *) memAddr, idx, SCALE),
+        _mm256_set1_epi32(mask)
+    );
+}
+
+template <typename TValue, typename TSize, TSize SCALE>
+inline __m256i
+seqan_mm256_i64gather_epi(TValue const * memAddr,
+                          __m256i const & idx,
+                          std::integral_constant<TSize, SCALE> const & /*scale*/)
+{
+    using TUnsignedValue = typename MakeUnsigned<TValue>::Type;
+    constexpr auto const mask = static_cast<uint64_t>(MaxValue<TUnsignedValue>::VALUE);
+
+    return _mm256_and_si256(
+        _mm256_i64gather_epi64((const long long *) memAddr, idx, SCALE),
+        _mm256_set1_epi64x(mask)
+    );
+}
+
+template <typename TValue, typename TSimdVector, typename TSize, TSize SCALE>
+inline TSimdVector
+_gather(TValue const * memAddr,
+        TSimdVector const & idx,
+        std::integral_constant<TSize, SCALE> const & scale,
+        SimdParams_<32, 32>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+        seqan_mm256_i8gather_epi(
+            memAddr,
+            SEQAN_VECTOR_CAST_(__m256i const &, idx),
+            scale
+        )
+    );
+}
+
+template <typename TSimdVector, typename TSize, TSize SCALE>
+inline TSimdVector
+_gather(int8_t const * memAddr,
+        TSimdVector const & idx,
+        std::integral_constant<TSize, SCALE> const & scale,
+        SimdParams_<32, 16>)
+{
+    // Note that memAddr is a signed integer type, thus a cast would extend the
+    // sign. E.g., -3 = 253 in 8 bit, but would be 65533 in 16 bit.
+    // Use _gather(uint8_t) and extend the sign to [u]int16_t.
+    return SEQAN_VECTOR_CAST_(
+        TSimdVector,
+        seqan_mm256_i16sign_extend_epis8(
+            seqan_mm256_i16gather_epi(
+                memAddr,
+                SEQAN_VECTOR_CAST_(__m256i const &, idx),
+                scale
+            )
+        )
+    );
+}
+
+template <typename TValue, typename TSimdVector, typename TSize, TSize SCALE>
+inline TSimdVector
+_gather(TValue const * memAddr,
+        TSimdVector const & idx,
+        std::integral_constant<TSize, SCALE> const & scale,
+        SimdParams_<32, 16>)
+{
+    return SEQAN_VECTOR_CAST_(
+        TSimdVector,
+        seqan_mm256_i16gather_epi(
+            memAddr,
+            SEQAN_VECTOR_CAST_(__m256i const &, idx),
+            scale
+        )
+    );
+}
+
+template <typename TSimdVector, typename TSize, TSize SCALE>
+inline TSimdVector
+_gather(int8_t const * memAddr,
+        TSimdVector const & idx,
+        std::integral_constant<TSize, SCALE> const & scale,
+        SimdParams_<32, 8>)
+{
+    // Note that memAddr is a signed integer type, thus a cast would extend the
+    // sign.
+    return SEQAN_VECTOR_CAST_(
+        TSimdVector,
+        seqan_mm256_i32sign_extend_epis8(
+            seqan_mm256_i32gather_epi(
+                memAddr,
+                SEQAN_VECTOR_CAST_(__m256i const &, idx),
+                scale
+            )
+        )
+    );
+}
+
+template <typename TSimdVector, typename TSize, TSize SCALE>
+inline TSimdVector
+_gather(int16_t const * memAddr,
+        TSimdVector const & idx,
+        std::integral_constant<TSize, SCALE> const & scale,
+        SimdParams_<32, 8>)
+{
+    // Note that memAddr is a signed integer type, thus a cast would extend the
+    // sign.
+    return SEQAN_VECTOR_CAST_(
+        TSimdVector,
+        seqan_mm256_i32sign_extend_epis16(
+            seqan_mm256_i32gather_epi(
+                memAddr,
+                SEQAN_VECTOR_CAST_(__m256i const &, idx),
+                scale
+            )
+        )
+    );
+}
+
+template <typename TValue, typename TSimdVector, typename TSize, TSize SCALE>
+inline TSimdVector
+_gather(TValue const * memAddr,
+        TSimdVector const & idx,
+        std::integral_constant<TSize, SCALE> const & scale,
+        SimdParams_<32, 8>)
+{
+    return SEQAN_VECTOR_CAST_(
+        TSimdVector,
+        seqan_mm256_i32gather_epi(
+            memAddr,
+            SEQAN_VECTOR_CAST_(__m256i const &, idx),
+            scale
+        )
+    );
+}
+
+template <typename TSimdVector, typename TSize, TSize SCALE>
+inline TSimdVector
+_gather(int8_t const * memAddr,
+        TSimdVector const & idx,
+        std::integral_constant<TSize, SCALE> const & scale,
+        SimdParams_<32, 4>)
+{
+    return SEQAN_VECTOR_CAST_(
+        TSimdVector,
+        seqan_mm256_i64sign_extend_epis8(
+            seqan_mm256_i64gather_epi(
+                memAddr,
+                SEQAN_VECTOR_CAST_(__m256i const &, idx),
+                scale
+            )
+        )
+    );
+}
+
+template <typename TSimdVector, typename TSize, TSize SCALE>
+inline TSimdVector
+_gather(int16_t const * memAddr,
+        TSimdVector const & idx,
+        std::integral_constant<TSize, SCALE> const & scale,
+        SimdParams_<32, 4>)
+{
+    return SEQAN_VECTOR_CAST_(
+        TSimdVector,
+        seqan_mm256_i64sign_extend_epis16(
+            seqan_mm256_i64gather_epi(
+                memAddr,
+                SEQAN_VECTOR_CAST_(__m256i const &, idx),
+                scale
+            )
+        )
+    );
+}
+
+template <typename TSimdVector, typename TSize, TSize SCALE>
+inline TSimdVector
+_gather(int32_t const * memAddr,
+        TSimdVector const & idx,
+        std::integral_constant<TSize, SCALE> const & scale,
+        SimdParams_<32, 4>)
+{
+    return SEQAN_VECTOR_CAST_(
+        TSimdVector,
+        seqan_mm256_i64sign_extend_epis32(
+            seqan_mm256_i64gather_epi(
+                memAddr,
+                SEQAN_VECTOR_CAST_(__m256i const &, idx),
+                scale
+            )
+        )
+    );
+}
+
+template <typename TValue, typename TSimdVector, typename TSize, TSize SCALE>
+inline TSimdVector
+_gather(TValue const * memAddr,
+        TSimdVector const & idx,
+        std::integral_constant<TSize, SCALE> const & scale,
+        SimdParams_<32, 4>)
+{
+    return SEQAN_VECTOR_CAST_(
+        TSimdVector,
+        seqan_mm256_i64gather_epi(
+            memAddr,
+            SEQAN_VECTOR_CAST_(__m256i const &, idx),
+            scale
+        )
+    );
+}
+
+// --------------------------------------------------------------------------
+// _shuffleVector (256bit)
+// --------------------------------------------------------------------------
+
+inline __m256i
+seqan_m256_shuffle_epi8(__m256i const & vector, __m256i const & indices)
+{
+    return _mm256_xor_si256(
+        // shuffle bytes from the lower bytes of vector
+        _mm256_shuffle_epi8(
+            // repeat twice the low bytes of vector in a new __m256i vector i.e.
+            //   vh[127:0] = v[127:0]
+            //   vh[255:128] = v[127:0]
+            _mm256_broadcastsi128_si256(
+                 _mm256_extracti128_si256(vector, 0)
+            ),
+            // ((indices[i] << 3) & 0b1000 0000) ^ indices[i]:
+            //   Adds the 5th bit of indices[i] as most significant bit. If the
+            //   5th bit is set, that means that indices[i] >= 16.
+            //   r = _mm256_shuffle_epi8(vl, indices) will set r[i] = 0 if the
+            //   most significant bit of indices[i] is 1. Since this bit is the
+            //   5th bit, r[i] = 0 if indices[i] >= 16 and r[i] = vl[indices[i]]
+            //   if indices[i] < 16.
+            _mm256_xor_si256(
+                _mm256_and_si256(
+                    _mm256_slli_epi16(indices, 3),
+                    _mm256_set1_epi8(-127) // 0b1000 0000
+                ),
+                indices
+            )
+        ),
+        // shuffle bytes from the higher bytes of vector
+        _mm256_shuffle_epi8(
+            // repeat twice the higher bytes of vector in a new __m256i vector
+            // i.e.
+            //   vh[127:0] = v[255:128]
+            //   vh[255:128] = v[255:128]
+            _mm256_broadcastsi128_si256(
+                 _mm256_extracti128_si256(vector, 1)
+            ),
+            // indices[i] - 16:
+            //   r = _mm256_shuffle_epi8(vh, indices)
+            //   will return r[i] = 0 if the most significant bit of the byte
+            //   indices[i] is 1. Thus, indices[i] - 16 will select all high
+            //   bytes in vh, i.e. r[i] = vh[indices[i] - 16], if indices[i] >=
+            //   16 and r[i] = 0 if indices[i] < 16.
+            _mm256_sub_epi8(
+                indices,
+                _mm256_set1_epi8(16)
+            )
+        )
+    );
+}
+
+inline __m256i
+seqan_m256_shuffle_epi16(const __m256i a, const __m256i b)
+{
+    // multiply by 2
+    __m256i idx = _mm256_slli_epi16(
+        _mm256_permute4x64_epi64(b, 0b01010000),
+        1
+    );
+    // _print(_mm256_add_epi8(idx, _mm256_set1_epi8(1)));
+    // _print(        _mm256_unpacklo_epi8(
+    //             idx,
+    //             _mm256_add_epi8(idx, _mm256_set1_epi8(1))
+    //         ));
+    return seqan_m256_shuffle_epi8(
+        a,
+        // interleave idx[15:0]   = 2*indices[15],   ..., 2*indices[0]
+        // with       idx[15:0]+1 = 2*indices[15]+1, ..., 2*indices[0]+1
+        // => 2*indices[15]+1, 2*indices[15], ..., 2*indices[0]+1, 2*indices[0]
+        _mm256_unpacklo_epi8(
+            idx,
+            _mm256_add_epi8(idx, _mm256_set1_epi8(1))
+        )
+    );
+}
+
+inline __m256i
+seqan_m256_shuffle_epi32(const __m256i a, const __m256i b)
+{
+    // multiply by 4
+    __m256i idx = _mm256_slli_epi16(
+        _mm256_permutevar8x32_epi32(b, __m256i {0x0, 0x0, 0x1, 0x0}),
+        2
+    );
+    return seqan_m256_shuffle_epi8(
+        a,
+        // interleave 4*indices[7]+1, 4*indices[7]+0; ..., 4*indices[0]+1, 4*indices[0]+0
+        // with       4*indices[7]+3, 4*indices[7]+2; ..., 4*indices[0]+3, 4*indices[0]+2
+        // => 4*indices[7]+3, 4*indices[7]+2; 4*indices[7]+1, 4*indices[7]+0;
+        //    ...
+        //    4*indices[0]+3, 4*indices[0]+2; 4*indices[0]+1, 4*indices[0]+0
+        _mm256_unpacklo_epi16(
+            // interleave idx[7:0]+0 = 4*indices[7]+0; ...; 4*indices[0]+0
+            // with       idx[7:0]+1 = 4*indices[7]+1; ...; 4*indices[0]+1
+            // => 4*indices[7]+1; 4*indices[7]+0; ...; 4*indices[0]+1; 4*indices[0]+0
+            _mm256_unpacklo_epi8(
+                idx,
+                _mm256_add_epi8(idx, _mm256_set1_epi8(1))
+            ),
+            // interleave idx[7:0]+2 = 4*indices[7]+2; ...; 4*indices[0]+2
+            // with       idx[7:0]+3 = 4*indices[7]+3; ...; 4*indices[0]+3
+            // => 4*indices[7]+3; 4*indices[7]+2; ...; 4*indices[0]+3; 4*indices[0]+2
+            _mm256_unpacklo_epi8(
+                _mm256_add_epi8(idx, _mm256_set1_epi8(2)),
+                _mm256_add_epi8(idx, _mm256_set1_epi8(3))
+            )
+    ));
+}
+
+#define seqan_mm256_set_m128i(v0, v1) _mm256_insertf128_si256(_mm256_castsi128_si256(v1), (v0), 1)
+
+inline __m256i
+seqan_m256_shuffle_epi64(const __m256i a, const __m256i b)
+{
+    __m128i lowidx = _mm256_extracti128_si256(
+        // multiply by 8
+        _mm256_slli_epi16(b, 3),
+        0
+    );
+
+    __m256i idx = seqan_mm256_set_m128i(
+        _mm_srli_si128(lowidx, 2),
+        lowidx
+    );
+
+    return seqan_m256_shuffle_epi8(
+        a,
+        _mm256_unpacklo_epi32(
+            // interleave 8*indices[3]+1, 8*indices[3]+0; ..., 8*indices[0]+1, 8*indices[0]+0
+            // with       8*indices[3]+3, 8*indices[3]+2; ..., 8*indices[0]+3, 8*indices[0]+2
+            // => 8*indices[3]+3, 8*indices[3]+2; 8*indices[3]+1, 8*indices[3]+0;
+            //    ...
+            //    8*indices[0]+3, 8*indices[0]+2; 8*indices[0]+1, 8*indices[0]+0
+            _mm256_unpacklo_epi16(
+                // interleave idx[3:0]+0 = 8*indices[3]+0; ...; 8*indices[0]+0
+                // with       idx[3:0]+1 = 8*indices[3]+1; ...; 8*indices[0]+1
+                // => 8*indices[3]+1; 8*indices[3]+0; ...; 8*indices[0]+1; 8*indices[0]+0
+               _mm256_unpacklo_epi8(
+                   idx,
+                   _mm256_add_epi8(idx, _mm256_set1_epi8(1))
+               ),
+               // interleave idx[3:0]+2 = 8*indices[3]+2; ...; 8*indices[0]+2
+               // with       idx[3:0]+3 = 8*indices[3]+3; ...; 8*indices[0]+3
+               // => 8*indices[3]+3; 8*indices[3]+2; ...; 8*indices[0]+3; 8*indices[0]+2
+               _mm256_unpacklo_epi8(
+                   _mm256_add_epi8(idx, _mm256_set1_epi8(2)),
+                   _mm256_add_epi8(idx, _mm256_set1_epi8(3))
+               )
+           ),
+           // interleave 8*indices[3]+5, 8*indices[3]+4; ..., 8*indices[0]+5, 8*indices[0]+4
+           // with       8*indices[3]+7, 8*indices[3]+6; ..., 8*indices[0]+7, 8*indices[0]+6
+           // => 8*indices[3]+7, 8*indices[3]+6; 8*indices[3]+5, 8*indices[3]+4;
+           //    ...
+           //    8*indices[0]+7, 8*indices[0]+6; 8*indices[0]+5, 8*indices[0]+4
+            _mm256_unpacklo_epi16(
+                // interleave idx[3:0]+4 = 8*indices[3]+4; ...; 8*indices[0]+4
+                // with       idx[3:0]+5 = 8*indices[3]+5; ...; 8*indices[0]+5
+                // => 8*indices[3]+5; 8*indices[3]+4; ...; 8*indices[0]+5; 8*indices[0]+4
+                _mm256_unpacklo_epi8(
+                    _mm256_add_epi8(idx, _mm256_set1_epi8(4)),
+                    _mm256_add_epi8(idx, _mm256_set1_epi8(5))
+                ),
+                // interleave idx[3:0]+6 = 8*indices[3]+6; ...; 8*indices[0]+6
+                // with       idx[3:0]+7 = 8*indices[3]+7; ...; 8*indices[0]+7
+                // => 8*indices[3]+7; 8*indices[3]+6; ...; 8*indices[0]+7; 8*indices[0]+6
+                _mm256_unpacklo_epi8(
+                    _mm256_add_epi8(idx, _mm256_set1_epi8(6)),
+                    _mm256_add_epi8(idx, _mm256_set1_epi8(7))
+                )
+            )
+        )
+    );
+}
+
+template <typename TSimdVector1, typename TSimdVector2>
+inline TSimdVector1
+_shuffleVector(TSimdVector1 const & vector, TSimdVector2 const & indices, SimdParams_<32, 16>, SimdParams_<16, 16>)
+{
+    // copy 2nd 64bit word to 3rd, compute 2*idx
+    __m256i idx = _mm256_slli_epi16(_mm256_permute4x64_epi64(_mm256_castsi128_si256(SEQAN_VECTOR_CAST_(const __m128i &, indices)), 0x50), 1);
+
+    // interleave with 2*idx+1 and call shuffle
+    return SEQAN_VECTOR_CAST_(TSimdVector1,
+        _mm256_shuffle_epi8(
+            SEQAN_VECTOR_CAST_(const __m256i &, vector),
+            _mm256_unpacklo_epi8(
+                idx,
+                _mm256_add_epi8(
+                    idx, _mm256_set1_epi8(1)
+                )
+            )
+        )
+    );
+}
+
+template <typename TSimdVector1, typename TSimdVector2>
+inline TSimdVector1
+_shuffleVector(TSimdVector1 const & vector, TSimdVector2 const & indices, SimdParams_<32, 32>, SimdParams_<32, 32>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector1, seqan_m256_shuffle_epi8(
+        SEQAN_VECTOR_CAST_(const __m256i &, vector),
+        SEQAN_VECTOR_CAST_(const __m256i &, indices)
+    ));
+}
+
+template <typename TSimdVector1, typename TSimdVector2>
+inline TSimdVector1
+_shuffleVector(TSimdVector1 const & vector, TSimdVector2 const & indices, SimdParams_<32, 16>, SimdParams_<32, 32>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector1, seqan_m256_shuffle_epi16(
+        SEQAN_VECTOR_CAST_(const __m256i &, vector),
+        SEQAN_VECTOR_CAST_(const __m256i &, indices)
+    ));
+}
+
+template <typename TSimdVector1, typename TSimdVector2>
+inline TSimdVector1
+_shuffleVector(TSimdVector1 const & vector, TSimdVector2 const & indices, SimdParams_<32, 8>, SimdParams_<32, 32>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector1, seqan_m256_shuffle_epi32(
+        SEQAN_VECTOR_CAST_(const __m256i &, vector),
+        SEQAN_VECTOR_CAST_(const __m256i &, indices)
+    ));
+}
+
+template <typename TSimdVector1, typename TSimdVector2>
+inline TSimdVector1
+_shuffleVector(TSimdVector1 const & vector, TSimdVector2 const & indices, SimdParams_<32, 4>, SimdParams_<32, 32>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector1, seqan_m256_shuffle_epi64(
+        SEQAN_VECTOR_CAST_(const __m256i &, vector),
+        SEQAN_VECTOR_CAST_(const __m256i &, indices)
+    ));
+}
+
+// --------------------------------------------------------------------------
+// _transposeMatrix (256bit)
+// --------------------------------------------------------------------------
+
+// emulate missing _mm256_unpacklo_epi128/_mm256_unpackhi_epi128 instructions
+inline __m256i _mm256_unpacklo_epi128(__m256i const & a, __m256i const & b)
+{
+    return _mm256_permute2x128_si256(a, b, 0x20);
+//    return _mm256_inserti128_si256(a, _mm256_extracti128_si256(b, 0), 1);
+}
+
+inline __m256i _mm256_unpackhi_epi128(__m256i const & a, __m256i const & b)
+{
+    return _mm256_permute2x128_si256(a, b, 0x31);
+//    return _mm256_inserti128_si256(b, _mm256_extracti128_si256(a, 1), 0);
+}
+
+template <typename TSimdVector>
+inline void
+_transposeMatrix(TSimdVector matrix[], SimdMatrixParams_<32, 32, 8>)
+{
+    // we need a look-up table to reverse the lowest 4 bits
+    // in order to place the permute the transposed rows
+    static const unsigned char bitRev[] = { 0, 8, 4,12, 2,10, 6,14, 1, 9, 5,13, 3,11, 7,15,
+                                           16,24,20,28,18,26,22,30,17,25,21,29,19,27,23,31};
+
+    // transpose a 32x32 byte matrix
+    __m256i tmp1[32];
+    for (int i = 0; i < 16; ++i)
+    {
+        tmp1[i]    = _mm256_unpacklo_epi8(
+            SEQAN_VECTOR_CAST_(const __m256i &, matrix[2*i]),
+            SEQAN_VECTOR_CAST_(const __m256i &, matrix[2*i+1])
+        );
+        tmp1[i+16] = _mm256_unpackhi_epi8(
+            SEQAN_VECTOR_CAST_(const __m256i &, matrix[2*i]),
+            SEQAN_VECTOR_CAST_(const __m256i &, matrix[2*i+1])
+        );
+    }
+    __m256i  tmp2[32];
+    for (int i = 0; i < 16; ++i)
+    {
+        tmp2[i]    = _mm256_unpacklo_epi16(tmp1[2*i], tmp1[2*i+1]);
+        tmp2[i+16] = _mm256_unpackhi_epi16(tmp1[2*i], tmp1[2*i+1]);
+    }
+    for (int i = 0; i < 16; ++i)
+    {
+        tmp1[i]    = _mm256_unpacklo_epi32(tmp2[2*i], tmp2[2*i+1]);
+        tmp1[i+16] = _mm256_unpackhi_epi32(tmp2[2*i], tmp2[2*i+1]);
+    }
+    for (int i = 0; i < 16; ++i)
+    {
+        tmp2[i]    = _mm256_unpacklo_epi64(tmp1[2*i], tmp1[2*i+1]);
+        tmp2[i+16] = _mm256_unpackhi_epi64(tmp1[2*i], tmp1[2*i+1]);
+    }
+    for (int i = 0; i < 16; ++i)
+    {
+        matrix[bitRev[i]]    = SEQAN_VECTOR_CAST_(TSimdVector, _mm256_unpacklo_epi128(tmp2[2*i],tmp2[2*i+1]));
+        matrix[bitRev[i+16]] = SEQAN_VECTOR_CAST_(TSimdVector, _mm256_unpackhi_epi128(tmp2[2*i],tmp2[2*i+1]));
+    }
+}
+
+// --------------------------------------------------------------------------
+// Function _testAllZeros (256bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, int)
+inline _testAllZeros(TSimdVector const & vector, TSimdVector const & mask, SimdParams_<32>)
+{
+    return _mm256_testz_si256(SEQAN_VECTOR_CAST_(const __m256i &, vector),
+                              SEQAN_VECTOR_CAST_(const __m256i &, mask));
+}
+
+// --------------------------------------------------------------------------
+// Function _testAllOnes (256bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline int _testAllOnes(TSimdVector const & vector, SimdParams_<32>)
+{
+    __m256i vec = SEQAN_VECTOR_CAST_(const __m256i &, vector);
+    return _mm256_testc_si256(vec, _mm256_cmpeq_epi32(vec, vec));
+}
+
+} // namespace seqan
+
+#endif // SEQAN_INCLUDE_SEQAN_SIMD_SIMD_BASE_SEQAN_IMPL_AVX2_H_
diff --git a/include/seqan/simd/simd_base_seqan_impl_avx512.h b/include/seqan/simd/simd_base_seqan_impl_avx512.h
new file mode 100644
index 0000000..b0ab6c3
--- /dev/null
+++ b/include/seqan/simd/simd_base_seqan_impl_avx512.h
@@ -0,0 +1,284 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Marcel Ehrhardt <marcel.ehrhardt at fu-berlin.de>
+// ==========================================================================
+// generic SIMD interface for AVX512
+// ==========================================================================
+
+#ifndef SEQAN_INCLUDE_SEQAN_SIMD_SIMD_BASE_SEQAN_IMPL_AVX512_H_
+#define SEQAN_INCLUDE_SEQAN_SIMD_SIMD_BASE_SEQAN_IMPL_AVX512_H_
+
+namespace seqan {
+
+// SimdParams_<64, 64>: 512bit = 64 elements * 8bit
+SEQAN_DEFINE_SIMD_VECTOR_(SimdVector64Char,     char,           64)
+SEQAN_DEFINE_SIMD_VECTOR_(SimdVector64SChar,    signed char,    64)
+SEQAN_DEFINE_SIMD_VECTOR_(SimdVector64UChar,    unsigned char,  64)
+
+// SimdParams_<64, 32>: 512bit = 32 elements * 2 * 8bit
+SEQAN_DEFINE_SIMD_VECTOR_(SimdVector32Short,    short,          64)
+SEQAN_DEFINE_SIMD_VECTOR_(SimdVector32UShort,   unsigned short, 64)
+
+// SimdParams_<64, 16>: 512bit = 16 elements * 4 * 8bit
+SEQAN_DEFINE_SIMD_VECTOR_(SimdVector16Int,      int,            64)
+SEQAN_DEFINE_SIMD_VECTOR_(SimdVector16UInt,     unsigned int,   64)
+
+// SimdParams_<64, 8>: 512bit = 8 elements * 8 * 8bit
+SEQAN_DEFINE_SIMD_VECTOR_(SimdVector8Int64,     int64_t,        64)
+SEQAN_DEFINE_SIMD_VECTOR_(SimdVector8UInt64,    uint64_t,       64)
+
+// ============================================================================
+// Functions
+// ============================================================================
+
+// ============================================================================
+// AVX512 wrappers (512bit vectors)
+// ============================================================================
+
+// --------------------------------------------------------------------------
+// _fillVector (512bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector, int L, typename TValue>
+inline void
+_fillVector(TSimdVector & vector,
+            std::tuple<TValue> const & x,
+            std::index_sequence<0> const &,
+            SimdParams_<64, L>)
+{
+    vector = createVector<TSimdVector>(std::get<0>(x));
+}
+
+template <typename TSimdVector, int L, typename ...TValue, size_t ...INDICES>
+inline void
+_fillVector(TSimdVector & vector,
+            std::tuple<TValue...> const & args,
+            std::index_sequence<INDICES...> const &,
+            SimdParams_<64, L>)
+{
+    using TSimdValue = typename Value<TSimdVector>::Type;
+    vector = TSimdVector{static_cast<TSimdValue>(std::get<INDICES>(args))...};
+}
+
+// --------------------------------------------------------------------------
+// _clearVector (512bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector, int L>
+inline void _clearVector(TSimdVector & vector, SimdParams_<64, L>)
+{
+    vector = TSimdVector{};
+}
+
+// --------------------------------------------------------------------------
+// _createVector (512bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector, typename TValue, int L>
+inline TSimdVector _createVector(TValue const x, SimdParams_<64, L>)
+{
+    using TValue_ = typename Value<TSimdVector>::Type;
+    return TSimdVector{} + static_cast<TValue_>(x);
+}
+
+// --------------------------------------------------------------------------
+// _cmpEq (512bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector, int L>
+inline TSimdVector _cmpEq(TSimdVector & a, TSimdVector & b, SimdParams_<64, L>)
+{
+    return a == b;
+}
+
+// bad auto-vectorization for gcc
+#ifndef __AVX512BW__
+template <typename TSimdVector>
+inline TSimdVector _cmpEq(TSimdVector const & a, TSimdVector const & b, SimdParams_<64, 32>)
+{
+    auto aLow = _mm512_extracti64x4_epi64(SEQAN_VECTOR_CAST_(const __m512i&, a), 0);
+    auto bLow = _mm512_extracti64x4_epi64(SEQAN_VECTOR_CAST_(const __m512i&, b), 0);
+    auto cmpLow = _mm256_cmpeq_epi16(aLow, bLow);
+
+    auto aHigh = _mm512_extracti64x4_epi64(SEQAN_VECTOR_CAST_(const __m512i&, a), 1);
+    auto bHigh = _mm512_extracti64x4_epi64(SEQAN_VECTOR_CAST_(const __m512i&, b), 1);
+    auto cmpHigh = _mm256_cmpeq_epi16(aHigh, bHigh);
+
+    auto result = _mm512_broadcast_i64x4(cmpLow);
+    result = _mm512_inserti64x4(result, cmpHigh, 1);
+    return SEQAN_VECTOR_CAST_(TSimdVector, result);
+}
+#endif
+
+// --------------------------------------------------------------------------
+// _cmpGt (512bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector, int L, typename TValue>
+inline TSimdVector _cmpGt(TSimdVector & a, TSimdVector & b, SimdParams_<64, L, TValue>)
+{
+    return a > b;
+}
+
+// --------------------------------------------------------------------------
+// _bitwiseAndNot (512bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector, int L>
+inline TSimdVector _bitwiseAndNot(TSimdVector & a, TSimdVector & b, SimdParams_<64, L>)
+{
+    return (~a & b);
+}
+
+// --------------------------------------------------------------------------
+// _max (512bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector, int L, typename TValue>
+inline TSimdVector _max(TSimdVector & a, TSimdVector & b, SimdParams_<64, L, TValue>)
+{
+    return a > b ? a : b;
+}
+
+// --------------------------------------------------------------------------
+// _min (512bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector, int L, typename TValue>
+inline TSimdVector _min(TSimdVector & a, TSimdVector & b, SimdParams_<64, L, TValue>)
+{
+    return a < b ? a : b;
+}
+
+// --------------------------------------------------------------------------
+// _blend (512bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector, typename TSimdVectorMask, int L>
+inline TSimdVector _blend(TSimdVector const & a, TSimdVector const & b, TSimdVectorMask const & mask, SimdParams_<64, L>)
+{
+    return mask ? b : a;
+}
+
+// bad auto-vectorization for gcc
+#ifndef __AVX512BW__
+template <typename TSimdVector, typename TSimdVectorMask>
+inline TSimdVector _blend(TSimdVector const & a, TSimdVector const & b, TSimdVectorMask const & mask, SimdParams_<64, 32>)
+{
+    auto aLow = _mm512_extracti64x4_epi64(SEQAN_VECTOR_CAST_(const __m512i&, a), 0);
+    auto bLow = _mm512_extracti64x4_epi64(SEQAN_VECTOR_CAST_(const __m512i&, b), 0);
+    auto maskLow = _mm512_extracti64x4_epi64(SEQAN_VECTOR_CAST_(const __m512i&, mask), 0);
+    auto blendLow = _mm256_blendv_epi8(aLow, bLow, maskLow);
+
+    auto aHigh = _mm512_extracti64x4_epi64(SEQAN_VECTOR_CAST_(const __m512i&, a), 1);
+    auto bHigh = _mm512_extracti64x4_epi64(SEQAN_VECTOR_CAST_(const __m512i&, b), 1);
+    auto maskHigh = _mm512_extracti64x4_epi64(SEQAN_VECTOR_CAST_(const __m512i&, mask), 1);
+    auto blendHigh = _mm256_blendv_epi8(aHigh, bHigh, maskHigh);
+
+    auto result = _mm512_broadcast_i64x4(blendLow);
+    result = _mm512_inserti64x4(result, blendHigh, 1);
+    return SEQAN_VECTOR_CAST_(TSimdVector, result);
+}
+#endif
+
+// --------------------------------------------------------------------------
+// _storeu (512bit)
+// --------------------------------------------------------------------------
+
+template <typename T, typename TSimdVector, int L>
+inline void _storeu(T * memAddr, TSimdVector & vec, SimdParams_<64, L>)
+{
+    constexpr auto length = LENGTH<TSimdVector>::VALUE;
+    for (unsigned i = 0; i < length; i++)
+        memAddr[i] = vec[i];
+}
+
+// ----------------------------------------------------------------------------
+// Function _load() 512bit
+// ----------------------------------------------------------------------------
+
+template <typename TSimdVector, typename T, int L>
+inline TSimdVector _load(T const * memAddr, SimdParams_<64, L>)
+{
+    constexpr auto length = LENGTH<TSimdVector>::VALUE;
+    TSimdVector result;
+    for (unsigned i = 0; i < length; i++)
+        result[i] = memAddr[i];
+    return result;
+}
+
+// --------------------------------------------------------------------------
+// _shiftRightLogical (512bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector, int L>
+inline TSimdVector _shiftRightLogical(TSimdVector const & vector, const int imm, SimdParams_<64, L>)
+{
+    return vector >> imm;
+}
+
+// --------------------------------------------------------------------------
+// _gather (512bit)
+// --------------------------------------------------------------------------
+
+template <typename TValue, typename TSimdVector, typename TSize, TSize SCALE, int L>
+inline TSimdVector
+_gather(TValue const * memAddr,
+        TSimdVector const & idx,
+        std::integral_constant<TSize, SCALE> const & /*scale*/,
+        SimdParams_<64, L>)
+{
+    constexpr auto length = LENGTH<TSimdVector>::VALUE;
+    TSimdVector result;
+    for (unsigned i = 0; i < length; i++)
+        result[i] = memAddr[idx[i]];
+    return result;
+}
+
+// --------------------------------------------------------------------------
+// _shuffleVector (512bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector1, typename TSimdVector2, int L>
+inline TSimdVector1
+_shuffleVector(TSimdVector1 const & vector, TSimdVector2 const & indices, SimdParams_<64, L>, SimdParams_<64, 64>)
+{
+    constexpr auto length = seqan::LENGTH<TSimdVector1>::VALUE;
+    TSimdVector1 result{};
+    for(unsigned i = 0u; i < length; ++i)
+        result[i] = vector[indices[i]];
+    return result;
+}
+
+} // namespace seqan
+
+#endif // SEQAN_INCLUDE_SEQAN_SIMD_SIMD_BASE_SEQAN_IMPL_AVX512_H_
diff --git a/include/seqan/simd/simd_base_seqan_impl_sse4.2.h b/include/seqan/simd/simd_base_seqan_impl_sse4.2.h
new file mode 100644
index 0000000..03b86ed
--- /dev/null
+++ b/include/seqan/simd/simd_base_seqan_impl_sse4.2.h
@@ -0,0 +1,1053 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+//         René Rahn <rene.rahn at fu-berlin.de>
+//         Stefan Budach <stefan.budach at fu-berlin.de>
+// ==========================================================================
+// generic SIMD interface for SSE3 / AVX2
+// ==========================================================================
+
+#ifndef SEQAN_INCLUDE_SEQAN_SIMD_SIMD_BASE_SEQAN_IMPL_SSE4_2_H_
+#define SEQAN_INCLUDE_SEQAN_SIMD_SIMD_BASE_SEQAN_IMPL_SSE4_2_H_
+
+namespace seqan {
+
+// SimdParams_<8, 8>: 64bit = 8 elements * 8bit
+SEQAN_DEFINE_SIMD_VECTOR_(SimdVector8Char,      char,           8)
+SEQAN_DEFINE_SIMD_VECTOR_(SimdVector8SChar,     signed char,    8)
+SEQAN_DEFINE_SIMD_VECTOR_(SimdVector8UChar,     unsigned char,  8)
+
+// SimdParams_<8, 4>: 64bit = 4 elements * 2 * 8bit
+SEQAN_DEFINE_SIMD_VECTOR_(SimdVector4Short,     short,          8)
+SEQAN_DEFINE_SIMD_VECTOR_(SimdVector4UShort,    unsigned short, 8)
+
+// SimdParams_<8, 2>: 64bit = 2 elements * 4 * 8bit
+SEQAN_DEFINE_SIMD_VECTOR_(SimdVector2Int,       int,            8)
+SEQAN_DEFINE_SIMD_VECTOR_(SimdVector2UInt,      unsigned int,   8)
+
+// SimdParams_<16, 16>: 128bit = 16 elements * 8bit
+SEQAN_DEFINE_SIMD_VECTOR_(SimdVector16Char,     char,           16)
+SEQAN_DEFINE_SIMD_VECTOR_(SimdVector16SChar,    signed char,    16)
+SEQAN_DEFINE_SIMD_VECTOR_(SimdVector16UChar,    unsigned char,  16)
+
+// SimdParams_<16, 8>: 128bit = 8 elements * 2 * 8bit
+SEQAN_DEFINE_SIMD_VECTOR_(SimdVector8Short,     short,          16)
+SEQAN_DEFINE_SIMD_VECTOR_(SimdVector8UShort,    unsigned short, 16)
+
+// SimdParams_<16, 4>: 128bit = 4 elements * 4 * 8bit
+SEQAN_DEFINE_SIMD_VECTOR_(SimdVector4Int,       int,            16)
+SEQAN_DEFINE_SIMD_VECTOR_(SimdVector4UInt,      unsigned int,   16)
+
+// SimdParams_<16, 2>: 128bit = 2 elements * 8 * 8bit
+SEQAN_DEFINE_SIMD_VECTOR_(SimdVector2Int64,     int64_t,        16)
+SEQAN_DEFINE_SIMD_VECTOR_(SimdVector2UInt64,    uint64_t,       16)
+
+// ============================================================================
+// Functions
+// ============================================================================
+
+// --------------------------------------------------------------------------
+// _fillVector (128bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector, typename... TValue>
+inline void
+_fillVector(TSimdVector & vector,
+            std::tuple<TValue...> const & x,
+            std::index_sequence<0> const &,
+            SimdParams_<16, 16> const &)
+{
+  vector = SEQAN_VECTOR_CAST_(TSimdVector, _mm_set1_epi8(std::get<0>(x)));
+}
+
+template <typename TSimdVector, typename... TValue>
+inline void
+_fillVector(TSimdVector & vector,
+            std::tuple<TValue...> const & x,
+            std::index_sequence<0> const &,
+            SimdParams_<16, 8> const &)
+{
+  vector = SEQAN_VECTOR_CAST_(TSimdVector, _mm_set1_epi16(std::get<0>(x)));
+}
+
+template <typename TSimdVector, typename... TValue>
+inline void
+_fillVector(TSimdVector & vector,
+            std::tuple<TValue...> const & x,
+            std::index_sequence<0> const &,
+            SimdParams_<16, 4> const &)
+{
+  vector = SEQAN_VECTOR_CAST_(TSimdVector, _mm_set1_epi32(std::get<0>(x)));
+}
+
+template <typename TSimdVector, typename... TValue>
+inline void
+_fillVector(TSimdVector & vector,
+            std::tuple<TValue...> const & x,
+            std::index_sequence<0> const &,
+            SimdParams_<16, 2> const &)
+{
+  vector = SEQAN_VECTOR_CAST_(TSimdVector, _mm_set1_epi64x(std::get<0>(x)));
+}
+
+template <typename TSimdVector, typename ...TValue, size_t ...INDICES>
+inline void
+_fillVector(TSimdVector & vector,
+            std::tuple<TValue...> const & args,
+            std::index_sequence<INDICES...> const &,
+            SimdParams_<16, 16> const &)
+{
+    vector = SEQAN_VECTOR_CAST_(TSimdVector, _mm_setr_epi8(std::get<INDICES>(args)...));
+}
+
+template <typename TSimdVector, typename ...TValue, size_t ...INDICES>
+inline void
+_fillVector(TSimdVector & vector,
+            std::tuple<TValue...> const & args,
+            std::index_sequence<INDICES...> const &,
+            SimdParams_<16, 8> const &)
+{
+    vector = SEQAN_VECTOR_CAST_(TSimdVector, _mm_setr_epi16(std::get<INDICES>(args)...));
+}
+
+template <typename TSimdVector, typename ...TValue, size_t ...INDICES>
+inline void
+_fillVector(TSimdVector & vector,
+            std::tuple<TValue...> const & args,
+            std::index_sequence<INDICES...> const &,
+            SimdParams_<16, 4> const &)
+{
+    vector = SEQAN_VECTOR_CAST_(TSimdVector, _mm_setr_epi32(std::get<INDICES>(args)...));
+}
+
+template <typename TSimdVector, typename ...TValue, size_t ...INDICES>
+inline void
+_fillVector(TSimdVector & vector,
+            std::tuple<TValue...> const & args,
+            std::index_sequence<INDICES...> const &,
+            SimdParams_<16, 2> const &)
+{
+    // reverse argument list 0, 1 -> 1, 0
+    // NOTE(marehr): Intel linux fails to reverse argument list and only
+    // _mm_set_epi64x has no reverse equivalent
+    // NOTE(rrahn): For g++-4.9 the set_epi function is a macro, which does not work with parameter pack expansion.
+    vector = SEQAN_VECTOR_CAST_(TSimdVector, _mm_set_epi64x(std::get<sizeof...(INDICES) - 1 - INDICES>(args)...));
+}
+
+// --------------------------------------------------------------------------
+// _clearVector (128bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector, int L>
+inline void _clearVector(TSimdVector & vector, SimdParams_<16, L>)
+{
+    vector = SEQAN_VECTOR_CAST_(TSimdVector, _mm_setzero_si128());
+}
+
+// --------------------------------------------------------------------------
+// _createVector (128bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector, typename TValue>
+inline TSimdVector _createVector(TValue const x, SimdParams_<16, 16>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector, _mm_set1_epi8(x));
+}
+
+template <typename TSimdVector, typename TValue>
+inline TSimdVector _createVector(TValue const x, SimdParams_<16, 8>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector, _mm_set1_epi16(x));
+}
+
+template <typename TSimdVector, typename TValue>
+inline TSimdVector _createVector(TValue const x, SimdParams_<16, 4>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector, _mm_set1_epi32(x));
+}
+
+template <typename TSimdVector, typename TValue>
+inline TSimdVector _createVector(TValue const x, SimdParams_<16, 2>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector, _mm_set1_epi64x(x));
+}
+
+// --------------------------------------------------------------------------
+// cmpEq (128bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline TSimdVector _cmpEq(TSimdVector const & a, TSimdVector const & b, SimdParams_<16, 16>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_cmpeq_epi8(SEQAN_VECTOR_CAST_(const __m128i&, a),
+                                             SEQAN_VECTOR_CAST_(const __m128i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _cmpEq(TSimdVector const & a, TSimdVector const & b, SimdParams_<16, 8>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_cmpeq_epi16(SEQAN_VECTOR_CAST_(const __m128i&, a),
+                                              SEQAN_VECTOR_CAST_(const __m128i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _cmpEq(TSimdVector const & a, TSimdVector const & b, SimdParams_<16, 4>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_cmpeq_epi32(SEQAN_VECTOR_CAST_(const __m128i&, a),
+                                              SEQAN_VECTOR_CAST_(const __m128i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _cmpEq(TSimdVector const & a, TSimdVector const & b, SimdParams_<16, 2>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_cmpeq_epi64(SEQAN_VECTOR_CAST_(const __m128i&, a),
+                                              SEQAN_VECTOR_CAST_(const __m128i&, b)));
+}
+
+// --------------------------------------------------------------------------
+// _cmpGt (128bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline TSimdVector _cmpGt(TSimdVector const & a, TSimdVector const & b, SimdParams_<16, 16, int8_t>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_cmpgt_epi8(SEQAN_VECTOR_CAST_(const __m128i&, a),
+                                             SEQAN_VECTOR_CAST_(const __m128i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _cmpGt(TSimdVector const & a, TSimdVector const & b, SimdParams_<16, 16, uint8_t>)
+{
+    // There is no unsigned cmpgt, we reduce it to the signed case.
+    // Note that 0x80 = ~0x7F (prevent overflow messages).
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_cmpgt_epi8(
+                                  _mm_xor_si128(SEQAN_VECTOR_CAST_(const __m128i&, a), _mm_set1_epi8(~0x7F)),
+                                  _mm_xor_si128(SEQAN_VECTOR_CAST_(const __m128i&, b), _mm_set1_epi8(~0x7F))));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _cmpGt(TSimdVector const & a, TSimdVector const & b, SimdParams_<16, 8, int16_t>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_cmpgt_epi16(SEQAN_VECTOR_CAST_(const __m128i&, a),
+                                              SEQAN_VECTOR_CAST_(const __m128i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _cmpGt(TSimdVector const & a, TSimdVector const & b, SimdParams_<16, 8, uint16_t>)
+{
+    // There is no unsigned cmpgt, we reduce it to the signed case.
+    // Note that 0x8000 = ~0x7FFF (prevent overflow messages).
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_cmpgt_epi16(
+                                  _mm_xor_si128(SEQAN_VECTOR_CAST_(const __m128i&, a), _mm_set1_epi16(~0x7FFF)),
+                                  _mm_xor_si128(SEQAN_VECTOR_CAST_(const __m128i&, b), _mm_set1_epi16(~0x7FFF))));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _cmpGt(TSimdVector const & a, TSimdVector const & b, SimdParams_<16, 4, int32_t>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_cmpgt_epi32(SEQAN_VECTOR_CAST_(const __m128i&, a),
+                                              SEQAN_VECTOR_CAST_(const __m128i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _cmpGt(TSimdVector const & a, TSimdVector const & b, SimdParams_<16, 4, uint32_t>)
+{
+    // There is no unsigned cmpgt, we reduce it to the signed case.
+    // Note that 0x80000000 = ~0x7FFFFFFF (prevent overflow messages).
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_cmpgt_epi32(
+                                  _mm_xor_si128(SEQAN_VECTOR_CAST_(const __m128i&, a), _mm_set1_epi32(~0x7FFFFFFF)),
+                                  _mm_xor_si128(SEQAN_VECTOR_CAST_(const __m128i&, b), _mm_set1_epi32(~0x7FFFFFFF))));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _cmpGt(TSimdVector const & a, TSimdVector const & b, SimdParams_<16, 2, int64_t>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_cmpgt_epi64(SEQAN_VECTOR_CAST_(const __m128i&, a),
+                                              SEQAN_VECTOR_CAST_(const __m128i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _cmpGt(TSimdVector const & a, TSimdVector const & b, SimdParams_<16, 2, uint64_t>)
+{
+    // There is no unsigned cmpgt, we reduce it to the signed case.
+    // Note that 0x8000000000000000ul = ~0x7FFFFFFFFFFFFFFFul (prevent overflow messages).
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_cmpgt_epi64(
+                                  _mm_xor_si128(SEQAN_VECTOR_CAST_(const __m128i&, a) ,_mm_set1_epi64x(~0x7FFFFFFFFFFFFFFFul)),
+                                  _mm_xor_si128(SEQAN_VECTOR_CAST_(const __m128i&, b), _mm_set1_epi64x(~0x7FFFFFFFFFFFFFFFul))));
+}
+
+// --------------------------------------------------------------------------
+// _bitwiseOr (128bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector, int L>
+inline TSimdVector _bitwiseOr(TSimdVector const & a, TSimdVector const & b, SimdParams_<16, L>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_or_si128(SEQAN_VECTOR_CAST_(const __m128i&, a),
+                                           SEQAN_VECTOR_CAST_(const __m128i&, b)));
+}
+
+// --------------------------------------------------------------------------
+// _bitwiseAnd (128bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector, int L>
+inline TSimdVector _bitwiseAnd(TSimdVector const & a, TSimdVector const & b, SimdParams_<16, L>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_and_si128(SEQAN_VECTOR_CAST_(const __m128i&, a),
+                                            SEQAN_VECTOR_CAST_(const __m128i&, b)));
+}
+
+// --------------------------------------------------------------------------
+// _bitwiseAndNot (128bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector, int L>
+inline TSimdVector _bitwiseAndNot(TSimdVector const & a, TSimdVector const & b, SimdParams_<16, L>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_andnot_si128(SEQAN_VECTOR_CAST_(const __m128i&, a),
+                                               SEQAN_VECTOR_CAST_(const __m128i&, b)));
+}
+
+// --------------------------------------------------------------------------
+// _bitwiseNot (128bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline TSimdVector _bitwiseNot(TSimdVector const & a, SimdParams_<16, 16>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_cmpeq_epi8(SEQAN_VECTOR_CAST_(const __m128i&, a),
+                                             _mm_setzero_si128()));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _bitwiseNot(TSimdVector const & a, SimdParams_<16, 8>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_cmpeq_epi16(SEQAN_VECTOR_CAST_(const __m128i&, a),
+                                              _mm_setzero_si128()));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _bitwiseNot(TSimdVector const & a, SimdParams_<16, 4>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_cmpeq_epi32(SEQAN_VECTOR_CAST_(const __m128i&, a),
+                                              _mm_setzero_si128()));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _bitwiseNot(TSimdVector const & a, SimdParams_<16, 2>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_cmpeq_epi64(SEQAN_VECTOR_CAST_(const __m128i&, a),
+                                              _mm_setzero_si128()));
+}
+
+// --------------------------------------------------------------------------
+// _divide (128bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline TSimdVector _divide(TSimdVector const & a, int b, SimdParams_<16, 16>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector, _mm_div_epi8(a, _mm_set1_epi8(b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _divide(TSimdVector const & a, int b, SimdParams_<16, 8>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector, _mm_div_epi16(a, _mm_set1_epi16(b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _divide(TSimdVector const & a, int b, SimdParams_<16, 4>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector, _mm_div_epi32(a, _mm_set1_epi32(b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _divide(TSimdVector const & a, int b, SimdParams_<16, 2>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector, _mm_div_epi64(a, _mm_set1_epi64x(b)));
+}
+
+// --------------------------------------------------------------------------
+// _add (128bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline TSimdVector _add(TSimdVector const & a, TSimdVector const & b, SimdParams_<16, 16>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_add_epi8(SEQAN_VECTOR_CAST_(const __m128i&, a),
+                                           SEQAN_VECTOR_CAST_(const __m128i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _add(TSimdVector const & a, TSimdVector const & b, SimdParams_<16, 8>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_add_epi16(SEQAN_VECTOR_CAST_(const __m128i&, a),
+                                            SEQAN_VECTOR_CAST_(const __m128i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _add(TSimdVector const & a, TSimdVector const & b, SimdParams_<16, 4>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_add_epi32(SEQAN_VECTOR_CAST_(const __m128i&, a),
+                                            SEQAN_VECTOR_CAST_(const __m128i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _add(TSimdVector const & a, TSimdVector const & b, SimdParams_<16, 2>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_add_epi64(SEQAN_VECTOR_CAST_(const __m128i&, a),
+                                            SEQAN_VECTOR_CAST_(const __m128i&, b)));
+}
+
+// --------------------------------------------------------------------------
+// _sub (128bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline TSimdVector _sub(TSimdVector const & a, TSimdVector const & b, SimdParams_<16, 16>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_sub_epi8(SEQAN_VECTOR_CAST_(const __m128i&, a),
+                                           SEQAN_VECTOR_CAST_(const __m128i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _sub(TSimdVector const & a, TSimdVector const & b, SimdParams_<16, 8>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_sub_epi16(SEQAN_VECTOR_CAST_(const __m128i&, a),
+                                            SEQAN_VECTOR_CAST_(const __m128i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _sub(TSimdVector const & a, TSimdVector const & b, SimdParams_<16, 4>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_sub_epi32(SEQAN_VECTOR_CAST_(const __m128i&, a),
+                                            SEQAN_VECTOR_CAST_(const __m128i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _sub(TSimdVector const & a, TSimdVector const & b, SimdParams_<16, 2>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_sub_epi64(SEQAN_VECTOR_CAST_(const __m128i&, a),
+                                            SEQAN_VECTOR_CAST_(const __m128i&, b)));
+}
+
+// --------------------------------------------------------------------------
+// _mult (128bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline TSimdVector _mult(TSimdVector const & a, TSimdVector const &/*b*/, SimdParams_<16, 16>)
+{
+    SEQAN_ASSERT_FAIL("SSE intrinsics for multiplying 8 bit values not implemented!");
+    return a;
+}
+
+template <typename TSimdVector>
+inline TSimdVector _mult(TSimdVector const & a, TSimdVector const & b, SimdParams_<16, 8>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_mullo_epi16(SEQAN_VECTOR_CAST_(const __m128i&, a),
+                                              SEQAN_VECTOR_CAST_(const __m128i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _mult(TSimdVector const & a, TSimdVector const & b, SimdParams_<16, 4>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_mullo_epi32(SEQAN_VECTOR_CAST_(const __m128i&, a),
+                                              SEQAN_VECTOR_CAST_(const __m128i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _mult(TSimdVector const & a, TSimdVector const &/*b*/, SimdParams_<16, 2>)
+{
+    SEQAN_ASSERT_FAIL("SSE intrinsics for multiplying 64 bit values not implemented!");
+    return a;
+}
+
+// --------------------------------------------------------------------------
+// _max (128bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline TSimdVector _max(TSimdVector const & a, TSimdVector const & b, SimdParams_<16, 16, int8_t>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_max_epi8(SEQAN_VECTOR_CAST_(const __m128i&, a),
+                                           SEQAN_VECTOR_CAST_(const __m128i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _max(TSimdVector const & a, TSimdVector const & b, SimdParams_<16, 16, uint8_t>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_max_epu8(SEQAN_VECTOR_CAST_(const __m128i&, a),
+                                           SEQAN_VECTOR_CAST_(const __m128i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _max(TSimdVector const & a, TSimdVector const & b, SimdParams_<16, 8, int16_t>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_max_epi16(SEQAN_VECTOR_CAST_(const __m128i&, a),
+                                            SEQAN_VECTOR_CAST_(const __m128i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _max(TSimdVector const & a, TSimdVector const & b, SimdParams_<16, 8, uint16_t>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_max_epu16(SEQAN_VECTOR_CAST_(const __m128i&, a),
+                                            SEQAN_VECTOR_CAST_(const __m128i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _max(TSimdVector const & a, TSimdVector const & b, SimdParams_<16, 4, int32_t>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_max_epi32(SEQAN_VECTOR_CAST_(const __m128i&, a),
+                                            SEQAN_VECTOR_CAST_(const __m128i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _max(TSimdVector const & a, TSimdVector const & b, SimdParams_<16, 4, uint32_t>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_max_epu32(SEQAN_VECTOR_CAST_(const __m128i&, a),
+                                            SEQAN_VECTOR_CAST_(const __m128i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _max(TSimdVector const & a, TSimdVector const & b, SimdParams_<16, 2, int64_t>)
+{
+#if defined(__AVX512VL__)
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_max_epi64(SEQAN_VECTOR_CAST_(const __m128i&, a),
+                                            SEQAN_VECTOR_CAST_(const __m128i&, b)));
+#else // defined(__AVX512VL__)
+    return blend(b, a, cmpGt(a, b));
+#endif // defined(__AVX512VL__)
+}
+
+template <typename TSimdVector>
+inline TSimdVector _max(TSimdVector const & a, TSimdVector const & b, SimdParams_<16, 2, uint64_t>)
+{
+#if defined(__AVX512VL__)
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_max_epu64(SEQAN_VECTOR_CAST_(const __m128i&, a),
+                                            SEQAN_VECTOR_CAST_(const __m128i&, b)));
+#else // defined(__AVX512VL__)
+    return blend(b, a, cmpGt(a, b));
+#endif // defined(__AVX512VL__)
+}
+
+
+// --------------------------------------------------------------------------
+// _min (128bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline TSimdVector _min(TSimdVector const & a, TSimdVector const & b, SimdParams_<16, 16, int8_t>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_min_epi8(SEQAN_VECTOR_CAST_(const __m128i&, a),
+                                           SEQAN_VECTOR_CAST_(const __m128i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _min(TSimdVector const & a, TSimdVector const & b, SimdParams_<16, 16, uint8_t>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_min_epu8(SEQAN_VECTOR_CAST_(const __m128i&, a),
+                                           SEQAN_VECTOR_CAST_(const __m128i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _min(TSimdVector const & a, TSimdVector const & b, SimdParams_<16, 8, int16_t>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_min_epi16(SEQAN_VECTOR_CAST_(const __m128i&, a),
+                                            SEQAN_VECTOR_CAST_(const __m128i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _min(TSimdVector const & a, TSimdVector const & b, SimdParams_<16, 8, uint16_t>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_min_epu16(SEQAN_VECTOR_CAST_(const __m128i&, a),
+                                            SEQAN_VECTOR_CAST_(const __m128i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _min(TSimdVector const & a, TSimdVector const & b, SimdParams_<16, 4, int32_t>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_min_epi32(SEQAN_VECTOR_CAST_(const __m128i&, a),
+                                            SEQAN_VECTOR_CAST_(const __m128i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _min(TSimdVector const & a, TSimdVector const & b, SimdParams_<16, 4, uint32_t>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_min_epu32(SEQAN_VECTOR_CAST_(const __m128i&, a),
+                                            SEQAN_VECTOR_CAST_(const __m128i&, b)));
+}
+
+template <typename TSimdVector>
+inline TSimdVector _min(TSimdVector const & a, TSimdVector const & b, SimdParams_<16, 2, int64_t>)
+{
+#if defined(__AVX512VL__)
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_min_epi64(SEQAN_VECTOR_CAST_(const __m128i&, a),
+                                            SEQAN_VECTOR_CAST_(const __m128i&, b)));
+#else // defined(__AVX512VL__)
+    return blend(a, b, cmpGt(a, b));
+#endif // defined(__AVX512VL__)
+}
+
+template <typename TSimdVector>
+inline TSimdVector _min(TSimdVector const & a, TSimdVector const & b, SimdParams_<16, 2, uint64_t>)
+{
+#if defined(__AVX512VL__)
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_min_epu64(SEQAN_VECTOR_CAST_(const __m128i&, a),
+                                            SEQAN_VECTOR_CAST_(const __m128i&, b)));
+#else // defined(__AVX512VL__)
+    return blend(a, b, cmpGt(a, b));
+#endif // defined(__AVX512VL__)
+}
+
+// --------------------------------------------------------------------------
+// _blend (128bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector, typename TSimdVectorMask, int L>
+inline TSimdVector _blend(TSimdVector const & a, TSimdVector const & b, TSimdVectorMask const & mask, SimdParams_<16, L>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector,
+                              _mm_blendv_epi8(SEQAN_VECTOR_CAST_(const __m128i&, a),
+                                              SEQAN_VECTOR_CAST_(const __m128i&, b),
+                                              SEQAN_VECTOR_CAST_(const __m128i&, mask)));
+}
+
+// --------------------------------------------------------------------------
+// _storeu (128bit)
+// --------------------------------------------------------------------------
+
+template <typename T, typename TSimdVector, int L>
+inline void _storeu(T * memAddr, TSimdVector const & vec, SimdParams_<16, L>)
+{
+    _mm_storeu_si128((__m128i*)memAddr, reinterpret_cast<const __m128i &>(vec));
+}
+
+// ----------------------------------------------------------------------------
+// Function _load() 128bit
+// ----------------------------------------------------------------------------
+
+template <typename TSimdVector, typename T, int L>
+inline TSimdVector _load(T const * memAddr, SimdParams_<16, L>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector, _mm_load_si128((__m128i const *) memAddr));
+}
+
+// --------------------------------------------------------------------------
+// _shiftRightLogical (128bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline TSimdVector _shiftRightLogical(TSimdVector const & vector, const int imm, SimdParams_<16, 16>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector, _mm_srli_epi16(SEQAN_VECTOR_CAST_(const __m128i &, vector), imm) & _mm_set1_epi8(0xff >> imm));
+}
+template <typename TSimdVector>
+inline TSimdVector _shiftRightLogical(TSimdVector const & vector, const int imm, SimdParams_<16, 8>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector, _mm_srli_epi16(SEQAN_VECTOR_CAST_(const __m128i &, vector), imm));
+}
+template <typename TSimdVector>
+inline TSimdVector _shiftRightLogical(TSimdVector const & vector, const int imm, SimdParams_<16, 4>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector, _mm_srli_epi32(SEQAN_VECTOR_CAST_(const __m128i &, vector), imm));
+}
+template <typename TSimdVector>
+inline TSimdVector _shiftRightLogical(TSimdVector const & vector, const int imm, SimdParams_<16, 2>)
+{
+    return SEQAN_VECTOR_CAST_(TSimdVector, _mm_srli_epi64(SEQAN_VECTOR_CAST_(const __m128i &, vector), imm));
+}
+
+// --------------------------------------------------------------------------
+// _gather (128bit)
+// --------------------------------------------------------------------------
+
+template <typename TValue, typename TSimdVector, typename TSize, TSize SCALE, typename TSimdParams>
+inline TSimdVector
+_gather(TValue const * memAddr,
+        TSimdVector const & idx,
+        std::integral_constant<TSize, SCALE> const & /*scale*/,
+        TSimdParams)
+{
+    TSimdVector ret;
+    for (auto i = 0u; i < LENGTH<TSimdVector>::VALUE; ++i)
+    {
+        ret[i] = memAddr[idx[i]];
+    }
+    return ret;
+}
+
+// --------------------------------------------------------------------------
+// _shuffleVector (128bit)
+// --------------------------------------------------------------------------
+
+inline __m128i
+seqan_mm_shuffle_epi16(const __m128i a, const __m128i b)
+{
+    // multiply by 2
+    __m128i idx = _mm_slli_epi16(b, 1);
+    return _mm_shuffle_epi8(
+        a,
+        // interleave idx[7:0]   = 2*indices[7],   ..., 2*indices[0]
+        // with       idx[7:0]+1 = 2*indices[7]+1, ..., 2*indices[0]+1
+        // => 2*indices[7]+1, 2*indices[7], ..., 2*indices[0]+1, 2*indices[0]
+        _mm_unpacklo_epi8(
+            idx,
+            _mm_add_epi8(idx, _mm_set1_epi8(1))
+        )
+    );
+}
+
+inline __m128i
+seqan_mm_shuffle_epi32(const __m128i a, const __m128i b)
+{
+    // multiply by 4
+    __m128i idx = _mm_slli_epi16(b, 2);
+    return _mm_shuffle_epi8(
+        a,
+        // interleave 4*indices[3]+1, 4*indices[3]+0; ..., 4*indices[0]+1, 4*indices[0]+0
+        // with       4*indices[3]+3, 4*indices[3]+2; ..., 4*indices[0]+3, 4*indices[0]+2
+        // => 4*indices[3]+3, 4*indices[3]+2; 4*indices[3]+1, 4*indices[3]+0;
+        //    ...
+        //    4*indices[0]+3, 4*indices[0]+2; 4*indices[0]+1, 4*indices[0]+0
+        _mm_unpacklo_epi16(
+            // interleave idx[3:0]+0 = 4*indices[3]+0; ...; 4*indices[0]+0
+            // with       idx[3:0]+1 = 4*indices[3]+1; ...; 4*indices[0]+1
+            // => 4*indices[3]+1; 4*indices[3]+0; ...; 4*indices[0]+1; 4*indices[0]+0
+            _mm_unpacklo_epi8(
+                idx,
+                _mm_add_epi8(idx, _mm_set1_epi8(1))
+            ),
+            // interleave idx[3:0]+2 = 4*indices[3]+2; ...; 4*indices[0]+2
+            // with       idx[3:0]+3 = 4*indices[3]+3; ...; 4*indices[0]+3
+            // => 4*indices[3]+3; 4*indices[3]+2; ...; 4*indices[0]+3; 4*indices[0]+2
+            _mm_unpacklo_epi8(
+                _mm_add_epi8(idx, _mm_set1_epi8(2)),
+                _mm_add_epi8(idx, _mm_set1_epi8(3))
+            )
+    ));
+}
+
+inline __m128i
+seqan_mm_shuffle_epi64(const __m128i a, const __m128i b)
+{
+    // multiply by 8
+    __m128i idx = _mm_slli_epi16(b, 3);
+    return _mm_shuffle_epi8(
+        a,
+        _mm_unpacklo_epi32(
+            // interleave 8*indices[1]+1, 8*indices[1]+0; ..., 8*indices[0]+1, 8*indices[0]+0
+            // with       8*indices[1]+3, 8*indices[1]+2; ..., 8*indices[0]+3, 8*indices[0]+2
+            // => 8*indices[1]+3, 8*indices[1]+2; 8*indices[1]+1, 8*indices[1]+0;
+            //    ...
+            //    8*indices[0]+3, 8*indices[0]+2; 8*indices[0]+1, 8*indices[0]+0
+            _mm_unpacklo_epi16(
+                // interleave idx[1:0]+0 = 8*indices[1]+0; ...; 8*indices[0]+0
+                // with       idx[1:0]+1 = 8*indices[1]+1; ...; 8*indices[0]+1
+                // => 8*indices[1]+1; 8*indices[1]+0; ...; 8*indices[0]+1; 8*indices[0]+0
+                _mm_unpacklo_epi8(
+                    idx,
+                    _mm_add_epi8(idx, _mm_set1_epi8(1))
+                ),
+                // interleave idx[1:0]+2 = 8*indices[1]+2; ...; 8*indices[0]+2
+                // with       idx[1:0]+3 = 8*indices[1]+3; ...; 8*indices[0]+3
+                // => 8*indices[1]+3; 8*indices[1]+2; ...; 8*indices[0]+3; 8*indices[0]+2
+                _mm_unpacklo_epi8(
+                    _mm_add_epi8(idx, _mm_set1_epi8(2)),
+                    _mm_add_epi8(idx, _mm_set1_epi8(3))
+                )
+            ),
+            // interleave 8*indices[1]+5, 8*indices[1]+4; ..., 8*indices[0]+5, 8*indices[0]+4
+            // with       8*indices[1]+7, 8*indices[1]+6; ..., 8*indices[0]+7, 8*indices[0]+6
+            // => 8*indices[1]+7, 8*indices[1]+6; 8*indices[1]+5, 8*indices[1]+4;
+            //    ...
+            //    8*indices[0]+7, 8*indices[0]+6; 8*indices[0]+5, 8*indices[0]+4
+            _mm_unpacklo_epi16(
+                // interleave idx[1:0]+4 = 8*indices[1]+4; ...; 8*indices[0]+4
+                // with       idx[1:0]+5 = 8*indices[1]+5; ...; 8*indices[0]+5
+                // => 8*indices[1]+5; 8*indices[1]+4; ...; 8*indices[0]+5; 8*indices[0]+4
+                _mm_unpacklo_epi8(
+                    _mm_add_epi8(idx, _mm_set1_epi8(4)),
+                    _mm_add_epi8(idx, _mm_set1_epi8(5))
+                ),
+                // interleave idx[1:0]+6 = 8*indices[1]+6; ...; 8*indices[0]+6
+                // with       idx[1:0]+7 = 8*indices[1]+7; ...; 8*indices[0]+7
+                // => 8*indices[1]+7; 8*indices[1]+6; ...; 8*indices[0]+7; 8*indices[0]+6
+                _mm_unpacklo_epi8(
+                    _mm_add_epi8(idx, _mm_set1_epi8(6)),
+                    _mm_add_epi8(idx, _mm_set1_epi8(7))
+                )
+            )
+        )
+    );
+}
+
+template <typename TSimdVector1, typename TSimdVector2>
+[[deprecated("Here be dragons")]]
+inline TSimdVector1
+_shuffleVector(TSimdVector1 const & vector, TSimdVector2 const & indices, SimdParams_<16, 8>, SimdParams_<8, 8>)
+{
+#if SEQAN_IS_32_BIT
+    __m128i idx = _mm_slli_epi16(
+        _mm_unpacklo_epi32(
+            _mm_cvtsi32_si128(reinterpret_cast<const uint32_t &>(indices)),
+            _mm_cvtsi32_si128(reinterpret_cast<const uint64_t &>(indices) >> 32)
+        ),
+        1
+    );
+#else
+    __m128i idx = _mm_slli_epi16(_mm_cvtsi64_si128(reinterpret_cast<const uint64_t &>(indices)), 1);
+#endif  // SEQAN_IS_32_BIT
+    return SEQAN_VECTOR_CAST_(TSimdVector1,
+        _mm_shuffle_epi8(
+            SEQAN_VECTOR_CAST_(const __m128i &, vector),
+            _mm_unpacklo_epi8(idx, _mm_add_epi8(idx, _mm_set1_epi8(1)))
+        ));
+}
+
+template <typename TSimdVector1, typename TSimdVector2>
+inline TSimdVector1
+_shuffleVector(TSimdVector1 const & vector, TSimdVector2 const & indices, SimdParams_<16, 16>, SimdParams_<16, 16>)
+{
+    return SEQAN_VECTOR_CAST_(
+        TSimdVector1,
+        _mm_shuffle_epi8(
+            SEQAN_VECTOR_CAST_(const __m128i &, vector),
+            SEQAN_VECTOR_CAST_(const __m128i &, indices)
+    ));
+}
+
+template <typename TSimdVector1, typename TSimdVector2>
+inline TSimdVector1
+_shuffleVector(TSimdVector1 const & vector, TSimdVector2 const & indices, SimdParams_<16, 8>, SimdParams_<16, 16>)
+{
+    return SEQAN_VECTOR_CAST_(
+        TSimdVector1,
+        seqan_mm_shuffle_epi16(
+            SEQAN_VECTOR_CAST_(const __m128i &, vector),
+            SEQAN_VECTOR_CAST_(const __m128i &, indices)
+    ));
+}
+
+template <typename TSimdVector1, typename TSimdVector2>
+inline TSimdVector1
+_shuffleVector(TSimdVector1 const & vector, TSimdVector2 const & indices, SimdParams_<16, 4>, SimdParams_<16, 16>)
+{
+    return SEQAN_VECTOR_CAST_(
+        TSimdVector1,
+        seqan_mm_shuffle_epi32(
+            SEQAN_VECTOR_CAST_(const __m128i &, vector),
+            SEQAN_VECTOR_CAST_(const __m128i &, indices)
+    ));
+}
+
+template <typename TSimdVector1, typename TSimdVector2>
+inline TSimdVector1
+_shuffleVector(TSimdVector1 const & vector, TSimdVector2 const & indices, SimdParams_<16, 2>, SimdParams_<16, 16>)
+{
+    return SEQAN_VECTOR_CAST_(
+        TSimdVector1,
+        seqan_mm_shuffle_epi64(
+            SEQAN_VECTOR_CAST_(const __m128i &, vector),
+            SEQAN_VECTOR_CAST_(const __m128i &, indices)
+    ));
+}
+
+// --------------------------------------------------------------------------
+// _transposeMatrix (128bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline void
+_transposeMatrix(TSimdVector matrix[], SimdMatrixParams_<8, 8, 8>)
+{
+    // we need a look-up table to reverse the lowest 4 bits
+    // in order to place the permute the transposed rows
+    static const unsigned char bitRev[] = {0,4,2,6,1,5,3,7};
+
+    // transpose a 8x8 byte matrix
+    __m64 tmp1[8];
+    for (int i = 0; i < 4; ++i)
+    {
+        tmp1[i]   = _mm_unpacklo_pi8(SEQAN_VECTOR_CAST_(const __m64 &, matrix[2*i]), SEQAN_VECTOR_CAST_(const __m64 &, matrix[2*i+1]));
+        tmp1[i+4] = _mm_unpackhi_pi8(SEQAN_VECTOR_CAST_(const __m64 &, matrix[2*i]), SEQAN_VECTOR_CAST_(const __m64 &, matrix[2*i+1]));
+    }
+    __m64 tmp2[8];
+    for (int i = 0; i < 4; ++i)
+    {
+        tmp2[i]   = _mm_unpacklo_pi16(tmp1[2*i], tmp1[2*i+1]);
+        tmp2[i+4] = _mm_unpackhi_pi16(tmp1[2*i], tmp1[2*i+1]);
+    }
+    for (int i = 0; i < 4; ++i)
+    {
+        matrix[bitRev[i]]   = SEQAN_VECTOR_CAST_(TSimdVector, _mm_unpacklo_pi32(tmp2[2*i], tmp2[2*i+1]));
+        matrix[bitRev[i+4]] = SEQAN_VECTOR_CAST_(TSimdVector, _mm_unpackhi_pi32(tmp2[2*i], tmp2[2*i+1]));
+    }
+}
+
+template <typename TSimdVector>
+inline void
+_transposeMatrix(TSimdVector matrix[], SimdMatrixParams_<16, 16, 8>)
+{
+    // we need a look-up table to reverse the lowest 4 bits
+    // in order to place the permute the transposed rows
+    static const unsigned char bitRev[] = {0,8,4,12,2,10,6,14,1,9,5,13,3,11,7,15};
+
+    // transpose a 16x16 byte matrix
+    //
+    // matrix =
+    // A0 A1 A2 ... Ae Af
+    // B0 B1 B2 ... Be Bf
+    // ...
+    // P0 P1 P2 ... Pe Pf
+    __m128i tmp1[16];
+    for (int i = 0; i < 8; ++i)
+    {
+        tmp1[i]   = _mm_unpacklo_epi8(SEQAN_VECTOR_CAST_(const __m128i &, matrix[2*i]), SEQAN_VECTOR_CAST_(const __m128i &, matrix[2*i+1]));
+        tmp1[i+8] = _mm_unpackhi_epi8(SEQAN_VECTOR_CAST_(const __m128i &, matrix[2*i]), SEQAN_VECTOR_CAST_(const __m128i &, matrix[2*i+1]));
+    }
+    // tmp1[0]  = A0 B0 A1 B1 ... A7 B7
+    // tmp1[1]  = C0 D0 C1 D1 ... C7 D7
+    // ...
+    // tmp1[7]  = O0 P0 O1 P1 ... O7 P7
+    // tmp1[8]  = A8 B8 A9 B9 ... Af Bf
+    // ...
+    // tmp1[15] = O8 P8 O9 P9 ... Of Pf
+    __m128i tmp2[16];
+    for (int i = 0; i < 8; ++i)
+    {
+        tmp2[i]   = _mm_unpacklo_epi16(tmp1[2*i], tmp1[2*i+1]);
+        tmp2[i+8] = _mm_unpackhi_epi16(tmp1[2*i], tmp1[2*i+1]);
+    }
+    // tmp2[0]  = A0 B0 C0 D0 ... A3 B3 C3 D3
+    // tmp2[1]  = E0 F0 G0 H0 ... E3 F3 G3 H3
+    // ...
+    // tmp2[3]  = M0 N0 O0 P0 ... M3 N3 O3 P3
+    // tmp2[4]  = A8 B8 C8 D8 ... Ab Bb Cb Db
+    // ...
+    // tmp2[7]  = M8 N8 O8 P8 ... Mb Nb Ob Pb
+    // tmp2[8]  = A4 B4 C4 D4 ... A7 B7 C7 D7
+    // ..
+    // tmp2[12] = Ac Bc Cc Dc ... Af Bf Cf Df
+    // ...
+    // tmp2[15] = Mc Nc Oc Pc ... Mf Nf Of Pf
+    for (int i = 0; i < 8; ++i)
+    {
+        tmp1[i]   = _mm_unpacklo_epi32(tmp2[2*i], tmp2[2*i+1]);
+        tmp1[i+8] = _mm_unpackhi_epi32(tmp2[2*i], tmp2[2*i+1]);
+    }
+    // tmp1[0]  = A0 B0 .... H0 A1 B1 .... H1
+    // tmp1[1]  = I0 J0 .... P0 I1 J1 .... P1
+    // ...
+    // tmp1[4]  = A0 B0 .... H0 A1 B1 .... H1
+    // tmp1[1]  = I0 J0 .... P0 I1 J1 .... P1
+    for (int i = 0; i < 8; ++i)
+    {
+        matrix[bitRev[i]]   = SEQAN_VECTOR_CAST_(TSimdVector, _mm_unpacklo_epi64(tmp1[2*i], tmp1[2*i+1]));
+        matrix[bitRev[i+8]] = SEQAN_VECTOR_CAST_(TSimdVector, _mm_unpackhi_epi64(tmp1[2*i], tmp1[2*i+1]));
+    }
+}
+
+// --------------------------------------------------------------------------
+// Function _testAllZeros (128bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, int)
+inline _testAllZeros(TSimdVector const & vector, TSimdVector const & mask, SimdParams_<16>)
+{
+    return _mm_testz_si128(SEQAN_VECTOR_CAST_(const __m128i &, vector),
+                           SEQAN_VECTOR_CAST_(const __m128i &, mask));
+}
+
+// --------------------------------------------------------------------------
+// Function _testAllOnes (128bit)
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline
+SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, int)
+_testAllOnes(TSimdVector const & vector, SimdParams_<16>)
+{
+    return _mm_test_all_ones(SEQAN_VECTOR_CAST_(const __m128i &, vector));
+}
+
+} // namespace seqan
+
+#endif // SEQAN_INCLUDE_SEQAN_SIMD_SIMD_BASE_SEQAN_IMPL_SSE4_2_H_
diff --git a/include/seqan/simd/simd_base_seqan_interface.h b/include/seqan/simd/simd_base_seqan_interface.h
new file mode 100644
index 0000000..82c4931
--- /dev/null
+++ b/include/seqan/simd/simd_base_seqan_interface.h
@@ -0,0 +1,392 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+//         René Rahn <rene.rahn at fu-berlin.de>
+//         Stefan Budach <stefan.budach at fu-berlin.de>
+// ==========================================================================
+// generic SIMD interface for SSE3 / AVX2
+// ==========================================================================
+
+#ifndef SEQAN_INCLUDE_SEQAN_SIMD_SIMD_BASE_SEQAN_INTERFACE_H_
+#define SEQAN_INCLUDE_SEQAN_SIMD_SIMD_BASE_SEQAN_INTERFACE_H_
+
+namespace seqan {
+
+template <typename TSimdVector>
+struct SimdMaskVectorImpl<TSimdVector, True>
+{
+    using Type = typename SimdVectorTraits<TSimdVector, SimdParams_<sizeof(TSimdVector), LENGTH<TSimdVector>::VALUE>>::MaskType;
+};
+
+template <typename TSimdVector>
+struct SimdSwizzleVectorImpl<TSimdVector, True>
+{
+    typedef typename SimdVector<uint8_t, sizeof(TSimdVector)>::Type Type;
+};
+
+// ============================================================================
+//
+// INTERFACE FUNCTIONS
+// - these should be used in the actual code, they will call one of the wrapper
+//   functions defined above based on the vector type
+//
+// ============================================================================
+
+// --------------------------------------------------------------------------
+// Function transpose()
+// --------------------------------------------------------------------------
+
+template <int ROWS, typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, void)
+transpose(TSimdVector matrix[ROWS])
+{
+    typedef typename Value<TSimdVector>::Type TValue;
+    _transposeMatrix(matrix, SimdMatrixParams_<ROWS, LENGTH<TSimdVector>::VALUE, BitsPerValue<TValue>::VALUE>());
+}
+
+// --------------------------------------------------------------------------
+// Function clearVector()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, void)
+clearVector(TSimdVector & vector)
+{
+    typedef typename Value<TSimdVector>::Type TValue;
+    _clearVector(vector, SimdParams_<sizeof(TSimdVector), sizeof(TSimdVector) / sizeof(TValue)>());
+}
+
+// --------------------------------------------------------------------------
+// Function createVector()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector, typename TValue>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+createVector(TValue const x)
+{
+    typedef typename Value<TSimdVector>::Type TIVal;
+    return _createVector<TSimdVector>(x, SimdParams_<sizeof(TSimdVector), sizeof(TSimdVector) / sizeof(TIVal)>());
+}
+
+// --------------------------------------------------------------------------
+// Function fillVector()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector, typename ...TValue>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, void)
+fillVector(TSimdVector & vector, TValue const... args)
+{
+    // On clang (<= 4.0)
+    // std::make_tuple(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17) reaches the
+    // template recursion limit of 256 (e.g. -ftemplate-depth=256 is default)
+    //
+    // See same issue asked on http://stackoverflow.com/q/23374953
+    // See also discussion to increase -ftemplate-depth to 1024 by default in
+    // clang https://llvm.org/bugs/show_bug.cgi?id=18417
+    typedef typename Value<TSimdVector>::Type TIVal;
+    _fillVector(vector, std::make_tuple(args...),
+                std::make_index_sequence<sizeof...(args)>{},
+                SimdParams_<sizeof(TSimdVector), sizeof(TSimdVector) / sizeof(TIVal)>());
+}
+
+// --------------------------------------------------------------------------
+// Function cmpEq()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, typename SimdMaskVector<TSimdVector>::Type)
+cmpEq (TSimdVector const & a, TSimdVector const & b)
+{
+    typedef typename Value<TSimdVector>::Type TValue;
+    return _cmpEq(a, b, SimdParams_<sizeof(TSimdVector), sizeof(TSimdVector) / sizeof(TValue)>());
+}
+
+// --------------------------------------------------------------------------
+// Function operator==()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, typename SimdMaskVector<TSimdVector>::Type)
+operator==(TSimdVector const & a, TSimdVector const & b)
+{
+    typedef typename Value<TSimdVector>::Type TValue;
+    return _cmpEq(a, b, SimdParams_<sizeof(TSimdVector), sizeof(TSimdVector) / sizeof(TValue)>());
+}
+
+// --------------------------------------------------------------------------
+// Function operatorGt()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, typename SimdMaskVector<TSimdVector>::Type)
+cmpGt (TSimdVector const & a, TSimdVector const & b)
+{
+    typedef typename Value<TSimdVector>::Type TValue;
+    return _cmpGt(a, b, SimdParams_<sizeof(TSimdVector), sizeof(TSimdVector) / sizeof(TValue), TValue>());
+}
+
+// --------------------------------------------------------------------------
+// Function operator>()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, typename SimdMaskVector<TSimdVector>::Type)
+operator>(TSimdVector const & a, TSimdVector const & b)
+{
+    typedef typename Value<TSimdVector>::Type TValue;
+    return _cmpGt(a, b, SimdParams_<sizeof(TSimdVector), sizeof(TSimdVector) / sizeof(TValue)>());
+}
+
+// --------------------------------------------------------------------------
+// Function max()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+max(TSimdVector const & a, TSimdVector const & b)
+{
+    typedef typename Value<TSimdVector>::Type TValue;
+    return _max(a, b, SimdParams_<sizeof(TSimdVector), sizeof(TSimdVector) / sizeof(TValue), TValue>());
+}
+
+// --------------------------------------------------------------------------
+// Function min()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+min(TSimdVector const & a, TSimdVector const & b)
+{
+    typedef typename Value<TSimdVector>::Type TValue;
+    return _min(a, b, SimdParams_<sizeof(TSimdVector), sizeof(TSimdVector) / sizeof(TValue), TValue>());
+}
+
+// --------------------------------------------------------------------------
+// Function operator|()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+operator|(TSimdVector const & a, TSimdVector const & b)
+{
+    typedef typename Value<TSimdVector>::Type TValue;
+    return _bitwiseOr(a, b, SimdParams_<sizeof(TSimdVector), sizeof(TSimdVector) / sizeof(TValue)>());
+}
+
+// --------------------------------------------------------------------------
+// Function operator|=()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector &)
+operator|=(TSimdVector & a, TSimdVector const & b)
+{
+    a = a | b;
+    return a;
+}
+
+// --------------------------------------------------------------------------
+// Function operator&()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+operator&(TSimdVector const & a, TSimdVector const & b)
+{
+    typedef typename Value<TSimdVector>::Type TValue;
+    return _bitwiseAnd(a, b, SimdParams_<sizeof(TSimdVector), sizeof(TSimdVector) / sizeof(TValue)>());
+}
+
+// --------------------------------------------------------------------------
+// Function operator&=()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector &)
+operator&=(TSimdVector & a, TSimdVector const & b)
+{
+    a = a & b;
+    return a;
+}
+
+// --------------------------------------------------------------------------
+// Function operator~()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+operator~(TSimdVector const & a)
+{
+    typedef typename Value<TSimdVector>::Type TValue;
+    return _bitwiseNot(a, SimdParams_<sizeof(TSimdVector), sizeof(TSimdVector) / sizeof(TValue)>());
+}
+
+// --------------------------------------------------------------------------
+// Function operator+()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+operator+(TSimdVector const & a, TSimdVector const & b)
+{
+    typedef typename Value<TSimdVector>::Type TValue;
+    return _add(a, b, SimdParams_<sizeof(TSimdVector), sizeof(TSimdVector) / sizeof(TValue)>());
+}
+
+// --------------------------------------------------------------------------
+// Function operator-()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+operator-(TSimdVector const & a, TSimdVector const & b)
+{
+    typedef typename Value<TSimdVector>::Type TValue;
+    return _sub(a, b, SimdParams_<sizeof(TSimdVector), sizeof(TSimdVector) / sizeof(TValue)>());
+}
+
+// --------------------------------------------------------------------------
+// Function operator*()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+operator*(TSimdVector const & a, TSimdVector const & b)
+{
+    typedef typename Value<TSimdVector>::Type TValue;
+    return _mult(a, b, SimdParams_<sizeof(TSimdVector), sizeof(TSimdVector) / sizeof(TValue)>());
+}
+
+// --------------------------------------------------------------------------
+// Function operator/()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+operator/(TSimdVector const & a, TSimdVector const & b)
+{
+    typedef typename Value<TSimdVector>::Type TValue;
+    return _div(a, b, SimdParams_<sizeof(TSimdVector), sizeof(TSimdVector) / sizeof(TValue)>());
+}
+
+// --------------------------------------------------------------------------
+// Function andNot
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+andNot(TSimdVector const & a, TSimdVector const & b)
+{
+    typedef typename Value<TSimdVector>::Type TValue;
+    return _bitwiseAndNot(a, b, SimdParams_<sizeof(TSimdVector), sizeof(TSimdVector) / sizeof(TValue)>());
+}
+
+// --------------------------------------------------------------------------
+// Function shiftRightLogical()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+shiftRightLogical(TSimdVector const & vector, const int imm)
+{
+    typedef typename Value<TSimdVector>::Type TValue;
+    return _shiftRightLogical(vector, imm, SimdParams_<sizeof(TSimdVector), sizeof(TSimdVector) / sizeof(TValue)>());
+}
+
+// --------------------------------------------------------------------------
+// Function blend()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector, typename TSimdVectorMask>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+blend(TSimdVector const & a, TSimdVector const & b, TSimdVectorMask const & mask)
+{
+    typedef typename Value<TSimdVector>::Type TValue;
+    return _blend(a, b, mask, SimdParams_<sizeof(TSimdVector), sizeof(TSimdVector) / sizeof(TValue)>());
+}
+
+// --------------------------------------------------------------------------
+// Function storeu()
+// --------------------------------------------------------------------------
+
+template <typename T, typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, void)
+storeu(T * memAddr, TSimdVector const & vec)
+{
+    typedef typename Value<TSimdVector>::Type TValue;
+    _storeu(memAddr, vec, SimdParams_<sizeof(TSimdVector), sizeof(TSimdVector) / sizeof(TValue)>());
+}
+
+// --------------------------------------------------------------------------
+// Function load()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector, typename T>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+load(T const * memAddr)
+{
+    typedef typename Value<TSimdVector>::Type TValue;
+    return _load<TSimdVector>(memAddr, SimdParams_<sizeof(TSimdVector), sizeof(TSimdVector) / sizeof(TValue)>());
+}
+
+// --------------------------------------------------------------------------
+// Function gather()
+// --------------------------------------------------------------------------
+
+template <typename TValue, typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+gather(TValue const * memAddr, TSimdVector const & idx)
+{
+    typedef typename Value<TSimdVector>::Type TInnerValue;
+    return _gather(memAddr, idx, std::integral_constant<size_t, sizeof(TValue)>(), SimdParams_<sizeof(TSimdVector), sizeof(TSimdVector) / sizeof(TInnerValue)>());
+}
+
+// --------------------------------------------------------------------------
+// Function shuffleVector()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector1, typename TSimdVector2>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector1> >, TSimdVector1)
+shuffleVector(TSimdVector1 const & vector, TSimdVector2 const & indices)
+{
+    typedef typename Value<TSimdVector1>::Type TValue1;
+    typedef typename Value<TSimdVector2>::Type TValue2;
+    return _shuffleVector(
+                vector,
+                indices,
+                SimdParams_<sizeof(TSimdVector1), sizeof(TSimdVector1) / sizeof(TValue1)>(),
+                SimdParams_<sizeof(TSimdVector2), sizeof(TSimdVector2) / sizeof(TValue2)>());
+}
+
+} // namespace seqan
+
+#endif // SEQAN_INCLUDE_SEQAN_SIMD_SIMD_BASE_SEQAN_INTERFACE_H_
diff --git a/include/seqan/simd/simd_base_umesimd_impl.h b/include/seqan/simd/simd_base_umesimd_impl.h
new file mode 100644
index 0000000..da2e20c
--- /dev/null
+++ b/include/seqan/simd/simd_base_umesimd_impl.h
@@ -0,0 +1,655 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Marcel Ehrhardt <marcel.ehrhardt at fu-berlin.de>
+// ==========================================================================
+// SIMD implementation of umesimd
+// ==========================================================================
+
+#ifndef SEQAN_INCLUDE_SEQAN_SIMD_SIMD_BASE_UMESIMD_IMPL_H_
+#define SEQAN_INCLUDE_SEQAN_SIMD_SIMD_BASE_UMESIMD_IMPL_H_
+
+#include "umesimd/UMESimd.h"
+
+namespace seqan
+{
+
+template <typename TSimdVector>
+struct SimdMaskVectorImpl<TSimdVector, True>
+{
+    using Type = typename UME::SIMD::SIMDTraits<TSimdVector>::MASK_T;
+};
+
+template <typename TSimdVector>
+struct SimdSwizzleVectorImpl<TSimdVector, True>
+{
+    using Type = typename UME::SIMD::SIMDTraits<TSimdVector>::SWIZZLE_T;
+};
+
+template <typename TValue, int LENGTH>
+struct SimdVector
+{
+    typedef UME::SIMD::SIMDVec<TValue, LENGTH> Type;
+};
+
+// // 64 bit
+// using SimdVector8Char   = UME::SIMD::SIMDVec<char, 8>;
+using SimdVector8SChar  = UME::SIMD::SIMDVec<signed char, 8>;
+using SimdVector8UChar  = UME::SIMD::SIMDVec<unsigned char, 8>;
+using SimdVector4Short  = UME::SIMD::SIMDVec<short, 4>;
+using SimdVector4UShort = UME::SIMD::SIMDVec<unsigned short, 4>;
+using SimdVector2Int    = UME::SIMD::SIMDVec<int, 2>;
+using SimdVector2UInt   = UME::SIMD::SIMDVec<unsigned int, 2>;
+
+// 128 bit
+// using SimdVector16Char  = UME::SIMD::SIMDVec<char, 16>;
+using SimdVector16SChar = UME::SIMD::SIMDVec<signed char, 16>;
+using SimdVector16UChar = UME::SIMD::SIMDVec<unsigned char, 16>;
+using SimdVector8Short  = UME::SIMD::SIMDVec<short, 8>;
+using SimdVector8UShort = UME::SIMD::SIMDVec<unsigned short, 8>;
+using SimdVector4Int    = UME::SIMD::SIMDVec<int, 4>;
+using SimdVector4UInt   = UME::SIMD::SIMDVec<unsigned int, 4>;
+using SimdVector2Int64  = UME::SIMD::SIMDVec<int64_t, 2>;
+using SimdVector2UInt64 = UME::SIMD::SIMDVec<uint64_t, 2>;
+
+// 256 bit
+// using SimdVector32Char   = UME::SIMD::SIMDVec<char, 32>;
+using SimdVector32SChar  = UME::SIMD::SIMDVec<signed char, 32>;
+using SimdVector32UChar  = UME::SIMD::SIMDVec<unsigned char, 32>;
+using SimdVector16Short  = UME::SIMD::SIMDVec<short, 16>;
+using SimdVector16UShort = UME::SIMD::SIMDVec<unsigned short, 16>;
+using SimdVector8Int     = UME::SIMD::SIMDVec<int, 8>;
+using SimdVector8UInt    = UME::SIMD::SIMDVec<unsigned int, 8>;
+using SimdVector4Int64   = UME::SIMD::SIMDVec<int64_t, 4>;
+using SimdVector4UInt64  = UME::SIMD::SIMDVec<uint64_t, 4>;
+
+// 512 bit
+// using SimdVector64Char   = UME::SIMD::SIMDVec<char, 64>;
+using SimdVector64SChar  = UME::SIMD::SIMDVec<signed char, 64>;
+using SimdVector64UChar  = UME::SIMD::SIMDVec<unsigned char, 64>;
+using SimdVector32Short  = UME::SIMD::SIMDVec<short, 32>;
+using SimdVector32UShort = UME::SIMD::SIMDVec<unsigned short, 32>;
+using SimdVector16Int    = UME::SIMD::SIMDVec<int, 16>;
+using SimdVector16UInt   = UME::SIMD::SIMDVec<unsigned int, 16>;
+using SimdVector8Int64   = UME::SIMD::SIMDVec<int64_t, 8>;
+using SimdVector8UInt64  = UME::SIMD::SIMDVec<uint64_t, 8>;
+
+// ============================================================================
+// SIMDMaskVector
+// ============================================================================
+
+template <uint32_t LENGTH>
+SEQAN_CONCEPT_IMPL((typename UME::SIMD::SIMDVecMask<LENGTH>),       (SimdMaskVectorConcept));
+
+template <uint32_t LENGTH>
+SEQAN_CONCEPT_IMPL((typename UME::SIMD::SIMDVecMask<LENGTH> const), (SimdMaskVectorConcept));
+
+template <uint32_t LENGTH>
+struct Value<UME::SIMD::SIMDVecMask<LENGTH> >
+{
+    typedef bool Type;
+};
+
+template <uint32_t LENGTH_>
+struct LENGTH<UME::SIMD::SIMDVecMask<LENGTH_> >
+{
+    enum { VALUE = LENGTH_ };
+};
+
+template <uint32_t LENGTH, typename TPosition>
+inline typename Value<UME::SIMD::SIMDVecMask<LENGTH> >::Type
+getValue(UME::SIMD::SIMDVecMask<LENGTH> const & vector, TPosition const pos)
+{
+    return vector[pos];
+}
+
+template <uint32_t LENGTH, typename TPosition>
+inline typename Value<UME::SIMD::SIMDVecMask<LENGTH> >::Type
+value(UME::SIMD::SIMDVecMask<LENGTH> const & vector, TPosition const pos)
+{
+    return vector[pos];
+}
+
+template <uint32_t LENGTH, typename TPosition, typename TValue2>
+inline void
+assignValue(UME::SIMD::SIMDVecMask<LENGTH> &vector, TPosition const pos, TValue2 const value)
+{
+    vector.insert(pos, value);
+}
+
+// ============================================================================
+// SIMDSwizzle
+// ============================================================================
+
+template <uint32_t LENGTH>
+SEQAN_CONCEPT_IMPL((typename UME::SIMD::SIMDSwizzle<LENGTH>),       (SimdVectorConcept));
+
+template <uint32_t LENGTH>
+SEQAN_CONCEPT_IMPL((typename UME::SIMD::SIMDSwizzle<LENGTH> const), (SimdVectorConcept));
+
+template <uint32_t LENGTH>
+struct Value<UME::SIMD::SIMDSwizzle<LENGTH> >
+{
+    typedef uint32_t Type;
+};
+
+template <uint32_t LENGTH_>
+struct LENGTH<UME::SIMD::SIMDSwizzle<LENGTH_> >
+{
+    enum { VALUE = LENGTH_ };
+};
+
+template <uint32_t LENGTH, typename TPosition>
+inline typename Value<UME::SIMD::SIMDSwizzle<LENGTH> >::Type
+getValue(UME::SIMD::SIMDSwizzle<LENGTH> const & vector, TPosition const pos)
+{
+    return vector[pos];
+}
+
+template <uint32_t LENGTH, typename TPosition>
+inline typename Value<UME::SIMD::SIMDSwizzle<LENGTH> >::Type
+value(UME::SIMD::SIMDSwizzle<LENGTH> const & vector, TPosition const pos)
+{
+    return vector[pos];
+}
+
+template <uint32_t LENGTH, typename TPosition, typename TValue2>
+inline void
+assignValue(UME::SIMD::SIMDSwizzle<LENGTH> &vector, TPosition const pos, TValue2 const value)
+{
+    vector.insert(pos, value);
+}
+
+// ============================================================================
+// SIMDVec_u
+// ============================================================================
+
+template <typename TValue, uint32_t LENGTH>
+SEQAN_CONCEPT_IMPL((typename UME::SIMD::SIMDVec_u<TValue, LENGTH>),       (SimdVectorConcept));
+
+template <typename TValue, uint32_t LENGTH>
+SEQAN_CONCEPT_IMPL((typename UME::SIMD::SIMDVec_u<TValue, LENGTH> const), (SimdVectorConcept));
+
+template <typename TValue, uint32_t LENGTH>
+struct Value<UME::SIMD::SIMDVec_u<TValue, LENGTH> >
+{
+    typedef TValue Type;
+};
+
+template <typename TValue, uint32_t LENGTH_>
+struct LENGTH<UME::SIMD::SIMDVec_u<TValue, LENGTH_> > {
+    enum { VALUE = LENGTH_ };
+};
+
+template <typename TValue, uint32_t LENGTH, typename TPosition>
+inline TValue
+getValue(UME::SIMD::SIMDVec_u<TValue, LENGTH> const & vector, TPosition const pos)
+{
+    return vector[pos];
+}
+
+template <typename TValue, uint32_t LENGTH, typename TPosition>
+inline TValue
+value(UME::SIMD::SIMDVec_u<TValue, LENGTH> const & vector, TPosition const pos)
+{
+
+    return vector[pos];
+}
+
+template <typename TValue, uint32_t LENGTH, typename TPosition, typename TValue2>
+inline void
+assignValue(UME::SIMD::SIMDVec_u<TValue, LENGTH> &vector, TPosition const pos, TValue2 const value)
+{
+    vector[pos] = value;
+}
+
+// ============================================================================
+// SIMDVec_i
+// ============================================================================
+
+template <typename TValue, uint32_t LENGTH>
+SEQAN_CONCEPT_IMPL((typename UME::SIMD::SIMDVec_i<TValue, LENGTH>),       (SimdVectorConcept));
+
+template <typename TValue, uint32_t LENGTH>
+SEQAN_CONCEPT_IMPL((typename UME::SIMD::SIMDVec_i<TValue, LENGTH> const), (SimdVectorConcept));
+
+template <typename TValue, uint32_t LENGTH>
+struct Value<UME::SIMD::SIMDVec_i<TValue, LENGTH> >
+{
+    typedef TValue Type;
+};
+
+template <typename TValue, uint32_t LENGTH_>
+struct LENGTH<UME::SIMD::SIMDVec_i<TValue, LENGTH_> > {
+    enum { VALUE = LENGTH_ };
+};
+
+template <typename TValue, uint32_t LENGTH, typename TPosition>
+inline TValue
+getValue(UME::SIMD::SIMDVec_i<TValue, LENGTH> const & vector, TPosition const pos)
+{
+    return vector[pos];
+}
+
+template <typename TValue, uint32_t LENGTH, typename TPosition>
+inline TValue
+value(UME::SIMD::SIMDVec_i<TValue, LENGTH> const & vector, TPosition const pos)
+{
+
+    return vector[pos];
+}
+
+template <typename TValue, uint32_t LENGTH, typename TPosition, typename TValue2>
+inline void
+assignValue(UME::SIMD::SIMDVec_i<TValue, LENGTH> &vector, TPosition const pos, TValue2 const value)
+{
+    vector[pos] = value;
+}
+
+// ============================================================================
+// SIMDVec_f
+// ============================================================================
+
+template <typename TValue, uint32_t LENGTH>
+SEQAN_CONCEPT_IMPL((typename UME::SIMD::SIMDVec_f<TValue, LENGTH>),       (SimdVectorConcept));
+
+template <typename TValue, uint32_t LENGTH>
+SEQAN_CONCEPT_IMPL((typename UME::SIMD::SIMDVec_f<TValue, LENGTH> const), (SimdVectorConcept));
+
+template <typename TValue, uint32_t LENGTH>
+struct Value<UME::SIMD::SIMDVec_f<TValue, LENGTH> >
+{
+    typedef TValue Type;
+};
+
+template <typename TValue, uint32_t LENGTH_>
+struct LENGTH<UME::SIMD::SIMDVec_f<TValue, LENGTH_> > {
+    enum { VALUE = LENGTH_ };
+};
+
+template <typename TValue, uint32_t LENGTH, typename TPosition>
+inline TValue
+getValue(UME::SIMD::SIMDVec_f<TValue, LENGTH> const & vector, TPosition const pos)
+{
+    return vector[pos];
+}
+
+template <typename TValue, uint32_t LENGTH, typename TPosition>
+inline TValue
+value(UME::SIMD::SIMDVec_f<TValue, LENGTH> const & vector, TPosition const pos)
+{
+
+    return vector[pos];
+}
+
+template <typename TValue, uint32_t LENGTH, typename TPosition, typename TValue2>
+inline void
+assignValue(UME::SIMD::SIMDVec_f<TValue, LENGTH> &vector, TPosition const pos, TValue2 const value)
+{
+    vector[pos] = value;
+}
+
+} // namespace seqan
+
+namespace UME
+{
+namespace SIMD
+{
+    template <typename TStream,
+              typename TVector, typename TScalar>
+    inline TStream & operator<<(TStream & stream,
+               IntermediateIndex<TVector, TScalar> const & pInterIndex)
+    {
+        stream << static_cast<TScalar>(pInterIndex);
+        return stream;
+    }
+}
+}
+
+namespace seqan
+{
+
+// --------------------------------------------------------------------------
+// Function clearVector()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, void)
+clearVector(TSimdVector & vector)
+{
+    vector = 0;
+}
+
+// --------------------------------------------------------------------------
+// Function createVector()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector, typename TValue>
+inline SEQAN_FUNC_ENABLE_IF(And<Is<SimdMaskVectorConcept<TSimdVector>>,
+                                Not<Is<SimdVectorConcept<TSimdVector>>>>, TSimdVector)
+createVector(TValue const x)
+{
+    return TSimdVector(static_cast<bool>(x));
+}
+
+// --------------------------------------------------------------------------
+// Function createVector()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector, typename TValue>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+createVector(TValue const x)
+{
+    return TSimdVector(x);
+}
+
+// --------------------------------------------------------------------------
+// Function fillVector()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector, typename ...TValue>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, void)
+fillVector(TSimdVector & vector, TValue const... args)
+{
+    vector = TSimdVector(args...);
+}
+
+// --------------------------------------------------------------------------
+// Function cmpEq()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, typename SimdMaskVector<TSimdVector>::Type)
+cmpEq (TSimdVector const & a, TSimdVector const & b)
+{
+    return a.cmpeq(b);
+}
+
+// --------------------------------------------------------------------------
+// Function operator==()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, typename SimdMaskVector<TSimdVector>::Type)
+operator==(TSimdVector const & a, TSimdVector const & b)
+{
+    return a.cmpeq(b);
+}
+
+// --------------------------------------------------------------------------
+// Function operatorGt()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, typename SimdMaskVector<TSimdVector>::Type)
+cmpGt (TSimdVector const & a, TSimdVector const & b)
+{
+    return a.cmpgt(b);
+}
+
+// --------------------------------------------------------------------------
+// Function operator>()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, typename SimdMaskVector<TSimdVector>::Type)
+operator>(TSimdVector const & a, TSimdVector const & b)
+{
+    return a.cmpgt(b);
+}
+
+// --------------------------------------------------------------------------
+// Function max()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+max(TSimdVector const & a, TSimdVector const & b)
+{
+    return a.max(b);
+}
+
+// --------------------------------------------------------------------------
+// Function min()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+min(TSimdVector const & a, TSimdVector const & b)
+{
+    return a.min(b);
+}
+
+// --------------------------------------------------------------------------
+// Function operator|()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+operator|(TSimdVector const & a, TSimdVector const & b)
+{
+    return a.bor(b);
+}
+
+// --------------------------------------------------------------------------
+// Function operator|=()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector &)
+operator|=(TSimdVector & a, TSimdVector const & b)
+{
+    return a.bora(b);
+}
+
+// --------------------------------------------------------------------------
+// Function operator&()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+operator&(TSimdVector const & a, TSimdVector const & b)
+{
+    return a.band(b);
+}
+
+// --------------------------------------------------------------------------
+// Function operator&=()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector &)
+operator&=(TSimdVector & a, TSimdVector const & b)
+{
+    return a.banda(b);
+}
+
+// --------------------------------------------------------------------------
+// Function operator~()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+operator~(TSimdVector const & a)
+{
+    return a.bnot();
+}
+
+// --------------------------------------------------------------------------
+// Function operator+()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+operator+(TSimdVector const & a, TSimdVector const & b)
+{
+    return a.add(b);
+}
+
+// --------------------------------------------------------------------------
+// Function operator-()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+operator-(TSimdVector const & a, TSimdVector const & b)
+{
+    return a.sub(b);
+}
+
+// --------------------------------------------------------------------------
+// Function operator*()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+operator*(TSimdVector const & a, TSimdVector const & b)
+{
+    return a.mul(b);
+}
+
+// --------------------------------------------------------------------------
+// Function operator/()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+operator/(TSimdVector const & a, TSimdVector const & b)
+{
+    return a.div(b);
+}
+
+// --------------------------------------------------------------------------
+// Function andNot
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+andNot(TSimdVector const & a, TSimdVector const & b)
+{
+    return a.bandnot(b);
+}
+
+
+// --------------------------------------------------------------------------
+// Function shiftRightLogical()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+shiftRightLogical(TSimdVector const & vector, const int imm)
+{
+    return vector.rsh(imm);
+}
+
+// --------------------------------------------------------------------------
+// Function blend()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector, typename TSimdVectorMask>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+blend(TSimdVector const & a, TSimdVector const & b, TSimdVectorMask const & mask)
+{
+    return a.blend(mask, b);
+}
+
+// --------------------------------------------------------------------------
+// Function storeu()
+// --------------------------------------------------------------------------
+
+template <typename T, typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, void)
+storeu(T * memAddr, TSimdVector const & vec)
+{
+    vec.store(memAddr);
+}
+
+// --------------------------------------------------------------------------
+// Function load()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector, typename T>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+load(T const * memAddr)
+{
+    return TSimdVector(memAddr);
+}
+
+// --------------------------------------------------------------------------
+// Function gather()
+// --------------------------------------------------------------------------
+
+template <typename TValue, typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(IsSameType<TValue, typename Value<TSimdVector>::Type>, TSimdVector)
+_gather(TValue const * memAddr, TSimdVector const & idx)
+{
+    using TIndexVector = typename UME::SIMD::SIMDTraits<TSimdVector>::UINT_VEC_T;
+
+    TSimdVector a;
+    a.gather(memAddr, static_cast<TIndexVector>(idx));
+    return a;
+}
+
+template <typename TValue, typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Not<IsSameType<TValue, typename Value<TSimdVector>::Type> >, TSimdVector)
+_gather(TValue const * memAddr, TSimdVector const & idx)
+{
+    using TIndexVector = typename UME::SIMD::SIMDTraits<TSimdVector>::UINT_VEC_T;
+
+    TSimdVector a;
+    for (auto i = 0u; i < TIndexVector::length(); ++i)
+    {
+        a[i] = memAddr[idx[i]];
+    }
+    return a;
+}
+
+template <typename TValue, typename TSimdVector>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector> >, TSimdVector)
+gather(TValue const * memAddr, TSimdVector const & idx)
+{
+    return _gather(memAddr, idx);
+}
+
+// --------------------------------------------------------------------------
+// Function shuffleVector()
+// --------------------------------------------------------------------------
+
+template <typename TSimdVector1, typename TSimdVector2>
+inline SEQAN_FUNC_ENABLE_IF(Is<SimdVectorConcept<TSimdVector1> >, TSimdVector1)
+shuffleVector(TSimdVector1 const & vector, TSimdVector2 const & indices)
+{
+    return vector.swizzle(indices);
+}
+
+}
+
+#endif // SEQAN_INCLUDE_SEQAN_SIMD_SIMD_BASE_UMESIMD_IMPL_H_
diff --git a/include/seqan/simple_intervals_io.h b/include/seqan/simple_intervals_io.h
index c01a6af..63f74e8 100644
--- a/include/seqan/simple_intervals_io.h
+++ b/include/seqan/simple_intervals_io.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/simple_intervals_io/simple_intervals_file.h b/include/seqan/simple_intervals_io/simple_intervals_file.h
index 4f696f7..f03df0e 100644
--- a/include/seqan/simple_intervals_io/simple_intervals_file.h
+++ b/include/seqan/simple_intervals_io/simple_intervals_file.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/simple_intervals_io/simple_intervals_io.h b/include/seqan/simple_intervals_io/simple_intervals_io.h
index cfb0aae..6563b88 100644
--- a/include/seqan/simple_intervals_io/simple_intervals_io.h
+++ b/include/seqan/simple_intervals_io/simple_intervals_io.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/statistics.h b/include/seqan/statistics.h
index ba505a5..bc28490 100644
--- a/include/seqan/statistics.h
+++ b/include/seqan/statistics.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/statistics/statistics_base.h b/include/seqan/statistics/statistics_base.h
index c9deb12..59f0791 100644
--- a/include/seqan/statistics/statistics_base.h
+++ b/include/seqan/statistics/statistics_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/statistics/statistics_markov_model.h b/include/seqan/statistics/statistics_markov_model.h
index d77948d..4ba0958 100644
--- a/include/seqan/statistics/statistics_markov_model.h
+++ b/include/seqan/statistics/statistics_markov_model.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -643,7 +643,7 @@ String<TValue> _ludcmp(Matrix<TValue,2> &result)
     double const TINY = 1.0e-20;
     int n = length(result,0);
     int i, imax, j, k,d;
-    imax = MinValue<int>::VALUE;
+    imax = std::numeric_limits<int>::min();
     double big,dum,sum,temp;
     String<TValue> vv;
     resize(vv, n, 1.0);
diff --git a/include/seqan/store.h b/include/seqan/store.h
index 6b30a82..ccbb2ee 100644
--- a/include/seqan/store.h
+++ b/include/seqan/store.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/store/store_align.h b/include/seqan/store/store_align.h
index f6fa531..0b8fd90 100644
--- a/include/seqan/store/store_align.h
+++ b/include/seqan/store/store_align.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -196,7 +196,7 @@ TStream & operator<<(TStream & stream, AlignedReadStoreElement<TPos, TGapAnchor,
 
 template <typename TPos, typename TGapAnchor, typename TSpec>
 const typename Id<AlignedReadStoreElement<TPos, TGapAnchor, TSpec> >::Type
-AlignedReadStoreElement<TPos, TGapAnchor, TSpec>::INVALID_ID = MaxValue<typename Id<AlignedReadStoreElement<TPos, TGapAnchor, TSpec> >::Type>::VALUE;
+AlignedReadStoreElement<TPos, TGapAnchor, TSpec>::INVALID_ID = std::numeric_limits<typename Id<AlignedReadStoreElement<TPos, TGapAnchor, TSpec> >::Type>::max();
 
 //////////////////////////////////////////////////////////////////////////////
 
@@ -240,7 +240,7 @@ struct AlignQualityStoreElement
     AlignQualityStoreElement():
         pairScore(0),
         score(0),
-        errors(MaxValue<unsigned char>::VALUE) {}
+        errors(std::numeric_limits<unsigned char>::max()) {}
 
     AlignQualityStoreElement(TScore _pairScore, TScore _score, unsigned char _errors):
         pairScore(_pairScore),
diff --git a/include/seqan/store/store_align_intervals.h b/include/seqan/store/store_align_intervals.h
index fdcb9f0..60b52f9 100644
--- a/include/seqan/store/store_align_intervals.h
+++ b/include/seqan/store/store_align_intervals.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/store/store_all.h b/include/seqan/store/store_all.h
index 51b02dd..301cad4 100644
--- a/include/seqan/store/store_all.h
+++ b/include/seqan/store/store_all.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -520,15 +520,15 @@ public:
         annotationKeyStoreCache(annotationKeyStore)
     {
         // ATTENTION: The order of these keywords must correspond to the order of the enums above.
-        appendName(annotationTypeStore, "<root>", annotationTypeStoreCache);
-        appendName(annotationTypeStore, "<deleted>", annotationTypeStoreCache);
-        appendName(annotationTypeStore, "gene", annotationTypeStoreCache);
-        appendName(annotationTypeStore, "mRNA", annotationTypeStoreCache);
-        appendName(annotationTypeStore, "CDS", annotationTypeStoreCache);
-        appendName(annotationTypeStore, "exon", annotationTypeStoreCache);
-        appendName(annotationTypeStore, "five_prime_UTR", annotationTypeStoreCache);
-        appendName(annotationTypeStore, "intron", annotationTypeStoreCache);
-        appendName(annotationTypeStore, "three_prime_UTR", annotationTypeStoreCache);
+        appendName(annotationTypeStoreCache, "<root>");
+        appendName(annotationTypeStoreCache, "<deleted>");
+        appendName(annotationTypeStoreCache, "gene");
+        appendName(annotationTypeStoreCache, "mRNA");
+        appendName(annotationTypeStoreCache, "CDS");
+        appendName(annotationTypeStoreCache, "exon");
+        appendName(annotationTypeStoreCache, "five_prime_UTR");
+        appendName(annotationTypeStoreCache, "intron");
+        appendName(annotationTypeStoreCache, "three_prime_UTR");
         _storeClearAnnotations(*this);
     }
 
@@ -717,7 +717,7 @@ _storeAppendRead (
     typedef typename Value<typename TFragmentStore::TMatePairStore>::Type TMatePairElement;
 
     // search for readId by name (could be me or my mate)
-    bool found = getIdByName(fragStore.readNameStore, qname, readId, fragStore.readNameStoreCache);
+    bool found = getIdByName(readId, fragStore.readNameStoreCache, qname);
 
     // if naming scheme is xx/1, xx/2 or xx/L, xx/R try to look up my mate
     if (!found && (flag & 1) == 1 && length(qname) >= 2 && qname[length(qname) - 2] == '/')
@@ -735,7 +735,7 @@ _storeAppendRead (
             mate = qname;
             back(mate) = (tag == 'L')? 'R': 'L';
         }
-        found = getIdByName(fragStore.readNameStore, mate, readId, fragStore.readNameStoreCache);
+        found = getIdByName(readId, fragStore.readNameStoreCache, mate);
     }
 
     if (found)
@@ -758,7 +758,7 @@ _storeAppendRead (
                     // set sequence and mate pair ID in new read store element
                     readId = appendRead(fragStore, readSeq, matePairId);
                     // add the identifier to the read name store
-                    appendName(fragStore.readNameStore, qname, fragStore.readNameStoreCache);
+                    appendName(fragStore.readNameStoreCache, qname);
                     // set the ID in the mate pair store
                     fragStore.matePairStore[matePairId].readId[inPair] = readId;
                     return true;
@@ -790,7 +790,7 @@ _storeAppendRead (
     else
         appendRead(fragStore, readSeq);
 
-    appendName(fragStore.readNameStore, qname, fragStore.readNameStoreCache);
+    appendName(fragStore.readNameStoreCache, qname);
     return true;
 }
 
@@ -810,13 +810,13 @@ _storeAppendContig (
     typedef FragmentStore<TSpec, TConfig> TFragmentStore;
     typedef typename Value<typename TFragmentStore::TContigStore>::Type TContigElement;
 
-    if (!getIdByName(fragStore.contigNameStore, rName, contigId, fragStore.contigNameStoreCache))
+    if (!getIdByName(contigId, fragStore.contigNameStoreCache, rName))
     {
         // if the contig is not in the store yet
         // set the ID on the last entry after appending
         contigId = length(fragStore.contigStore);
         // append contig store
-        appendName(fragStore.contigNameStore, rName, fragStore.contigNameStoreCache);
+        appendName(fragStore.contigNameStoreCache, rName);
         appendValue(fragStore.contigStore, TContigElement());
 //        std::cout << "added contig:" << rName << std::endl;
     }
@@ -837,12 +837,12 @@ _storeAppendAnnotationName (
     TTypeId typeId)
 {
     SEQAN_ASSERT_EQ(length(fragStore.annotationStore), length(fragStore.annotationNameStore));
-    if (!empty(annotationName) && getIdByName(fragStore.annotationNameStore, annotationName, annotationId, fragStore.annotationNameStoreCache))
+    if (!empty(annotationName) && getIdByName(annotationId, fragStore.annotationNameStoreCache, annotationName))
     {
         do
         {
             // allow different annotations to have the same name (but different typeId)
-            if (typeId == maxValue<TTypeId>() || fragStore.annotationStore[annotationId].typeId == typeId)
+            if (typeId == std::numeric_limits<TTypeId>::max() || fragStore.annotationStore[annotationId].typeId == typeId)
                 return;
             ++annotationId;
         } while (annotationId < length(fragStore.annotationNameStore) && fragStore.annotationNameStore[annotationId] == annotationName);
@@ -851,7 +851,7 @@ _storeAppendAnnotationName (
     // set the ID on the last entry after appending
     annotationId = length(fragStore.annotationNameStore);
     // append to annotationName store
-    appendName(fragStore.annotationNameStore, annotationName, fragStore.annotationNameStoreCache);
+    appendName(fragStore.annotationNameStoreCache, annotationName);
     // we also need to append an annotation to store the typeId in case of duplicate annotation names
     resize(fragStore.annotationStore, length(fragStore.annotationStore) + 1);
     back(fragStore.annotationStore).typeId = typeId;
@@ -864,7 +864,7 @@ _storeAppendAnnotationName (
     TId & annotationId,
     TName & annotationName)
 {
-    _storeAppendAnnotationName(fragStore, annotationId, annotationName, maxValue<TId>());
+    _storeAppendAnnotationName(fragStore, annotationId, annotationName, std::numeric_limits<TId>::max());
 }
 
 template <typename TSpec, typename TConfig, typename TId, typename TName>
@@ -874,14 +874,14 @@ _storeAppendType (
     TId & typeId,
     TName & annotationType)
 {
-    if (!getIdByName(fragStore.annotationTypeStore, annotationType, typeId, fragStore.annotationTypeStoreCache))
+    if (!getIdByName(typeId, fragStore.annotationTypeStoreCache, annotationType))
     {
         // if the annotation type name is not in the store yet
         // set the ID on the last entry after appending
         typeId = length(fragStore.annotationTypeStore);
         // append to annotationType store
         if (!empty(annotationType))
-            appendName(fragStore.annotationTypeStore, annotationType, fragStore.annotationTypeStoreCache);
+            appendName(fragStore.annotationTypeStoreCache, annotationType);
 //        std::cout << "added type:" << annotationType << std::endl;
     }
 }
@@ -893,14 +893,14 @@ _storeAppendKey (
     TId & keyId,
     TName & annotationKey)
 {
-    if (!getIdByName(fragStore.annotationKeyStore, annotationKey, keyId, fragStore.annotationKeyStoreCache))
+    if (!getIdByName(keyId, fragStore.annotationKeyStoreCache, annotationKey))
     {
         // if the key name is not in the store yet
         // set the ID on the last entry after appending
         keyId = length(fragStore.annotationKeyStore);
         // append to annotationKey store
         if (!empty(annotationKey))
-            appendName(fragStore.annotationKeyStore, annotationKey, fragStore.annotationKeyStoreCache);
+            appendName(fragStore.annotationKeyStoreCache, annotationKey);
 //        std::cout << "added key:" << annotationKey << std::endl;
     }
 }
@@ -937,7 +937,7 @@ annotationGetValueByKey (
     typedef typename Size<TValues>::Type    TKeyId;
 
     TKeyId keyId = 0;
-    if (!getIdByName(fragStore.annotationKeyStore, key, keyId, fragStore.annotationKeyStoreCache))
+    if (!getIdByName(keyId, fragStore.annotationKeyStoreCache, key))
         return false;
 
     if (keyId >= length(annotation.values))
@@ -963,7 +963,7 @@ annotationGetValueIdByKey (
     static const typename Value<typename TAnnotation::TValues const>::Type emptyString;
 
     TKeyId keyId = 0;
-    if (getIdByName(fragStore.annotationKeyStore, key, keyId, fragStore.annotationKeyStoreCache))
+    if (getIdByName(keyId, fragStore.annotationKeyStoreCache, key))
         if (keyId < length(annotation.values) && !empty(annotation.values[keyId]))
             return keyId;
     return TAnnotation::INVALID_ID;
@@ -1888,13 +1888,13 @@ void convertMatchesToGlobalAlignment(FragmentStore<TSpec, TConfig> &store, TScor
         assignSource(row(align, 1), readSeq);
 //        int ud = store.alignQualityStore[it->id].errors;
 //        int ld = -ud;
-//        if (IsSameType<TShrinkMatches, True>::VALUE)
+//        SEQAN_IF_CONSTEXPR (IsSameType<TShrinkMatches, True>::VALUE)
 //            globalAlignment(align, score, AlignConfig<true, false, false, true>(), ld, ud, Gotoh());
 //        else
 //            globalAlignment(align, score, ld, ud);
 
         int qualValue = 0;
-        if (IsSameType<TShrinkMatches, True>::VALUE)
+        SEQAN_IF_CONSTEXPR (IsSameType<TShrinkMatches, True>::VALUE)
             qualValue = globalAlignment(align, score, AlignConfig<true, false, false, true>(), Gotoh());
         else
             qualValue = globalAlignment(align, score);
diff --git a/include/seqan/store/store_annotation.h b/include/seqan/store/store_annotation.h
index 85b6946..04b7441 100644
--- a/include/seqan/store/store_annotation.h
+++ b/include/seqan/store/store_annotation.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -164,11 +164,11 @@ struct AnnotationStoreElement
 
 template <typename TPos, typename TSpec>
 const typename Id<AnnotationStoreElement<TPos, TSpec> >::Type
-AnnotationStoreElement<TPos, TSpec>::INVALID_ID = MaxValue<typename Id<AnnotationStoreElement<TPos, TSpec> >::Type>::VALUE;
+AnnotationStoreElement<TPos, TSpec>::INVALID_ID = std::numeric_limits<typename Id<AnnotationStoreElement<TPos, TSpec> >::Type>::max();
 
 template <typename TPos, typename TSpec>
 const TPos
-AnnotationStoreElement<TPos, TSpec>::INVALID_POS = MaxValue<TPos>::VALUE;
+AnnotationStoreElement<TPos, TSpec>::INVALID_POS = std::numeric_limits<TPos>::max();
 
 //////////////////////////////////////////////////////////////////////////////
 
diff --git a/include/seqan/store/store_base.h b/include/seqan/store/store_base.h
index b6d5342..3071dd3 100644
--- a/include/seqan/store/store_base.h
+++ b/include/seqan/store/store_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/store/store_contig.h b/include/seqan/store/store_contig.h
index a5b59e8..d9b489e 100644
--- a/include/seqan/store/store_contig.h
+++ b/include/seqan/store/store_contig.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -155,7 +155,7 @@ struct ContigStoreElement
 
 template <typename TContigSeq_, typename TGapAnchor_, typename TSpec_>
 const typename Id<ContigStoreElement<TContigSeq_, TGapAnchor_, TSpec_> >::Type
-ContigStoreElement<TContigSeq_, TGapAnchor_, TSpec_>::INVALID_ID = MaxValue<typename Id<ContigStoreElement<TContigSeq_, TGapAnchor_, TSpec_> >::Type>::VALUE;
+ContigStoreElement<TContigSeq_, TGapAnchor_, TSpec_>::INVALID_ID = std::numeric_limits<typename Id<ContigStoreElement<TContigSeq_, TGapAnchor_, TSpec_> >::Type>::max();
 
 //////////////////////////////////////////////////////////////////////////////
 
@@ -192,13 +192,11 @@ struct ContigFile
     static const TId INVALID_ID;
 
     CharString        fileName;
-    AutoSeqFormat    format;
     TId                firstContigId;    // first sequence of the file corresponds to this contigId
 
     inline bool operator==(ContigFile const & other) const
     {
         return fileName == other.fileName &&
-                format == other.format &&
                 firstContigId == other.firstContigId;
     }
 };
@@ -207,7 +205,7 @@ struct ContigFile
 
 template <typename TSpec_>
 const typename Id<ContigFile<TSpec_> >::Type
-ContigFile<TSpec_>::INVALID_ID = MaxValue<typename Id<ContigFile<TSpec_> >::Type>::VALUE;
+ContigFile<TSpec_>::INVALID_ID = std::numeric_limits<typename Id<ContigFile<TSpec_> >::Type>::max();
 
 //////////////////////////////////////////////////////////////////////////////
 
diff --git a/include/seqan/store/store_intervaltree.h b/include/seqan/store/store_intervaltree.h
index 8c66598..eca6e8e 100644
--- a/include/seqan/store/store_intervaltree.h
+++ b/include/seqan/store/store_intervaltree.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/store/store_io.h b/include/seqan/store/store_io.h
index 613ff1d..e0f50b5 100644
--- a/include/seqan/store/store_io.h
+++ b/include/seqan/store/store_io.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/store/store_io_gff.h b/include/seqan/store/store_io_gff.h
index b954eaa..57c0169 100644
--- a/include/seqan/store/store_io_gff.h
+++ b/include/seqan/store/store_io_gff.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/store/store_io_sam.h b/include/seqan/store/store_io_sam.h
index af153d3..b563c5d 100644
--- a/include/seqan/store/store_io_sam.h
+++ b/include/seqan/store/store_io_sam.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -416,7 +416,7 @@ _readAlignments(
 
     // sync sizes of alignQualityStore and alignedReadTagStore with alignedReadStore
     TAlignQuality q;
-    q.score = maxValue(q.score);
+    q.score = std::numeric_limits<decltype(q.score)>::max();
     resize(fragStore.alignQualityStore, length(fragStore.alignedReadStore), q);
     resize(fragStore.alignedReadTagStore, length(fragStore.alignedReadStore));
 
@@ -893,19 +893,19 @@ setPrimaryMatch(BamAlignmentRecord & record,
         record.mapQ = 255;
 
 //    // Fill CIGAR using aligned read.
-//    if (!IsSameType<TAlignFunctor, Nothing>::VALUE)
+//    SEQAN_IF_CONSTEXPR (!IsSameType<TAlignFunctor, Nothing>::VALUE)
 //        getCigarString(record.cigar, row(align, 0), row(align, 1));
 
     // Retrieve number of errors from quality store.
     int errors = -1;
-    if (alignQuality.errors != MaxValue<unsigned char>::VALUE)
+    if (alignQuality.errors != std::numeric_limits<unsigned char>::max())
         errors = alignQuality.errors;
 
     // Use record.qual as a temporary for the md string.
     alignAndGetCigarString(record.cigar, record.qual, store.contigStore[alignedRead.contigId],
             store.readSeqStore[alignedRead.readId], alignedRead, errors, functor);
 
-    if (alignQuality.errors != MaxValue<unsigned char>::VALUE)
+    if (alignQuality.errors != std::numeric_limits<unsigned char>::max())
     {
 //        if (errors > (int)alignQuality.errors)
 //            std::cerr << "WARNING: More errors in the alignment (" << errors << ") than given in NM tag / alignQuality ("
diff --git a/include/seqan/store/store_io_ucsc.h b/include/seqan/store/store_io_ucsc.h
index 43794e8..0cc84fa 100644
--- a/include/seqan/store/store_io_ucsc.h
+++ b/include/seqan/store/store_io_ucsc.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -58,7 +58,7 @@ _storeAnnotationRecord(
     TId transId = TAnnotation::INVALID_ID;
     _storeAppendAnnotationName(fragStore, transId, record.transName, (TId) TFragmentStore::ANNO_MRNA);
     TId cdsId = length(fragStore.annotationStore);
-    appendName(fragStore.annotationNameStore, record.proteinName, fragStore.annotationNameStoreCache);
+    appendName(fragStore.annotationNameStoreCache, record.proteinName);
 
     resize(fragStore.annotationStore, cdsId + 1 + length(record.exonBegin), Generous());
     resize(fragStore.annotationNameStore, cdsId + 1 + length(record.exonBegin), Generous());
diff --git a/include/seqan/store/store_library.h b/include/seqan/store/store_library.h
index f3cc6a0..5f0f34d 100644
--- a/include/seqan/store/store_library.h
+++ b/include/seqan/store/store_library.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/store/store_matepair.h b/include/seqan/store/store_matepair.h
index 9a4318c..7c70f8a 100644
--- a/include/seqan/store/store_matepair.h
+++ b/include/seqan/store/store_matepair.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -115,7 +115,7 @@ struct MatePairStoreElement
 
 template <typename TSpec>
 const typename Id<MatePairStoreElement<TSpec> >::Type
-MatePairStoreElement<TSpec>::INVALID_ID = MaxValue<typename Id<MatePairStoreElement<TSpec> >::Type>::VALUE;
+MatePairStoreElement<TSpec>::INVALID_ID = std::numeric_limits<typename Id<MatePairStoreElement<TSpec> >::Type>::max();
 
 //////////////////////////////////////////////////////////////////////////////
 
diff --git a/include/seqan/store/store_read.h b/include/seqan/store/store_read.h
index 607f13e..a49dcec 100644
--- a/include/seqan/store/store_read.h
+++ b/include/seqan/store/store_read.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -92,7 +92,7 @@ struct ReadStoreElement
 
 template <typename TSpec>
 const typename Id<ReadStoreElement<TSpec> >::Type
-ReadStoreElement<TSpec>::INVALID_ID = MaxValue<typename Id<ReadStoreElement<TSpec> >::Type>::VALUE;
+ReadStoreElement<TSpec>::INVALID_ID = std::numeric_limits<typename Id<ReadStoreElement<TSpec> >::Type>::max();
 
 //////////////////////////////////////////////////////////////////////////////
 
diff --git a/include/seqan/stream.h b/include/seqan/stream.h
index ae0d6da..f2727e9 100644
--- a/include/seqan/stream.h
+++ b/include/seqan/stream.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -89,6 +89,12 @@
 #include <seqan/stream/stream_compressor.h>
 #include <seqan/stream/buffered_stream.h>
 
+#if SEQAN_HAS_BZIP2 && !SEQAN_HAS_ZLIB
+#error "-DSEQAN_HAS_BZIP2 is defined, but -DSEQAN_HAS_ZLIB not. \
+Since BZip2 depends on ZLIB, this would cause hard-to-track compiler errors. \
+Either disable -DSEQAN_HAS_BZIP2 or define -DSEQAN_HAS_ZLIB"
+#endif
+
 #if SEQAN_HAS_ZLIB
 #include <zlib.h>
 #include <seqan/stream/iostream_zutil.h>
diff --git a/include/seqan/stream/adapt_ios.h b/include/seqan/stream/adapt_ios.h
index a1da823..128dc71 100644
--- a/include/seqan/stream/adapt_ios.h
+++ b/include/seqan/stream/adapt_ios.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/stream/buffered_stream.h b/include/seqan/stream/buffered_stream.h
index 6fd8a91..f75a9b1 100644
--- a/include/seqan/stream/buffered_stream.h
+++ b/include/seqan/stream/buffered_stream.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/stream/file_stream.h b/include/seqan/stream/file_stream.h
index 1cd43f7..70c3aa0 100644
--- a/include/seqan/stream/file_stream.h
+++ b/include/seqan/stream/file_stream.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -178,7 +178,7 @@ clear(FilePage<TValue, TSpec> & me)
 // Class FilePager
 // ----------------------------------------------------------------------------
 
-template <unsigned SEQAN_PAGESIZE = 4 * 1024>
+template <unsigned SEQAN_PAGESIZE = SEQAN_DEFAULT_PAGESIZE>
 struct FixedPagingScheme
 {
     enum { pageSize = SEQAN_PAGESIZE };
@@ -365,7 +365,7 @@ _readFilePage(FilePageTable<TValue, TDirection, TSpec> &, FileMapping<TFileSpec>
     // how to handle pages crossing/beyond the end of file
     if (endOfs > length(file))
     {
-        if (!IsSameType<TDirection, Input>::VALUE)
+        SEQAN_IF_CONSTEXPR (!IsSameType<TDirection, Input>::VALUE)
         {
             // increase file size to next page boundary and map the whole page
             resize(file, endOfs);
@@ -423,7 +423,7 @@ _writeFilePage(FilePageTable<TValue, TDirection, TSpec> & pager, File<TFileSpec>
     typedef typename Size<File<TFileSpec> >::Type TSize;
 
     // only write in write-mode
-    if (IsSameType<TDirection, Input>::VALUE)
+    SEQAN_IF_CONSTEXPR (IsSameType<TDirection, Input>::VALUE)
     {
         page.state = UNUSED;
         return true;    // true = writing completed
@@ -433,7 +433,7 @@ _writeFilePage(FilePageTable<TValue, TDirection, TSpec> & pager, File<TFileSpec>
     page.state = WRITING;
     bool success = asyncWriteAt(file, begin(page.raw, Standard()), length(page.raw), page.filePos, page.request);
 
-    if (!IsSameType<TDirection, Input>::VALUE)
+    SEQAN_IF_CONSTEXPR (!IsSameType<TDirection, Input>::VALUE)
         pager.fileSize = std::max(pager.fileSize, (TSize)page.filePos + (TSize)length(page.raw));
 
     // if an error occurred, throw an I/O exception
@@ -452,7 +452,7 @@ _writeFilePage(FilePageTable<TValue, TDirection, TSpec> & pager, FileMapping<TFi
     page.state = UNUSED;
     unmapFileSegment(file, begin(page.raw, Standard()), capacity(page.raw));
 
-    if (!IsSameType<TDirection, Input>::VALUE)
+    SEQAN_IF_CONSTEXPR (!IsSameType<TDirection, Input>::VALUE)
         pager.fileSize = std::max(pager.fileSize, (TSize)page.filePos + (TSize)length(page.raw));
 
     clear(page.raw);
diff --git a/include/seqan/stream/formatted_file.h b/include/seqan/stream/formatted_file.h
index 5421aad..55e4cf4 100644
--- a/include/seqan/stream/formatted_file.h
+++ b/include/seqan/stream/formatted_file.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -365,6 +365,30 @@ struct FormattedFile
 // ============================================================================
 
 // ----------------------------------------------------------------------------
+// Metafunction IsInputFile
+// ----------------------------------------------------------------------------
+
+template <typename T>
+struct IsInputFile : False
+{};
+
+template <typename TFormat, typename TSpec>
+struct IsInputFile<FormattedFile<TFormat, Input, TSpec> > : True
+{};
+
+// ----------------------------------------------------------------------------
+// Metafunction IsOutputFile
+// ----------------------------------------------------------------------------
+
+template <typename T>
+struct IsOutputFile : False
+{};
+
+template <typename TFormat, typename TSpec>
+struct IsOutputFile<FormattedFile<TFormat, Output, TSpec> > : True
+{};
+
+// ----------------------------------------------------------------------------
 // Metafunction DirectionIterator
 // ----------------------------------------------------------------------------
 
diff --git a/include/seqan/stream/guess_format.h b/include/seqan/stream/guess_format.h
index 577d46c..c23358a 100644
--- a/include/seqan/stream/guess_format.h
+++ b/include/seqan/stream/guess_format.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/stream/iostream_bgzf.h b/include/seqan/stream/iostream_bgzf.h
index 4a7347e..7e554a1 100644
--- a/include/seqan/stream/iostream_bgzf.h
+++ b/include/seqan/stream/iostream_bgzf.h
@@ -20,6 +20,10 @@
 #ifndef INCLUDE_SEQAN_STREAM_IOSTREAM_BGZF_H_
 #define INCLUDE_SEQAN_STREAM_IOSTREAM_BGZF_H_
 
+#ifndef SEQAN_BGZF_NUM_THREADS
+#define SEQAN_BGZF_NUM_THREADS 16
+#endif
+
 namespace seqan {
 
 const unsigned BGZF_MAX_BLOCK_SIZE = 64 * 1024;
@@ -146,7 +150,7 @@ public:
     std::vector<TFuture>         threads;
 
     basic_bgzf_streambuf(ostream_reference ostream_,
-                         size_t numThreads = 16,
+                         size_t numThreads = SEQAN_BGZF_NUM_THREADS,
                          size_t jobsPerThread = 8) :
         numThreads(numThreads),
         numJobs(numThreads * jobsPerThread),
@@ -335,6 +339,7 @@ public:
         std::mutex              cs;
         std::condition_variable readyEvent;
         bool                    ready;
+        bool                    bgzfEofMarker;
 
         DecompressionJob() :
             inputBuffer(BGZF_MAX_BLOCK_SIZE, 0),
@@ -343,7 +348,8 @@ public:
             size(0),
             cs(),
             readyEvent(),
-            ready(true)
+            ready(true),
+            bgzfEofMarker(false)
         {}
 
         // TODO(rrahn): Do we need a copy constructor for the decompression job.
@@ -354,7 +360,8 @@ public:
             size(other.size),
             cs(),
             readyEvent(),
-            ready(other.ready)
+            ready(other.ready),
+            bgzfEofMarker(other.bgzfEofMarker)
         {}
     };
 
@@ -399,6 +406,7 @@ public:
                 {
                     std::lock_guard<std::mutex> scopedLock(streamBuf->serializer.lock);
 
+                    job.bgzfEofMarker = false;
                     if (streamBuf->serializer.error != NULL)
                         return;
 
@@ -440,6 +448,14 @@ public:
                             (char*)&job.inputBuffer[0] + BGZF_BLOCK_HEADER_LENGTH,
                             tailLen);
 
+                        // Check if end-of-file marker is set
+                        if (memcmp(reinterpret_cast<uint8_t const *>(&job.inputBuffer[0]),
+                                   reinterpret_cast<uint8_t const *>(&BGZF_END_OF_FILE_MARKER[0]),
+                                   28) == 0)
+                        {
+                            job.bgzfEofMarker = true;
+                        }
+
                         if (!streamBuf->serializer.istream.good())
                         {
                             streamBuf->serializer.fileOfs = -1;
@@ -494,7 +510,7 @@ public:
     TBuffer              putbackBuffer;
 
     basic_unbgzf_streambuf(istream_reference istream_,
-                           size_t numThreads = 16,
+                           size_t numThreads = SEQAN_BGZF_NUM_THREADS,
                            size_t jobsPerThread = 8) :
         serializer(istream_),
         numThreads(numThreads),
@@ -585,10 +601,15 @@ public:
                   &job.buffer[0] + MAX_PUTBACK,                 // read position
                   &job.buffer[0] + (MAX_PUTBACK + size));       // end of buffer
 
-            if (job.size == -1)
+            // The end of the bgzf file is reached, either if there was an error, or if the
+            // end-of-file marker was reached, while the uncompressed block had zero size.
+            if (job.size == -1 || (job.size == 0 && job.bgzfEofMarker))
                 return EOF;
             else if (job.size > 0)
                 return Tr::to_int_type(*this->gptr());      // return next character
+
+            throw IOError("BGZF: Invalid end condition in decompression. "
+                          "Most likely due to an empty bgzf block without end-of-file marker.");
         }
     }
 
diff --git a/include/seqan/stream/iter_stream.h b/include/seqan/stream/iter_stream.h
index 6e1e9d7..867f2fc 100644
--- a/include/seqan/stream/iter_stream.h
+++ b/include/seqan/stream/iter_stream.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -61,7 +61,7 @@ struct StreamIterator {};
 /*!
  * @class StreamBuffer
  * @headerfile <seqan/stream.h>
- * @brief Buffer to use in stream.
+ * @brief Reinterprets the std::basic_streambuf to grant access to protected member functions.
  *
  * @signature template <typename TValue[, typenam TTraits]>
  *            class StreamBuffer : public std::basic_streambuf<TValue, TTraits>;
@@ -69,65 +69,92 @@ struct StreamIterator {};
  * @tparam TValue  The value type of the stream buffer.
  * @tparam TTraits The traits to use, defaults to <tt>std::char_traits<TValue></tt>.
  */
-
 // TODO(holtgrew): Add documentation for member functions.
 
-// Unfortunately some of the most useful members of basic_streambuf are
-// protected, so we define a subclass to cast and access them
-template <typename TValue, typename TTraits_ = std::char_traits<TValue> >
-class StreamBuffer : public std::basic_streambuf<TValue, TTraits_>
+ // Unfortunately some of the most useful members of basic_streambuf are
+ // protected, so we define a subclass to cast and access them
+template <typename TValue, typename TTraits_ = std::char_traits<TValue>>
+struct StreamBuffer : public std::basic_streambuf<TValue, TTraits_>
+{
+    using TTraits      = TTraits_;
+    using TBasicStream = std::basic_streambuf<TValue, TTraits_>;
+
+    using TBasicStream::eback;
+    using TBasicStream::gptr;
+    using TBasicStream::egptr;
+    using TBasicStream::gbump;
+    using TBasicStream::underflow;
+
+    using TBasicStream::pbase;
+    using TBasicStream::pptr;
+    using TBasicStream::epptr;
+    using TBasicStream::pbump;
+    using TBasicStream::overflow;
+};
+
+// NOTE(rrahn): This is a wrapper for the StreamBuffer class.
+// Since we usually work with std::basic_iostreams and their derivatives, we cannot simply cast a pointer to
+// std::basic_filebuf to StreamBuffer to expose it's protected member functions.
+// To do so, we only use the StreamBuffer to inherit from basic_streambuf (the base class of all buffer implementations.)
+// and only expose the protected member functions as public functions. We then store the original basic_streambuf
+// in this wrapper class and whenever access to the protected members is required we use a reinterpret_cast to convert
+// basic_streambuf* into the public StreamBuffer*. The reinterpret_cast has zero overhead.
+// This fixes an undetected error reported w/ the sanitizer option of gcc (https://github.com/seqan/seqan/issues/2104).
+template <typename TValue, typename TTraits_ = std::char_traits<TValue>>
+class StreamBufferWrapper
 {
 public:
-    typedef TTraits_ TTraits;
-    typedef std::basic_streambuf<TValue, TTraits_> TBase;
 
-    using TBase::eback;
-    using TBase::gptr;
-    using TBase::egptr;
+    typedef std::basic_streambuf<TValue, TTraits_> TBasicStreamBuffer;
+    typedef StreamBuffer<TValue, TTraits_>         TPubStreamBuffer_;
+    typedef typename TPubStreamBuffer_::TTraits    TTraits;
 
-    using TBase::pbase;
-    using TBase::pptr;
-    using TBase::epptr;
+    TBasicStreamBuffer * streamBuf{nullptr};
+
+    StreamBufferWrapper() = default;
+
+    explicit StreamBufferWrapper(TBasicStreamBuffer * _basicStreamBuf) : streamBuf(_basicStreamBuf)
+    {}
 
     size_t chunkSize(Input)
     {
-        return egptr() - gptr();
+        return baseBuf()->egptr() - baseBuf()->gptr();
     }
 
     size_t chunkSize(Output)
     {
-        return epptr() - pptr();
+        return baseBuf()->epptr() - baseBuf()->pptr();
     }
 
     template <typename TOffset>
     void advanceChunk(TOffset ofs, Input)
     {
-        this->gbump(ofs);
+        baseBuf()->gbump(ofs);
     }
 
     template <typename TOffset>
     void advanceChunk(TOffset ofs, Output)
     {
-        this->pbump(ofs);
+        baseBuf()->pbump(ofs);
     }
 
     void reserveChunk(Input)
     {
-        if (gptr() == egptr())
-            this->underflow();
+        if (baseBuf()->gptr() == baseBuf()->egptr())
+            baseBuf()->underflow();
     }
 
     void reserveChunk(Output)
     {
-        if (pptr() == epptr())
-            this->overflow(EOF);
+        if (baseBuf()->pptr() == baseBuf()->epptr())
+            baseBuf()->overflow(EOF);
     }
 
     template <typename TOffset>
     typename std::streampos
     seekoff(TOffset ofs, std::ios_base::seekdir way, std::ios_base::openmode which)
     {
-        return TBase::seekoff(ofs, way, which);
+        return streamBuf->pubseekoff(ofs, way, which);
     }
 
     template <typename TOffset, typename TDirection>
@@ -148,10 +175,10 @@ public:
             if (ofs == 0)
                 return;
 
-            if (IsSameType<TDirection, Input>::VALUE)
-                this->underflow();
+            SEQAN_IF_CONSTEXPR (IsSameType<TDirection, Input>::VALUE)
+                baseBuf()->underflow();
             else
-                this->overflow();
+                baseBuf()->overflow();
             left = chunkSize(dir);
 
             if (SEQAN_UNLIKELY(left == 0))
@@ -164,21 +191,26 @@ public:
                 // if seek doesn't work manually skip characters (when reading)
                 if (res == typename TTraits::pos_type(typename TTraits::off_type(-1)))
                 {
-                    if (IsSameType<TDirection, Input>::VALUE)
+                    SEQAN_IF_CONSTEXPR (IsSameType<TDirection, Input>::VALUE)
                     {
                         for (; ofs != 0; --ofs)
-                            this->sbumpc();
+                            baseBuf()->sbumpc();
                     }
-                    if (IsSameType<TDirection, Output>::VALUE)
+                    SEQAN_IF_CONSTEXPR (IsSameType<TDirection, Output>::VALUE)
                     {
                         for (; ofs != 0; --ofs)
-                            this->sputc('\0');
+                            baseBuf()->sputc('\0');
                     }
                 }
                 return;
             }
         }
     }
+
+    TPubStreamBuffer_* baseBuf() const
+    {
+        return reinterpret_cast<TPubStreamBuffer_ *>(streamBuf);
+    }
 };
 
 // ----------------------------------------------------------------------------
@@ -216,12 +248,13 @@ template <typename TStream>
 class Iter<TStream, StreamIterator<Input> >
 {
 public:
-    typedef typename Value<TStream>::Type   TValue;
-    typedef std::basic_istream<TValue>      TIStream;
-    typedef std::basic_streambuf<TValue>    TBasicBuffer;
-    typedef StreamBuffer<TValue>            TStreamBuffer;
+    typedef typename Value<TStream>::Type                    TValue;
+    typedef std::basic_istream<TValue>                       TIStream;
+    typedef std::basic_streambuf<TValue>                     TBasicBuffer;
+    typedef StreamBufferWrapper<TValue>                      TStreamBufferWrapper;
+    typedef typename TStreamBufferWrapper::TPubStreamBuffer_ TStreamBuffer;
 
-    TStreamBuffer *streamBuf;
+    TStreamBufferWrapper streamBufWrapper{nullptr};
 
     /*!
      * @fn InputStreamIterator::Iter
@@ -236,17 +269,15 @@ public:
      *
      * Allows default construction, construction from stream, as well as from a @link StreamBuffer @endlink.
      */
-    Iter() : streamBuf()
-    {}
+    Iter() = default;
 
-    Iter(TIStream & stream) :
-        streamBuf(static_cast<StreamBuffer<TValue> *>(stream.rdbuf()))
+    Iter(TIStream & stream) : streamBufWrapper(stream.rdbuf())
     {
+        // printf("streamBuf: %p\n", streamBuf);
         stream.exceptions(std::ios_base::badbit);
     }
 
-    Iter(TStreamBuffer * buf) :
-        streamBuf(static_cast<StreamBuffer<TValue> *>(buf))
+    Iter(TBasicBuffer * buf) : streamBufWrapper(buf)
     {}
 };
 
@@ -268,12 +299,13 @@ template <typename TStream>
 class Iter<TStream, StreamIterator<Output> >
 {
 public:
-    typedef typename Value<TStream>::Type   TValue;
-    typedef std::basic_ostream<TValue>      TOStream;
-    typedef std::basic_streambuf<TValue>    TBasicBuffer;
-    typedef StreamBuffer<TValue>            TStreamBuffer;
+    typedef typename Value<TStream>::Type                    TValue;
+    typedef std::basic_ostream<TValue>                       TOStream;
+    typedef std::basic_streambuf<TValue>                     TBasicBuffer;
+    typedef StreamBufferWrapper<TValue>                      TStreamBufferWrapper;
+    typedef typename TStreamBufferWrapper::TPubStreamBuffer_ TStreamBuffer;
 
-    TStreamBuffer *streamBuf;
+    TStreamBufferWrapper streamBufWrapper{nullptr};
 
     /*!
      * @fn Iter::Iter
@@ -288,17 +320,14 @@ public:
      *
      * Allows default construction, construction from stream, as well as from a @link StreamBuffer @endlink.
      */
-    Iter() : streamBuf()
-    {}
+    Iter() = default;
 
-    Iter(TOStream & stream):
-        streamBuf(static_cast<StreamBuffer<TValue> *>(stream.rdbuf()))
+    Iter(TOStream & stream) : streamBufWrapper(stream.rdbuf())
     {
         stream.exceptions(std::ios_base::badbit);
     }
 
-    Iter(TBasicBuffer *buf):
-        streamBuf(static_cast<StreamBuffer<TValue> *>(buf))
+    Iter(TBasicBuffer * buf) : streamBufWrapper(buf)
     {}
 
     template <typename TValue2>
@@ -505,13 +534,13 @@ directionIterator(TContainer &cont, TDirection const &)
 template <typename TStream, typename TDirection, typename TSize>
 inline void reserveChunk(Iter<TStream, StreamIterator<TDirection> > &iter, TSize, Input dir)
 {
-    iter.streamBuf->reserveChunk(dir);
+    iter.streamBufWrapper.reserveChunk(dir);
 }
 
 template <typename TStream, typename TDirection, typename TSize>
 inline void reserveChunk(Iter<TStream, StreamIterator<TDirection> > &iter, TSize, Output dir)
 {
-    iter.streamBuf->reserveChunk(dir);
+    iter.streamBufWrapper.reserveChunk(dir);
 }
 
 // ----------------------------------------------------------------------------
@@ -523,7 +552,7 @@ inline void reserveChunk(Iter<TStream, StreamIterator<TDirection> > &iter, TSize
 template <typename TStream, typename TDirection, typename TSize>
 inline void advanceChunk(Iter<TStream, StreamIterator<TDirection> > &iter, TSize size)
 {
-    iter.streamBuf->advanceChunk(size, TDirection());
+    iter.streamBufWrapper.advanceChunk(size, TDirection());
 }
 
 // ----------------------------------------------------------------------------
@@ -550,8 +579,8 @@ template <typename TChunk, typename TStream, typename TDirection>
 inline void
 getChunk(TChunk &result, Iter<TStream, StreamIterator<Tag<TDirection> > > &iter, Tag<TDirection>)
 {
-    SEQAN_ASSERT(iter.streamBuf != NULL);
-    getChunk(result, *iter.streamBuf, Tag<TDirection>());
+    SEQAN_ASSERT(iter.streamBufWrapper.baseBuf() != nullptr);
+    getChunk(result, *iter.streamBufWrapper.baseBuf(), Tag<TDirection>());
 }
 
 // ----------------------------------------------------------------------------
@@ -562,15 +591,15 @@ template <typename TStream>
 inline typename Reference<Iter<TStream, StreamIterator<Input> > >::Type
 value(Iter<TStream, StreamIterator<Input> > &iter)
 {
-    SEQAN_ASSERT(iter.streamBuf != NULL);
-    return iter.streamBuf->sgetc();
+    SEQAN_ASSERT(iter.streamBufWrapper.baseBuf() != nullptr);
+    return iter.streamBufWrapper.baseBuf()->sgetc();
 }
 template <typename TStream>
 inline typename Reference<Iter<TStream, StreamIterator<Input> > const>::Type
 value(Iter<TStream, StreamIterator<Input> > const &iter)
 {
-    SEQAN_ASSERT(iter.streamBuf != NULL);
-    return iter.streamBuf->sgetc();
+    SEQAN_ASSERT(iter.streamBufWrapper.baseBuf() != nullptr);
+    return iter.streamBufWrapper.baseBuf()->sgetc();
 }
 
 // ----------------------------------------------------------------------------
@@ -600,12 +629,13 @@ setValue(Iter<TStream, StreamIterator<Output> > & iter, TValue const &val)
 {
     return setValue(const_cast<Iter<TStream, StreamIterator<Output> > const &>(iter), val);
 }
+
 template <typename TStream, typename TValue>
 inline void
 setValue(Iter<TStream, StreamIterator<Output> > const & iter, TValue const &val)
 {
-    SEQAN_ASSERT(iter.streamBuf != NULL);
-    iter.streamBuf->sputc((typename Value<Iter<TStream, StreamIterator<Output> > >::Type)val);
+    SEQAN_ASSERT(iter.streamBufWrapper.baseBuf() != nullptr);
+    iter.streamBufWrapper.baseBuf()->sputc((typename Value<Iter<TStream, StreamIterator<Output> > >::Type)val);
 }
 
 // ----------------------------------------------------------------------------
@@ -628,8 +658,8 @@ template <typename TStream>
 inline void
 goNext(Iter<TStream, StreamIterator<Input> > & iter)
 {
-    SEQAN_ASSERT(iter.streamBuf != NULL);
-    iter.streamBuf->sbumpc();
+    SEQAN_ASSERT(iter.streamBufWrapper.baseBuf() != nullptr);
+    iter.streamBufWrapper.baseBuf()->sbumpc();
 }
 
 template <typename TStream>
@@ -646,8 +676,8 @@ template <typename TContainer, typename TSpec>
 inline void
 operator++(Iter<TContainer, StreamIterator<Input> > & iter, int)
 {
-    SEQAN_ASSERT(iter.streamBuf != NULL);
-    iter.streamBuf->sbumpc();
+    SEQAN_ASSERT(iter.streamBufWrapper.baseBuf() != nullptr);
+    iter.streamBufWrapper.baseBuf()->sbumpc();
 }
 
 // ----------------------------------------------------------------------------
@@ -658,8 +688,8 @@ template <typename TStream, typename TOffset, typename TDirection>
 inline void
 goFurther(Iter<TStream, StreamIterator<TDirection> > &iter, TOffset ofs)
 {
-    SEQAN_ASSERT(iter.streamBuf != NULL);
-    iter.streamBuf->goFurther(ofs, TDirection());
+    SEQAN_ASSERT(iter.streamBufWrapper.baseBuf() != nullptr);
+    iter.streamBufWrapper.goFurther(ofs, TDirection());
 }
 
 // ----------------------------------------------------------------------------
@@ -670,8 +700,8 @@ template <typename TStream, typename TDirection>
 inline typename Position<Iter<TStream, StreamIterator<TDirection> > const>::Type
 position(Iter<TStream, StreamIterator<TDirection> > const & iter)
 {
-    SEQAN_ASSERT(iter.streamBuf != NULL);
-    return iter.streamBuf->pubseekoff(0, std::ios_base::cur,
+    SEQAN_ASSERT(iter.streamBufWrapper.baseBuf() != nullptr);
+    return iter.streamBufWrapper.baseBuf()->pubseekoff(0, std::ios_base::cur,
                                       (IsSameType<TDirection, Input>::VALUE)? std::ios_base::in: std::ios_base::out);
 }
 
@@ -683,8 +713,8 @@ template <typename TStream, typename TDirection, typename TPosition>
 inline void
 setPosition(Iter<TStream, StreamIterator<TDirection> > const & iter, TPosition pos)
 {
-    SEQAN_ASSERT(iter.streamBuf != NULL);
-    iter.streamBuf->pubseekpos(pos, (IsSameType<TDirection, Input>::VALUE)? std::ios_base::in: std::ios_base::out);
+    SEQAN_ASSERT(iter.streamBufWrapper.baseBuf() != nullptr);
+    iter.streamBufWrapper.baseBuf()->pubseekpos(pos, (IsSameType<TDirection, Input>::VALUE)? std::ios_base::in: std::ios_base::out);
 }
 
 // ----------------------------------------------------------------------------
@@ -698,13 +728,13 @@ atEnd(Iter<TStream, StreamIterator<Input> > const & iter)
     typedef typename Value<Iter<TStream, StreamIterator<Input> > >::Type TValue;
     typedef StreamBuffer<TValue> TStreamBuffer;
 
-    if (SEQAN_UNLIKELY(iter.streamBuf == NULL))
+    if (SEQAN_UNLIKELY(iter.streamBufWrapper.baseBuf() == nullptr))
     {
         return true;
     }
     else
     {
-        TStreamBuffer *buf = static_cast<TStreamBuffer*>(iter.streamBuf);
+        TStreamBuffer * const buf = iter.streamBufWrapper.baseBuf();
         if (SEQAN_LIKELY(buf->gptr() < buf->egptr()))
             return false;
         else
@@ -719,13 +749,13 @@ atEnd(Iter<TStream, StreamIterator<Output> > const & iter)
     typedef typename Value<Iter<TStream, StreamIterator<Input> > >::Type TValue;
     typedef StreamBuffer<TValue> TStreamBuffer;
 
-    if (SEQAN_UNLIKELY(iter.streamBuf == NULL))
+    if (SEQAN_UNLIKELY(iter.streamBufWrapper.baseBuf() == nullptr))
     {
         return true;
     }
     else
     {
-        TStreamBuffer *buf = static_cast<TStreamBuffer*>(iter.streamBuf);
+        TStreamBuffer * const buf = iter.streamBufWrapper.baseBuf();
         if (SEQAN_LIKELY(buf->pptr() < buf->epptr()))
             return false;
         else
diff --git a/include/seqan/stream/lexical_cast.h b/include/seqan/stream/lexical_cast.h
index 173dd97..0fcce9e 100644
--- a/include/seqan/stream/lexical_cast.h
+++ b/include/seqan/stream/lexical_cast.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -149,7 +149,7 @@ lexicalCast(TInteger & target, TSource const & source)
             return false;
 
         // overflow detection
-        if (SEQAN_UNLIKELY(val > MaxValue<TInteger>::VALUE / 10))
+        if (SEQAN_UNLIKELY(val > std::numeric_limits<TInteger>::max() / 10))
             return false;
         val *= 10;
 
@@ -189,7 +189,7 @@ lexicalCast(TInteger & target, TSource const & source)
                 return false;
 
             // overflow detection
-            if (SEQAN_UNLIKELY(val > MaxValue<TInteger>::VALUE / 10))
+            if (SEQAN_UNLIKELY(val > std::numeric_limits<TInteger>::max() / 10))
                 return false;
             val *= 10;
 
@@ -213,12 +213,12 @@ lexicalCast(TInteger & target, TSource const & source)
                 return false;
 
             // overflow detection
-            if (SEQAN_UNLIKELY(val < MinValue<TInteger>::VALUE / 10))
+            if (SEQAN_UNLIKELY(val < std::numeric_limits<TInteger>::min() / 10))
                 return false;
             val *= 10;
 
             // overflow detection
-            if (SEQAN_UNLIKELY(MinValue<TInteger>::VALUE - val > -(TInteger)digit))
+            if (SEQAN_UNLIKELY(std::numeric_limits<TInteger>::min() - val > -(TInteger)digit))
                 return false;
             val -= digit;
         }
diff --git a/include/seqan/stream/stream_base.h b/include/seqan/stream/stream_base.h
index 96d442f..7b8db6a 100644
--- a/include/seqan/stream/stream_base.h
+++ b/include/seqan/stream/stream_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/stream/stream_compressor.h b/include/seqan/stream/stream_compressor.h
index e39e9ce..31beba3 100644
--- a/include/seqan/stream/stream_compressor.h
+++ b/include/seqan/stream/stream_compressor.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -61,6 +61,16 @@ struct Pager;
 // Classes
 // ============================================================================
 
+// Special end-of-file marker defined by the BGZF compression format.
+// See: https://samtools.github.io/hts-specs/SAMv1.pdf
+static constexpr std::array<uint8_t, 28> BGZF_END_OF_FILE_MARKER {{0x1f, 0x8b, 0x08, 0x04,
+                                                                  0x00, 0x00, 0x00, 0x00,
+                                                                  0x00, 0xff, 0x06, 0x00,
+                                                                  0x42, 0x43, 0x02, 0x00,
+                                                                  0x1b, 0x00, 0x03, 0x00,
+                                                                  0x00, 0x00, 0x00, 0x00,
+                                                                  0x00, 0x00, 0x00, 0x00}};
+
 template <typename TAlgTag>
 struct Compress;
 
@@ -276,16 +286,20 @@ compress(TTarget & target, TSourceIterator & source, CompressionContext<BgzfFile
 // Helper Function _bgzfUnpackXX()
 // ----------------------------------------------------------------------------
 
-inline unsigned short
+inline uint16_t
 _bgzfUnpack16(char const * buffer)
 {
-    return *reinterpret_cast<unsigned short const *>(buffer);
+    uint16_t tmp = *reinterpret_cast<uint16_t const *>(buffer);
+    enforceLittleEndian(tmp);
+    return tmp;
 }
 
-inline unsigned
+inline uint32_t
 _bgzfUnpack32(char const * buffer)
 {
-    return *reinterpret_cast<unsigned const *>(buffer);
+    uint32_t tmp = *reinterpret_cast<uint32_t const *>(buffer);
+    enforceLittleEndian(tmp);
+    return tmp;
 }
 
 // ----------------------------------------------------------------------------
@@ -293,15 +307,17 @@ _bgzfUnpack32(char const * buffer)
 // ----------------------------------------------------------------------------
 
 inline void
-_bgzfPack16(char * buffer, unsigned short value)
+_bgzfPack16(char * buffer, uint16_t value)
 {
-    *reinterpret_cast<unsigned short *>(buffer) = value;
+    enforceLittleEndian(value);
+    *reinterpret_cast<uint16_t *>(buffer) = value;
 }
 
 inline void
-_bgzfPack32(char * buffer, unsigned value)
+_bgzfPack32(char * buffer, uint32_t value)
 {
-    *reinterpret_cast<unsigned *>(buffer) = value;
+    enforceLittleEndian(value);
+    *reinterpret_cast<uint32_t *>(buffer) = value;
 }
 
 
diff --git a/include/seqan/stream/tokenization.h b/include/seqan/stream/tokenization.h
index fa9a1bb..49c0784 100644
--- a/include/seqan/stream/tokenization.h
+++ b/include/seqan/stream/tokenization.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -397,11 +397,31 @@ inline void readOne(TTarget & target, TFwdIterator &iter)
 
 //TODO(singer) to be revised
 template <typename TValue, typename TFwdIterator>
-inline void readRawPod(TValue & value, TFwdIterator &srcIter)
+inline void readRawPodImpl(TValue & value, TFwdIterator &srcIter)
 {
     write((char*)&value, srcIter, sizeof(TValue));
 }
 
+template <typename TValue, typename TFwdIterator>
+inline std::enable_if_t<std::is_arithmetic<TValue>::value>
+readRawPod(TValue & value, TFwdIterator &srcIter)
+{
+    readRawPodImpl(value, srcIter);
+    enforceLittleEndian(value);
+}
+
+template <typename TValue, typename TFwdIterator>
+inline std::enable_if_t<!std::is_arithmetic<TValue>::value>
+readRawPod(SEQAN_UNUSED TValue & value, SEQAN_UNUSED TFwdIterator &srcIter)
+{
+#if SEQAN_BIG_ENDIAN
+    static_assert(std::is_arithmetic<TValue>::value,
+                  "You are deserialising a data structure on big endian architecture that needs a custom reader. THIS IS A BUG!");
+#else
+    readRawPodImpl(value, srcIter);
+#endif
+}
+
 // ----------------------------------------------------------------------------
 // Function readLine()
 // ----------------------------------------------------------------------------
@@ -469,7 +489,7 @@ inline void writeWrappedString(TTarget & target, TSequence const & seq, TSize li
     TIter iter = begin(seq, Rooted());
     TSeqSize charsLeft = length(seq);
     TSeqSize charsPerLine;
-    TSeqSize lineLength_ = (lineLength == 0)? maxValue<TSeqSize>() : lineLength;
+    TSeqSize lineLength_ = (lineLength == 0)? std::numeric_limits<TSeqSize>::max() : lineLength;
 
     do
     {
@@ -631,7 +651,7 @@ strSplit(TResult & result,
     }
 
     for (TIter it = itBeg; it != itEnd; ++it)
-        if (sep(getValue(it)))
+        if (sep(*it))
         {
             if (allowEmptyStrings || itFrom != it)
             {
@@ -640,7 +660,7 @@ strSplit(TResult & result,
                 {
                     if (!allowEmptyStrings)
                     {
-                        while (it != itEnd && sep(getValue(it)))
+                        while (it != itEnd && sep(*it))
                             ++it;
                     }
                     else
@@ -664,7 +684,7 @@ inline SEQAN_FUNC_ENABLE_IF(And<Is<ContainerConcept<TResult> >,
                                 Is<ContainerConcept<typename Value<TResult>::Type > > >, void)
 strSplit(TResult & result, TSequence const & sequence, TFunctor const & sep, bool const allowEmptyStrings)
 {
-    strSplit(result, sequence, sep, allowEmptyStrings, maxValue<typename Size<TSequence>::Type>());
+    strSplit(result, sequence, sep, allowEmptyStrings, std::numeric_limits<typename Size<TSequence>::Type>::max());
 }
 
 template <typename TResult, typename TSequence, typename TFunctor>
diff --git a/include/seqan/stream/virtual_stream.h b/include/seqan/stream/virtual_stream.h
index 64b21ec..f40c3e3 100644
--- a/include/seqan/stream/virtual_stream.h
+++ b/include/seqan/stream/virtual_stream.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -557,15 +557,16 @@ open(VirtualStream<TValue, TDirection, TTraits> &stream, TStream &fileStream, TC
     typedef typename TVirtualStream::TBufferedStream TBufferedStream;
 
     // peek the first character to initialize the underlying streambuf (for in_avail)
-    if (IsSameType<TDirection, Input>::VALUE)  // Only getc if input stream.
+    SEQAN_IF_CONSTEXPR (IsSameType<TDirection, Input>::VALUE)  // Only getc if input stream.
         fileStream.rdbuf()->sgetc();
 
-    if (IsSameType<TDirection, Input>::VALUE &&
-        !IsSameType<TStream, TBufferedStream>::VALUE &&
-        fileStream.rdbuf()->in_avail() < 2)
+    SEQAN_IF_CONSTEXPR (IsSameType<TDirection, Input>::VALUE && !IsSameType<TStream, TBufferedStream>::VALUE)
     {
-        stream.bufferedStream.setStream(fileStream);
-        return open(stream, stream.bufferedStream, compressionType);
+        if (fileStream.rdbuf()->in_avail() < 2)
+        {
+            stream.bufferedStream.setStream(fileStream);
+            return open(stream, stream.bufferedStream, compressionType);
+        }
     }
 
     VirtualStreamFactoryContext_<TVirtualStream> ctx(fileStream);
diff --git a/include/seqan/system.h b/include/seqan/system.h
index 9d261d6..7f25c03 100644
--- a/include/seqan/system.h
+++ b/include/seqan/system.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/system/file_async.h b/include/seqan/system/file_async.h
index 6bb1b11..6c6ebc9 100644
--- a/include/seqan/system/file_async.h
+++ b/include/seqan/system/file_async.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -813,20 +813,17 @@ public:
 struct AiocbWrapper :
     public aiocb
 {
-    AiocbWrapper()
-    {}
+    AiocbWrapper() = default;
+    AiocbWrapper(AiocbWrapper &&) = default;
 
     AiocbWrapper(AiocbWrapper & other, Move) :
         aiocb(other)
     {}
 
-    AiocbWrapper(AiocbWrapper && other) :
-        aiocb(other)
-    {}
-
+    AiocbWrapper & operator=(AiocbWrapper &&) = default;
 private:
-    AiocbWrapper(AiocbWrapper const &)
-    {}
+    AiocbWrapper(AiocbWrapper const &) = delete;
+    AiocbWrapper & operator=(AiocbWrapper const &) = delete;
 };
 
 template <>
diff --git a/include/seqan/system/file_directory.h b/include/seqan/system/file_directory.h
index c3bf295..0d6191e 100644
--- a/include/seqan/system/file_directory.h
+++ b/include/seqan/system/file_directory.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/system/file_forwards.h b/include/seqan/system/file_forwards.h
index b9962b6..609391c 100644
--- a/include/seqan/system/file_forwards.h
+++ b/include/seqan/system/file_forwards.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/system/file_sync.h b/include/seqan/system/file_sync.h
index 39705af..6d0f650 100644
--- a/include/seqan/system/file_sync.h
+++ b/include/seqan/system/file_sync.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/system/system_base.h b/include/seqan/system/system_base.h
index d305942..8bcd760 100644
--- a/include/seqan/system/system_base.h
+++ b/include/seqan/system/system_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/system/system_event_win.h b/include/seqan/system/system_event_win.h
index a4e24a3..6a15857 100644
--- a/include/seqan/system/system_event_win.h
+++ b/include/seqan/system/system_event_win.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/system/system_forwards.h b/include/seqan/system/system_forwards.h
index 0d3e126..97eb688 100644
--- a/include/seqan/system/system_forwards.h
+++ b/include/seqan/system/system_forwards.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/tabix_io.h b/include/seqan/tabix_io.h
index 63e7525..7a6f359 100644
--- a/include/seqan/tabix_io.h
+++ b/include/seqan/tabix_io.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/tabix_io/tabix_index_tbi.h b/include/seqan/tabix_io/tabix_index_tbi.h
index a91f1bd..29981d1 100644
--- a/include/seqan/tabix_io/tabix_index_tbi.h
+++ b/include/seqan/tabix_io/tabix_index_tbi.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -134,7 +134,7 @@ public:
         colEnd(3),
         meta('#'),
         skip(0),
-        unalignedCount(maxValue<uint64_t>()),
+        unalignedCount(std::numeric_limits<uint64_t>::max()),
         _nameStoreCache(_nameStore)
     {}
 
@@ -145,7 +145,7 @@ public:
         colEnd(3),
         meta('#'),
         skip(0),
-        unalignedCount(maxValue<uint64_t>()),
+        unalignedCount(std::numeric_limits<uint64_t>::max()),
         _nameStoreCache(_nameStore)
     {
         if (!open(*this, fileName))
@@ -281,7 +281,7 @@ jumpToRegion(FormattedFile<TFileFormat, Input, TSpec> & fileIn,
     // ------------------------------------------------------------------------
     // Compute offset in BGZF file.
     // ------------------------------------------------------------------------
-    uint64_t offset = MaxValue<uint64_t>::VALUE;
+    uint64_t offset = std::numeric_limits<uint64_t>::max();
 
     // Retrieve the candidate bin identifiers for [posBeg, posEnd).
     String<uint16_t> candidateBins;
@@ -377,7 +377,7 @@ jumpToRegion(FormattedFile<TFileFormat, Input, TSpec> & fileIn,
             break;  // Cannot find overlapping any more.
     }
 
-    if (offset != MaxValue<uint64_t>::VALUE)
+    if (offset != std::numeric_limits<uint64_t>::max())
     {
         setPosition(fileIn, offset);
         
@@ -522,7 +522,7 @@ open(TabixIndex & index, char const * filename)
     if (!atEnd(iter))
         readRawPod(index.unalignedCount, iter);
     else
-        index.unalignedCount = maxValue<uint64_t>();
+        index.unalignedCount = std::numeric_limits<uint64_t>::max();
 
     return true;
 }
diff --git a/include/seqan/translation.h b/include/seqan/translation.h
index 319719a..bf1c723 100644
--- a/include/seqan/translation.h
+++ b/include/seqan/translation.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/translation/translation.h b/include/seqan/translation/translation.h
index 01dd0c3..034d7eb 100644
--- a/include/seqan/translation/translation.h
+++ b/include/seqan/translation/translation.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -312,8 +312,8 @@ _translateImplLoopOMPWrapper(TTarget & target,
 {
     SEQAN_OMP_PRAGMA(parallel for schedule(dynamic))
     for (int64_t i = 0; i < static_cast<int64_t>(length(target)); ++i)
-        _translateImplLoop(target, i, source, GeneticCode<CODE_SPEC>(),
-                           Frames_<frames>());
+        if (length(source[i/frames]) >= 3) // make sure there is enough to translate
+            _translateImplLoop(target, i, source, GeneticCode<CODE_SPEC>(), Frames_<frames>());
 }
 
 template <typename TSource, typename TTarget, uint8_t frames,
@@ -327,8 +327,8 @@ _translateImplLoopOMPWrapper(TTarget & target,
 {
     typedef typename Size<TTarget>::Type TPos;
     for (TPos i = 0; i < length(target); ++i)
-        _translateImplLoop(target, i, source, GeneticCode<CODE_SPEC>(),
-                           Frames_<frames>());
+        if (length(source[i/frames]) >= 3) // make sure there is enough to translate
+            _translateImplLoop(target, i, source, GeneticCode<CODE_SPEC>(), Frames_<frames>());
 }
 
 // --------------------------------------------------------------------------
@@ -353,7 +353,7 @@ _translateImpl(StringSet<String<AminoAcid, TSpec1>, TSpec2> & target,
         // current dnastring's length / 3 (3DNA -> 1 AA)
         TPos len = length(source[i/n]) / 3;
         // shorten for shifted frames
-        if (( n > 2 ) && ( length(source[i/n]) % 3 ) < ( i%3 ))
+        if ((len > 0) && ( n > 2 ) && ((length(source[i/n]) % 3) < (i % 3)))
             --len;
         resize(target[i], len, Exact());
     }
@@ -383,7 +383,7 @@ _translateImpl(StringSet<String<AminoAcid,
         // current dnastring's length / 3 (3DNA -> 1 AA)
         TPos len = length(source[i/n]) / 3;
         // shorten for shifted frames
-        if (( n > 2 ) && ( length(source[i/n]) % 3 ) < ( i%3 ))
+        if ((len > 0) && ( n > 2 ) && ( length(source[i/n]) % 3 ) < ( i%3 ))
             --len;
         target.limits[i+1] = target.limits[i] + len;
     }
diff --git a/include/seqan/translation/translation_tables.h b/include/seqan/translation/translation_tables.h
index 35e5160..b4da565 100644
--- a/include/seqan/translation/translation_tables.h
+++ b/include/seqan/translation/translation_tables.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/ucsc_io.h b/include/seqan/ucsc_io.h
index b91d864..402ece0 100644
--- a/include/seqan/ucsc_io.h
+++ b/include/seqan/ucsc_io.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/ucsc_io/ucsc_file.h b/include/seqan/ucsc_io/ucsc_file.h
index 0a9c9b4..930a894 100644
--- a/include/seqan/ucsc_io/ucsc_file.h
+++ b/include/seqan/ucsc_io/ucsc_file.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/ucsc_io/ucsc_io.h b/include/seqan/ucsc_io/ucsc_io.h
index 96cd9f5..78a9783 100755
--- a/include/seqan/ucsc_io/ucsc_io.h
+++ b/include/seqan/ucsc_io/ucsc_io.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/ucsc_io/ucsc_record.h b/include/seqan/ucsc_io/ucsc_record.h
index 49a152d..6824919 100644
--- a/include/seqan/ucsc_io/ucsc_record.h
+++ b/include/seqan/ucsc_io/ucsc_record.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/vcf_io.h b/include/seqan/vcf_io.h
index d5e6b06..0a9f949 100644
--- a/include/seqan/vcf_io.h
+++ b/include/seqan/vcf_io.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/vcf_io/read_vcf.h b/include/seqan/vcf_io/read_vcf.h
index 0d3305a..e6ae81f 100644
--- a/include/seqan/vcf_io/read_vcf.h
+++ b/include/seqan/vcf_io/read_vcf.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -144,12 +144,16 @@ readHeader(VcfHeader & header,
             // Split line, get sample names.
             StringSet<CharString> fields;
             strSplit(fields, buffer, IsTab());
-            if (length(fields) < 9u)
+            if (length(fields) < 8u)
                 SEQAN_THROW(ParseError("Not enough fields."));
 
             // Get sample names.
-            for (unsigned i = 9; i < length(fields); ++i)
+            for (unsigned i = 8; i < length(fields); ++i)
+            {
+                if(i == 8 && fields[i] == "FORMAT")
+                    continue;
                 appendName(sampleNamesCache(context), fields[i]);
+            }
         }
     }
 }
@@ -166,109 +170,51 @@ readRecord(VcfRecord & record,
            TForwardIter & iter,
            Vcf const & /*tag*/)
 {
-    typedef OrFunctor<IsTab, AssertFunctor<NotFunctor<IsNewline>, ParseError, Vcf> > NextEntry;
-
     clear(record);
     CharString &buffer = context.buffer;
 
-    // CHROM
+    // get the next line on the buffer.
     clear(buffer);
-    readUntil(buffer, iter, NextEntry());
-    if (empty(buffer))
-        SEQAN_THROW(EmptyFieldError("CHROM"));
-    record.rID = nameToId(contigNamesCache(context), buffer);
-    skipOne(iter);
 
-    // POS
-    clear(buffer);
-    readUntil(buffer, iter, NextEntry());
-    if (empty(buffer))
-        SEQAN_THROW(EmptyFieldError("POS"));
-    record.beginPos = lexicalCast<int32_t>(buffer) - 1; // Translate from 1-based to 0-based.
-    skipOne(iter);
-
-    // ID
-    readUntil(record.id, iter, NextEntry());
-    if (empty(record.id))
-        SEQAN_THROW(EmptyFieldError("ID"));
-    skipOne(iter);
-
-    // REF
-    readUntil(record.ref, iter, NextEntry());
-    if (empty(record.id))
-        SEQAN_THROW(EmptyFieldError("REF"));
-    skipOne(iter);
-
-    // ALT
-    readUntil(record.alt, iter, NextEntry());
-    if (empty(record.id))
-        SEQAN_THROW(EmptyFieldError("ALT"));
-    skipOne(iter);
-
-    // QUAL
-    clear(buffer);
-    readUntil(buffer, iter, NextEntry());
-    if (empty(buffer))
-        SEQAN_THROW(EmptyFieldError("QUAL"));
+    readLine(buffer, iter);
+    // Split line, get field and sample values.
+    // The first 8(9) columns are fields and the rest are values for samples
+    //"#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT")
+    StringSet<CharString> field_values;
+    strSplit(field_values, buffer, IsTab(), false);
 
-    if (buffer == ".")
-        record.qual = VcfRecord::MISSING_QUAL();
-    else
-        lexicalCastWithException(record.qual, buffer);
+    unsigned numSamples = length(sampleNames(context));
+
+    if (length(field_values) < 8u + numSamples)
+        SEQAN_THROW(ParseError("Not enough values in a line."));
 
-    skipOne(iter);
+    record.rID      = nameToId(contigNamesCache(context), field_values[0]);
+    record.beginPos = lexicalCast<int32_t>(field_values[1]) - 1; // Translate from 1-based to 0-based.
+    record.id       = field_values[2];
+    record.ref      = field_values[3];
+    record.alt      = field_values[4];
 
-    // FILTER
-    readUntil(record.filter, iter, NextEntry());
-    if (empty(record.filter))
-        SEQAN_THROW(EmptyFieldError("FILTER"));
-    skipOne(iter);
+    if (field_values[5] == ".")
+        record.qual = VcfRecord::MISSING_QUAL();
+    else
+        lexicalCastWithException(record.qual, field_values[5]);
 
-    // INFO
-    readUntil(record.info, iter, OrFunctor<IsTab, IsNewline>());
-    if (empty(record.info))
-        SEQAN_THROW(EmptyFieldError("INFO"));
+    record.filter   = field_values[6];
+    record.info     = field_values[7];
 
-    // the following columns are optional
-    if (atEnd(iter) || IsNewline()(value(iter)))
+    //check if we have a spare column for FORMAT
+    unsigned samplesColStart = 8;
+    if (length(field_values) > 8u + numSamples) // we have extara column for FORMAT
     {
-        skipLine(iter);
-        return;
+        record.format = field_values[8];
+        samplesColStart = 9;
     }
-    skipOne(iter);
-
-    // FORMAT
-    readUntil(record.format, iter, NextEntry());
-    if (empty(record.format))
-        SEQAN_THROW(EmptyFieldError("FORMAT"));
-    skipOne(iter);
 
-    // The samples.
-    unsigned numSamples = length(sampleNames(context));
-    for (unsigned i = 0; i < numSamples; ++i)
+    // Get sample name values .
+    for (unsigned i = samplesColStart; i < length(field_values); ++i)
     {
-        clear(buffer);
-        if (i + 1 != numSamples)
-        {
-            readUntil(buffer, iter, NextEntry());
-            skipOne(iter);
-        }
-        else
-        {
-            readUntil(buffer, iter, OrFunctor<IsTab, IsNewline>());
-        }
-
-        if (empty(buffer))
-        {
-            char buffer[30];    // == 9 (GENOTYPE_) + 20 (#digits in MIN_INT64) + 1 (trailing zero)
-            snprintf(buffer, 30, "GENOTYPE_%u", i + 1);
-            SEQAN_THROW(EmptyFieldError(buffer));
-        }
-        appendValue(record.genotypeInfos, buffer);
+        appendValue(record.genotypeInfos, field_values[i]);
     }
-
-    // skip line break and optional additional columns
-    skipLine(iter);
 }
 
 }  // namespace seqan
diff --git a/include/seqan/vcf_io/vcf_file.h b/include/seqan/vcf_io/vcf_file.h
index 2717226..1257637 100644
--- a/include/seqan/vcf_io/vcf_file.h
+++ b/include/seqan/vcf_io/vcf_file.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/vcf_io/vcf_header.h b/include/seqan/vcf_io/vcf_header.h
index 5b6d4a1..56b5346 100644
--- a/include/seqan/vcf_io/vcf_header.h
+++ b/include/seqan/vcf_io/vcf_header.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/vcf_io/vcf_header_record.h b/include/seqan/vcf_io/vcf_header_record.h
index 559e3e9..4a57ba2 100644
--- a/include/seqan/vcf_io/vcf_header_record.h
+++ b/include/seqan/vcf_io/vcf_header_record.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/vcf_io/vcf_io_context.h b/include/seqan/vcf_io/vcf_io_context.h
index db1c907..09fc1b0 100644
--- a/include/seqan/vcf_io/vcf_io_context.h
+++ b/include/seqan/vcf_io/vcf_io_context.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/vcf_io/vcf_record.h b/include/seqan/vcf_io/vcf_record.h
index 13f7f84..66c0c2f 100644
--- a/include/seqan/vcf_io/vcf_record.h
+++ b/include/seqan/vcf_io/vcf_record.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/vcf_io/write_vcf.h b/include/seqan/vcf_io/write_vcf.h
index 3150a74..96c8949 100644
--- a/include/seqan/vcf_io/write_vcf.h
+++ b/include/seqan/vcf_io/write_vcf.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/include/seqan/version.h b/include/seqan/version.h
index 7716422..9902d3a 100644
--- a/include/seqan/version.h
+++ b/include/seqan/version.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -39,9 +39,9 @@
 
 #define SEQAN_VERSION_MAJOR 2
 
-#define SEQAN_VERSION_MINOR 3
+#define SEQAN_VERSION_MINOR 4
 
-#define SEQAN_VERSION_PATCH 2
+#define SEQAN_VERSION_PATCH 0
 
 #define SEQAN_VERSION_PRE_RELEASE 0
 
diff --git a/manual/attic/HowTo/GenerateSeqAnKnimeNodes/knime_node.rst b/manual/attic/HowTo/GenerateSeqAnKnimeNodes/knime_node.rst
index b2cd216..925cb57 100644
--- a/manual/attic/HowTo/GenerateSeqAnKnimeNodes/knime_node.rst
+++ b/manual/attic/HowTo/GenerateSeqAnKnimeNodes/knime_node.rst
@@ -4,7 +4,7 @@
     // ==========================================================================
     //                                 knime_node
     // ==========================================================================
-    // Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+    // Copyright (c) 2006-2018, Knut Reinert, FU Berlin
     // All rights reserved.
     //
     // Redistribution and use in source and binary forms, with or without
diff --git a/manual/source/Infrastructure/Contribute/StyleCpp.rst b/manual/source/Infrastructure/Contribute/StyleCpp.rst
index 9f73a82..b35575b 100644
--- a/manual/source/Infrastructure/Contribute/StyleCpp.rst
+++ b/manual/source/Infrastructure/Contribute/StyleCpp.rst
@@ -1001,7 +1001,7 @@ CPP File Structure
     // ==========================================================================
     //                                $APP_NAME
     // ==========================================================================
-    // Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+    // Copyright (c) 2006-2018, Knut Reinert, FU Berlin
     // All rights reserved.
     //
     // Redistribution and use in source and binary forms, with or without
@@ -1055,7 +1055,7 @@ Application Header Structure
     // ==========================================================================
     //                                $APP_NAME
     // ==========================================================================
-    // Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+    // Copyright (c) 2006-2018, Knut Reinert, FU Berlin
     // All rights reserved.
     //
     // Redistribution and use in source and binary forms, with or without
@@ -1129,7 +1129,7 @@ Library Header Structure
     // ==========================================================================
     //                 SeqAn - The Library for Sequence Analysis
     // ==========================================================================
-    // Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+    // Copyright (c) 2006-2018, Knut Reinert, FU Berlin
     // All rights reserved.
     //
     // Redistribution and use in source and binary forms, with or without
diff --git a/manual/source/Infrastructure/Use/CustomBuildSystem.rst b/manual/source/Infrastructure/Use/CustomBuildSystem.rst
index b6d1423..cd58c59 100644
--- a/manual/source/Infrastructure/Use/CustomBuildSystem.rst
+++ b/manual/source/Infrastructure/Use/CustomBuildSystem.rst
@@ -35,6 +35,31 @@ For XCode on macOS OpenMP is not yet available.
 
 With Visual Studio OpenMP is switched on by default.
 
+Compiler specifics
+------------------
+
+Intel Compiler
+^^^^^^^^^^^^^^
+
+The Intel Compiler does not ship a c++ standard library on its own and will use
+the one pre-installed on the system (e.g., the one from g++). This can be a
+problem [especially for cluster users through the use of a module system], if
+the standard library by a default g++ installation is to old.
+
+Please check with the following command which g++ version is being used and make
+sure it matches the supported gcc versions.
+
+.. code-block:: console
+
+    # icpc -v
+    icpc version 17.0.2 (gcc version 5.4.0 compatibility)
+
+If you have multiple g++ installations, you can choose the standard library by
+``icpc -gxx-name=g++-5.4.0 -gcc-name=gcc-5.4.0 …``.
+
+You may have to add the path of the library to ```$LD_LIBRARY_PATH`` for the
+linker.
+
 Operating System specifics
 --------------------------
 
@@ -211,6 +236,21 @@ meaning
 usage
  add compiler flag: ``-DSEQAN_DISABLE_VERSION_CHECK`` 
 
+SEQAN_BGZF_NUM_THREADS
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+possible value
+ positive integer
+
+default
+ 16
+
+meaning
+ Number of threads to use for BGZF I/O.
+
+usage
+ add compiler flag: ``-DSEQAN_BGZF_NUM_THREADS=value`` 
+
 Settings Projects Using Seqan
 -----------------------------
 
diff --git a/manual/source/Infrastructure/Use/FindSeqAnCMake.rst b/manual/source/Infrastructure/Use/FindSeqAnCMake.rst
index 3ae1d83..ec4deae 100644
--- a/manual/source/Infrastructure/Use/FindSeqAnCMake.rst
+++ b/manual/source/Infrastructure/Use/FindSeqAnCMake.rst
@@ -269,6 +269,30 @@ Required additions to C++ compiler flags are in the following variable:
 
     Please note that these variables include whatever has been added by the dependencies mentioned above so **do not add** e.g. ``${OpenMP_CXX_FLAGS}`` yourself!
 
+Intel Compiler specifics
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+The Intel Compiler does not ship a c++ standard library on its own and will use
+the one pre-installed on the system (e.g., the one from g++). This can be a
+problem [especially for cluster users through the use of a module system], if
+the standard library by a default g++ installation is to old.
+
+Please check with the following command which g++ version is being used and make
+sure it matches the supported gcc versions.
+
+.. code-block:: console
+
+    # icpc -v
+    icpc version 17.0.2 (gcc version 5.4.0 compatibility)
+
+If you have multiple g++ installations, you can choose the standard library by
+``icpc -gxx-name=g++-5.4.0 -gcc-name=gcc-5.4.0 …``. Use
+``cmake -DCMAKE_CXX_FLAGS="-gxx-name=g++-5.4.0 -gcc-name=gcc-5.4.0" …``
+to propagate those options through cmake.
+
+You may have to add the path of the library to ```$LD_LIBRARY_PATH`` for the
+linker.
+
 Static builds
 ^^^^^^^^^^^^^
 
diff --git a/manual/source/Infrastructure/Use/Install.rst b/manual/source/Infrastructure/Use/Install.rst
index 85dadac..97f7d48 100644
--- a/manual/source/Infrastructure/Use/Install.rst
+++ b/manual/source/Infrastructure/Use/Install.rst
@@ -32,27 +32,27 @@ SeqAn is available natively on the following platforms.
     
     <br/>
 
-+---------------------------+--------------------+----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
-| Operating System          | Package Name       | Command                                      | links                                                                                                                                                        |
-+============+==============+====================+==============================================+==============================================================================================================================================================+
-| **G** |br| | Arch         |                    |                                              | `AUR <https://aur.archlinux.org/packages/?O=0&K=seqan>`__                                                                                                    |
-| **N** |br| +--------------+--------------------+----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
-| **U** |br| | Debian       | libseqan2-dev      | ``apt install libseqan2-dev``                | `info <https://packages.debian.org/search?keywords=libseqan2-dev>`__ | `contact <mailto:debian-med-packaging()lists.alioth.debian.org>`__                    |
-| / |br|     +--------------+--------------------+----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
-| **L** |br| | Fedora       | seqan-devel        | ``yum install seqan-devel``                  | `info <https://apps.fedoraproject.org/packages/seqan-devel>`__ | `contact <mailto:sagitter()fedoraproject.org>`__                                            |
-| **I** |br| +--------------+--------------------+----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
-| **N** |br| | Gentoo       | seqan              | ``emerge sci-biology/seqan``                 | `info <https://packages.gentoo.org/packages/sci-biology/seqan>`__ | `contact <mailto:sci-biology at gentoo.org>`__                                              |
-| **U** |br| +--------------+--------------------+----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
-| **X** |br| | Ubuntu       | seqan-dev          | ``apt install seqan-dev``                    | `info <http://packages.ubuntu.com/xenial/seqan-dev>`__ | `contact <mailto:ubuntu-motu()lists.ubuntu.com>`__                                                  |
-+------------+--------------+--------------------+----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
-| **M** |br| | Homebrew     | seqan              | ``brew install homebrew/science/seqan``      | `info <http://braumeister.org/repos/Homebrew/homebrew-science/formula/seqan>`__ | `contact <mailto:tim()tim-smith.us>`__                                     |
-| **A** |br| +--------------+--------------------+----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
-| **C** |br| | MacPorts     | seqan              | ``port install seqan``                       | `info <https://trac.macports.org/browser/trunk/dports/science/seqan/Portfile>`__ | `contact <mailto:rene.rahn()fu-berlin.de>`__                              |
-+------------+--------------+--------------------+----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
-| **B** |br| | FreeBSD      | seqan              | ``pkg install seqan``                        | `info <http://freshports.org/biology/seqan>`__ | `contact <mailto:h2+fbsdports()fsfe.org>`__                                                                 |
-| **S** |br| +--------------+--------------------+----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
-| **D** |br| | OpenBSD      | seqan              | ``pkg_add seqan``                            | `info <http://openports.se/biology/seqan>`__ | `contact <mailto:h2+fbsdports()fsfe.org>`__                                                                   |
-+------------+--------------+--------------------+----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+
++-------------------------+----------------+-----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+| Operating System        | Package Name   | Command                                 | links                                                                                                                                                                  |
++============+============+================+=========================================+========================================================================================================================================================================+
+| **G** |br| | Arch       | seqan (AUR)    |  *depends*                              | `info <https://aur.archlinux.org/packages/seqan/>`__                                                                                                                   |
+| **N** |br| +------------+----------------+-----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+| **U** |br| | Debian     | libseqan2-dev  | ``apt install libseqan2-dev``           | `info <https://packages.debian.org/search?keywords=libseqan2-dev>`__ | `contact <mailto:debian-med-packaging()lists.alioth.debian.org>`__                              |
+| / |br|     +------------+----------------+-----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+| **L** |br| | Fedora     | seqan2-headers | ``yum install seqan2-headers``          | `info <https://apps.fedoraproject.org/packages/seqan2-headers>`__ | `contact <mailto:sagitter()fedoraproject.org>`__                                                   |
+| **I** |br| +------------+----------------+-----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+| **N** |br| | Gentoo     | seqan          | ``emerge sci-biology/seqan``            | `info <https://packages.gentoo.org/packages/sci-biology/seqan>`__ | `contact <mailto:sci-biology at gentoo.org>`__                                                        |
+| **U** |br| +------------+----------------+-----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+| **X** |br| | Ubuntu     | libseqan2-dev  | ``apt install libseqan2-dev``           | `info <https://packages.ubuntu.com/search?keywords=libseqan2-dev&searchon=names&suite=all&section=all>`__ | `contact <mailto:ubuntu-devel-discuss at lists.ubuntu.com>`__ |
++------------+------------+----------------+-----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+| **M** |br| | Homebrew   | seqan          | ``brew install homebrew/science/seqan`` | `info <http://braumeister.org/repos/Homebrew/homebrew-science/formula/seqan>`__ | `contact <mailto:tim()tim-smith.us>`__                                               |
+| **A** |br| +------------+----------------+-----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+| **C** |br| | MacPorts   | seqan          | ``port install seqan``                  | `info <https://trac.macports.org/browser/trunk/dports/science/seqan/Portfile>`__ | `contact <mailto:rene.rahn()fu-berlin.de>`__                                        |
++------------+------------+----------------+-----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+| **B** |br| | FreeBSD    | seqan          | ``pkg install seqan``                   | `info <http://freshports.org/biology/seqan>`__ | `contact <mailto:h2+fbsdports()fsfe.org>`__                                                                           |
+| **S** |br| +------------+----------------+-----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+| **D** |br| | OpenBSD    | seqan          | ``pkg_add seqan``                       | `info <http://openports.se/biology/seqan>`__ | `contact <mailto:h2+fbsdports()fsfe.org>`__                                                                             |
++------------+------------+----------------+-----------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
 
 You should execute the above commands in a terminal as the ``root`` user or prefix them with ``sudo``. If you have problems installing the package on your operating system, or it is outdated, please write to the contact shown above (and replace ``()`` in the e-mail-address with ``@``).
 
diff --git a/manual/source/Tutorial/Algorithms/PatternMatching/OptimalSearchSchemes.rst b/manual/source/Tutorial/Algorithms/PatternMatching/OptimalSearchSchemes.rst
new file mode 100644
index 0000000..3bbf82f
--- /dev/null
+++ b/manual/source/Tutorial/Algorithms/PatternMatching/OptimalSearchSchemes.rst
@@ -0,0 +1,72 @@
+.. sidebar:: ToC
+
+    .. contents::
+
+.. _tutorial-algorithms-optimal-search-schemes:
+
+Optimal Search Schemes
+======================
+
+Learning Objective
+  In this tutorial you will learn how to search a known pattern in a string or :dox:`StringSet` using a bidirectional index.
+  The implemented algorithm in SeqAn is based on Optimal Search Schemes from the `FAMOUS paper <https://arxiv.org/abs/1711.02035>`_ which allows for searching for up to 4 errors based on Hamming distance or Edit distance.
+
+Difficulty
+  Average
+
+Duration
+  15 min
+
+Prerequisites
+  :ref:`tutorial-datastructures-sequences`, :ref:`tutorial-datastructures-indices`
+
+Overview
+--------
+
+Searching in an index with more than two errors is computationally very expensive and thus trivial approaches such as simple backtracking are not recommended.
+Optimal Search Schemes make use of a bidirectional index, split the pattern to be searched into multiple pieces and enumerate it in a more efficient fashion.
+To use this algorithm, you can simply call the ``find()`` method.
+
+.. includefrags:: demos/tutorial/indices/find2_index_approx.cpp
+      :fragment: SinglePattern
+
+The first argument is the delegate function that will be called if a match of the pattern is found.
+It gets an iterator of the bidirectional index and you can choose how to proceed with the hits.
+Additionally it passes a reference to the original pattern searched as well as the number of errors for the current hit in the index.
+
+.. includefrags:: demos/tutorial/indices/find2_index_approx.cpp
+      :fragment: Delegate
+
+The second argument has to be a bidirectional index, currently SeqAn offers only bidirectional FM indices.
+(Please check the corresponding tutorial on :ref:`tutorial-datastructures-indices-fm-index` for more information how FM indices can be configured and constructed.)
+
+The third argument is a :dox:`String` that you want to search.
+
+The number of allowed errors (lower and upper bounds) are passed as template arguments.
+Please note that these parameters have to be ``constexpr``.
+The distance metric is passed as fourth argument. You can choose between ``HammingDistance()`` and ```EditDistance()`` (also known as Levenshtein distance).
+
+You also have to possibility to pass a :dox:`StringSet` of patterns to search instead of a single :dox:`String`.
+The search can then be parallized by passing a fifth parameter tag ``Parallel()`` instead of ``Serial()``.
+
+.. includefrags:: demos/tutorial/indices/find2_index_approx.cpp
+      :fragment: MultiplePatterns
+
+.. warning::
+
+      Please be aware that the same hits might be reported multiple times and you might have to filter these duplicated depending on your application, especially with larger errors numbers.
+
+.. note::
+
+      When searching a StringSet in parallel mode the delegate is likely being executed by different threads at the same time.
+      You have to take care by yourself that the threads do not interfere, e.g. write not into a variable simultaneously.
+      One way of achieving this is by using lock guards.
+      The following example buffers all hits in a set (to filter duplicates) and prints them afterwards.
+
+      .. includefrags:: demos/tutorial/indices/find2_index_approx.cpp
+            :fragment: ParallelMode
+
+Here is a complete example for searching a string or a stringset (in serial mode):
+
+.. includefrags:: demos/tutorial/indices/find2_index_approx.cpp
+      :fragment: Complete
diff --git a/manual/source/Tutorial/Algorithms/PatternMatching/index.rst b/manual/source/Tutorial/Algorithms/PatternMatching/index.rst
index 4d3a8e2..3bf752e 100644
--- a/manual/source/Tutorial/Algorithms/PatternMatching/index.rst
+++ b/manual/source/Tutorial/Algorithms/PatternMatching/index.rst
@@ -9,6 +9,7 @@ Pattern Matching
 
     OnlinePatternMatching
     IndexedPatternMatching
+    OptimalSearchSchemes
 
 Pattern matching is about searching a known string or :dox:`StringSet` (``needle``) in another string or :dox:`StringSet` (``haystack``).
 This tutorial will introduce you into the SeqAn classes :dox:`Finder` and :dox:`Pattern`.
@@ -34,3 +35,4 @@ The :dox:`Pattern` can be asked for the number of the found sequence if the ``ne
 Subsequent calls of find can be used to find more occurrences of the ``needle``, until no more occurrences can be found and find returns ``false``.
 
 In general, search algorithms can be divided into algorithms that preprocess the ``needle`` (online search) or preprocess the ``haystack`` (index search).
+The additional section on Optimal Search Schemes is also an indexed search algorithm but due to a different interface separated into its own section.
diff --git a/manual/source/Tutorial/DataStructures/Indices/StringIndices.rst b/manual/source/Tutorial/DataStructures/Indices/StringIndices.rst
index 29dcd06..8a31f62 100644
--- a/manual/source/Tutorial/DataStructures/Indices/StringIndices.rst
+++ b/manual/source/Tutorial/DataStructures/Indices/StringIndices.rst
@@ -47,6 +47,22 @@ We will now show how we can create the different indices in SeqAn before we show
 All the mentioned indices belong to the generic :dox:`Index` class.
 A SeqAn index needs two pieces of information: the type of the :dox:`String` or :dox:`StringSet` to be indexed and the index specialization, such as :dox:`IndexEsa` or :dox:`FMIndex`.
 
+.. important::
+
+    Indices based on suffix arrays (also including the FM index) are built using secondary memory.
+    When building large indices, it is therefore possible to run out of disk space (in which case an exception will be
+    thrown).
+    To circumvent this, the directory used for temporary storage can be changed by specifying the TMPDIR environment variable (on UNIX)
+    respectively TEMP environment variable (on Windows):
+
+    .. code-block:: console
+
+       # export TMPDIR=/somewhere/else/with/more/space
+
+    .. code-block:: console
+
+       # SET TEMP=C:\somewhere\else\with\more\space
+
 The following code snippet creates an enhanced suffix array index of a string of type :dox:`Dna5`.
 
 .. includefrags:: demos/tutorial/indices/base.cpp
diff --git a/manual/source/Tutorial/DataStructures/Sequence/StringsAndSegments.rst b/manual/source/Tutorial/DataStructures/Sequence/StringsAndSegments.rst
index c960684..b521657 100644
--- a/manual/source/Tutorial/DataStructures/Sequence/StringsAndSegments.rst
+++ b/manual/source/Tutorial/DataStructures/Sequence/StringsAndSegments.rst
@@ -112,7 +112,7 @@ To empty a :dox:`String`, the function :dox:`StringConcept#clear` resets the obj
 .. includefrags:: demos/tutorial/sequences/example_functionality2.cpp
     :fragment: clear
 
-SeqAn offers a range of other functions for the work with the :dox:`String` class, e.g. :dox:`AssignableConcept#assign`, :dox:`RandomAccessContainerConcept#assignValue`, :dox:`RandomAccessContainerConcept#value`, :dox:`IteratorAssociatedTypesConcept#getValue`, :dox:`ContainerConcept#empty`, etc.
+SeqAn offers a range of other functions for the work with the :dox:`String` class, e.g. :dox:`AssignableConcept#assign`, :dox:`RandomAccessContainerConcept#assignValue`, :dox:`ContainerConcept#empty`, etc.
 The full list of functions you can find in the documentation :dox:`String`.
 
 Assignment 1
diff --git a/manual/source/Tutorial/GettingStarted/AFirstExample.rst b/manual/source/Tutorial/GettingStarted/AFirstExample.rst
index ff7446f..30f1004 100644
--- a/manual/source/Tutorial/GettingStarted/AFirstExample.rst
+++ b/manual/source/Tutorial/GettingStarted/AFirstExample.rst
@@ -108,6 +108,10 @@ Assignment 1
 
         .. includefrags:: demos/tutorial/a_first_example/solution_1.cpp
 
+        Your output should look like this:
+
+        .. includefrags:: demos/tutorial/a_first_example/solution_1.cpp.stdout
+
 SeqAn and Templates
 -------------------
 
@@ -223,6 +227,11 @@ Assignment 2
      .. container:: foldable
 
         .. includefrags:: demos/tutorial/a_first_example/solution_2.cpp
+           :fragment: all
+
+        Your output should look like this:
+
+        .. includefrags:: demos/tutorial/a_first_example/solution_2.cpp.stdout
 
 The Role of References in SeqAn
 -------------------------------
@@ -273,11 +282,15 @@ Assignment 3
         .. includefrags:: demos/tutorial/a_first_example/solution_3.cpp
            :fragment: head_local
 
-
    Solution
      .. container:: foldable
 
         .. includefrags:: demos/tutorial/a_first_example/solution_3.cpp
+           :fragment: all
+
+        Your output should look like this:
+
+        .. includefrags:: demos/tutorial/a_first_example/solution_3.cpp.stdout
 
 Generic and Reusable Code
 -------------------------
@@ -336,6 +349,12 @@ Assignment 4
 
         .. includefrags:: demos/tutorial/a_first_example/solution_4.cpp
 
+        Your output should look like this:
+
+        .. includefrags:: demos/tutorial/a_first_example/solution_4.cpp.stdout
+
+.. _oop-to-seqan:
+
 From Object-Oriented Programming to SeqAn
 -----------------------------------------
 
@@ -358,6 +377,7 @@ In addition, because they are so frequently used there are shortcuts as well.
 For example :dox:`Blosum62` is really a **shortcut** for ``Score<int, ScoreMatrix<AminoAcid, Blosum62_> >``, which is obviously very helpful.
 Other shortcuts are ``DnaString`` for ``String<Dna>`` (:ref:`sequence tutorial <tutorial-datastructures-sequences>`), ``CharString`` for ``String<char>``, ...
 
+.. _template-subclassing:
 .. tip::
 
    Template Subclassing
@@ -388,6 +408,10 @@ Assignment 5
 
         .. includefrags:: demos/tutorial/a_first_example/solution_5.cpp
 
+        Your output should look like this:
+
+        .. includefrags:: demos/tutorial/a_first_example/solution_5.cpp.stdout
+
 Tags in SeqAn
 -------------
 
@@ -453,6 +477,10 @@ Assignment 6
 
         .. includefrags:: demos/tutorial/a_first_example/solution_6.cpp
 
+        Your output should look like this:
+
+        .. includefrags:: demos/tutorial/a_first_example/solution_6.cpp.stdout
+
 Obviously this is only a toy example in which we could have named the two ``print()`` functions differently.
 However, often this is not the case when the programs become more complex.
 Because SeqAn is very generic we do not know the datatypes of template functions in advance.
@@ -470,5 +498,7 @@ There are several tutorials which will teach you how to use the different SeqAn
 Below you find the complete code for our example with the corresponding output.
 
 .. includefrags:: demos/tutorial/a_first_example/final_result.cpp
-   :fragment: result
 
+Your output should look like this:
+
+.. includefrags:: demos/tutorial/a_first_example/final_result.cpp.stdout
diff --git a/manual/source/Tutorial/GettingStarted/BackgroundAndMotivation.rst b/manual/source/Tutorial/GettingStarted/BackgroundAndMotivation.rst
index 68d4c63..55d08a4 100644
--- a/manual/source/Tutorial/GettingStarted/BackgroundAndMotivation.rst
+++ b/manual/source/Tutorial/GettingStarted/BackgroundAndMotivation.rst
@@ -135,11 +135,11 @@ With the words of the C++ inventor `Bjarne Stroustrup <http://www.artima.com/int
 OOP vs. Generic Programming
 ---------------------------
 
-In SeqAn, we use a technique called `template subclassing <tutorial-getting-started-template-subclassing>`_ which is based on generic programming.
+In SeqAn, we use a technique called :ref:`template subclassing <template-subclassing>` which is based on generic programming.
 This technique provides `polymorphism <http://en.wikipedia.org/wiki/Polymorphism_in_object-oriented_programming>`_ into C++ programs at **compile time** using templates.
 Such static polymorphism is different from **runtime polymorphism** which is supported in C++ using subclassing and virtual functions.
 It comes at the cost of some additional typing but has the advantage that the compiler can inline all function calls and thus achieve better performance.
-An example will be given in `the section "From OOP to SeqAn" in the First Steps Tutorial <tutorial-getting-started-first-steps-in-seqan>`_.
+An example will be given in :ref:`the section "From OOP to SeqAn" in the First Example Tutorial <oop-to-seqan>`.
 
 .. todo::
     We need a little code example here.
diff --git a/manual/source/Tutorial/GettingStarted/ParsingCommandLineArguments.rst b/manual/source/Tutorial/GettingStarted/ParsingCommandLineArguments.rst
index 1ec9471..3a58016 100644
--- a/manual/source/Tutorial/GettingStarted/ParsingCommandLineArguments.rst
+++ b/manual/source/Tutorial/GettingStarted/ParsingCommandLineArguments.rst
@@ -302,7 +302,7 @@ Feature-Complete Example Program
 --------------------------------
 
 The command line parsing part of our program is done now.
-Let us now add a function ``modifyText()`` that is given a ``ModifyStringOptions`` object and text and modifies the text.
+Let us now add a function ``modifyString()`` that is given a ``ModifyStringOptions`` object and text and modifies the text.
 We simply use the C standard library functios ``toupper()`` and ``tolower()`` from the header ``<cctype>`` for converting to upper and lower case.
 
 .. includefrags:: demos/tutorial/parsing_command_line_arguments/example_with_modifyString.cpp
diff --git a/manual/source/Tutorial/HowTo/Recipes/CustomFileEndings.rst b/manual/source/Tutorial/HowTo/Recipes/CustomFileEndings.rst
new file mode 100644
index 0000000..a7f2133
--- /dev/null
+++ b/manual/source/Tutorial/HowTo/Recipes/CustomFileEndings.rst
@@ -0,0 +1,89 @@
+.. sidebar:: ToC
+
+    .. contents::
+
+.. _how-to-recipes-custom-file-endings:
+
+Custom File Endings
+===================
+
+SeqAn's File-I/O uses file endings to determine the format of the file, e.g. whether to read in a sequence file
+in **FASTA** format or an alignment file in **BAM** format.
+Without this, it would be very cumbersome to guess the correct file format in order to use the correct parsing
+algorithm.
+However, in some use cases application developer might want to extend the fixed endings by their own endings.
+This might be useful when writing applications for workflow systems, which might add arbitrary endings to
+the respective files. Using SeqAn to read in a file with unsupported file ending would raise an exception,
+which helps to spot user errors much easier.
+
+In the following we will describe how to extend the file formats for existing parsers in SeqAn.
+The central data structure when reading formatted files is the :dox:`FormattedFile` class.
+The formatted file is used to select the file type to be parsed and whether it should open an input (for reading) or an
+output stream (for writing).
+For example you can use the :dox:`SeqFileIn` to read sequence files.
+We will use the ``SeqFileIn`` to show how to extend the known file extensions with a custom one, namely a ``.fa.dat``
+extension.
+
+In the beginning we include all necessary headers:
+
+.. includefrags:: demos/howto/custom_file_endings.cpp
+   :fragment: includes
+
+The first step to our own format is the definition of our own sequence input file which we will call ``MySeqFileIn``.
+To do so, we define a new tag with a unique name, like ``MyFastaAdaptor``.
+We use this tag to specialize the :dox:`SeqFileIn`, which can be done by using the third template parameter.
+The following code snippet shows the defintion.
+
+.. includefrags:: demos/howto/custom_file_endings.cpp
+   :fragment: custom_file
+
+Next, we define our custom format.
+Again we define a new tag, which uniquely represents our new format.
+In this example we call it ``MySeqFormat``. Given this new format tag, we extend the already existing format TagList
+of the input sequence file by defining a new TagList.
+
+.. hint::
+
+   The :dox:`TagList` allows us to create a list of tags, which can be recursively iterated by a tag-apply function, to
+   map a runtime value to it's corresponding tag and by thus employing tag-dispatching to the corresponding function.
+   This might induce a certain compile time overhead, but it does not infer any runtime polymorphism.
+
+Two more steps are required.
+First, we have to overload a metafunction called ``FileFormat`` for our newly defined ``MySeqFileIn`` type, which we use
+to declare a :dox:`TagSelector` type for our extended format TagList called ``MySeqInFormats``.
+This meta-function will be used internally to test if the provided file extension format is contained in the format list
+by the principle explained in the hint box above.
+To finish the format definition we need to tell how the magic header looks like.
+A magic header is used to determine the correct file format if the extension cannot be known.
+This is for example the case, if the data is read from an input stream rather than a file.
+
+The following code snippet will demonstrate the adaption we need to make to our code:
+
+.. includefrags:: demos/howto/custom_file_endings.cpp
+   :fragment: custom_format
+
+After we added our custom file and custom format, we now have to specify the actual extension.
+This is shown here:
+
+.. includefrags:: demos/howto/custom_file_endings.cpp
+   :fragment: custom_extension
+
+Therefore, we overload the ``FileExtensions`` value meta-function with our defined ``MySeqFormat`` tag, which defines
+in an array of ``char *``` with one element in it, namely our `.fa.dat` extension.
+
+The last step before we can use our extended format tag is to tell SeqAn what to do, if a file is read with our custom
+file ending.
+This can be simply achieved by overloading the respective :dox:`FormattedFileIn#readRecord` function by using our
+``MySeqFormat`` tag:
+
+.. includefrags:: demos/howto/custom_file_endings.cpp
+   :fragment: custom_read_record
+
+Now we are ready to use our new file extension in a real application, which would otherwise cause an :dox:`IOError`.
+
+.. includefrags:: demos/howto/custom_file_endings.cpp
+   :fragment: main
+
+The output of this example would be:
+
+.. includefrags:: demos/howto/custom_file_endings.cpp.stdout
diff --git a/manual/source/seqan.bib b/manual/source/seqan.bib
index d3b6e79..fe09f03 100644
--- a/manual/source/seqan.bib
+++ b/manual/source/seqan.bib
@@ -125,17 +125,6 @@
   publisher={Wiley Online Library}
 }
 
- at article{Langmead2009,
-  doi={10.1186/gb-2009-10-3-r25},
-  title={Ultrafast and memory-efficient alignment of short DNA sequences to the human genome},
-  author={Langmead, Ben and Trapnell, Cole and Pop, Mihai and Salzberg, Steven L and others},
-  journal={Genome Biol},
-  volume={10},
-  number={3},
-  pages={R25},
-  year={2009}
-}
-
 @article{Mortazavi2008,
   doi={10.1038/nmeth.1226},
   title={Mapping and quantifying mammalian transcriptomes by RNA-Seq},
diff --git a/tests/align/CMakeLists.txt b/tests/align/CMakeLists.txt
index c028716..e3dc3ec 100644
--- a/tests/align/CMakeLists.txt
+++ b/tests/align/CMakeLists.txt
@@ -12,9 +12,10 @@ message (STATUS "Configuring tests/align")
 
 set (ALIGN_SIMD_TEST TRUE CACHE INTERNAL "Whether to build test_align_simd.")
 # workaround a bug in llvm35 on FreeBSD
-if ((${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") AND
+if ((SEQAN_TRAVIS_BUILD) OR
+    ((${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") AND
     (COMPILER_CLANG) AND
-    (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.6.0))
+    (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.6.0)))
     set (ALIGN_SIMD_TEST FALSE CACHE INTERNAL "Whether to build test_align_simd.")
 endif ()
 
@@ -66,12 +67,44 @@ target_link_libraries (test_align ${SEQAN_LIBRARIES})
 
 if (ALIGN_SIMD_TEST)
     # Add executable for simd tests.
-    add_executable (test_align_simd
-                    test_align_simd.cpp
-                    test_align_simd.h)
+    add_executable (test_align_simd_global_equal_length
+                    test_align_simd_global_equal_length.cpp
+                    test_align_simd_base.h
+                    test_align_simd_global.h
+                    test_mock.h)
+
+    add_executable (test_align_simd_global_variable_length
+                    test_align_simd_global_variable_length.cpp
+                    test_align_simd_base.h
+                    test_align_simd_global.h
+                    test_mock.h)
+
+    add_executable (test_align_simd_local_equal_length
+                    test_align_simd_local_equal_length.cpp
+                    test_align_simd_base.h
+                    test_align_simd_local.h
+                    test_mock.h)
+
+    add_executable (test_align_simd_local_variable_length
+                    test_align_simd_local_variable_length.cpp
+                    test_align_simd_base.h
+                    test_align_simd_local.h
+                    test_mock.h)
 
     # Add dependencies found by find_package (SeqAn).
-    target_link_libraries (test_align_simd ${SEQAN_LIBRARIES})
+    target_link_libraries (test_align_simd_global_equal_length ${SEQAN_LIBRARIES})
+    target_link_libraries (test_align_simd_global_variable_length ${SEQAN_LIBRARIES})
+    target_link_libraries (test_align_simd_local_equal_length ${SEQAN_LIBRARIES})
+    target_link_libraries (test_align_simd_local_variable_length ${SEQAN_LIBRARIES})
+    # note(marehr): there is a bug when using <=clang3.8 with gcc4.9's stdlib,
+    # where the default -ftemplate-depth=256 of clang is insufficient.
+    # test_align_simd_avx2 needs a depth of at least 266.
+    if (COMPILER_CLANG)
+      target_compile_options(test_align_simd_global_equal_length PRIVATE -ftemplate-depth=1024)
+      target_compile_options(test_align_simd_global_variable_length PRIVATE -ftemplate-depth=1024)
+      target_compile_options(test_align_simd_local_equal_length PRIVATE -ftemplate-depth=1024)
+      target_compile_options(test_align_simd_local_variable_length PRIVATE -ftemplate-depth=1024)
+    endif()
 endif()
 
 # Add CXX flags found by find_package (SeqAn).
@@ -83,5 +116,9 @@ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SEQAN_CXX_FLAGS}")
 
 add_test (NAME test_test_align COMMAND $<TARGET_FILE:test_align>)
 if (ALIGN_SIMD_TEST)
-    add_test (NAME test_test_align_simd COMMAND $<TARGET_FILE:test_align_simd>)
+    include (SeqAnSimdUtility)
+    add_simd_platform_tests(test_align_simd_global_equal_length)
+    add_simd_platform_tests(test_align_simd_global_variable_length)
+    add_simd_platform_tests(test_align_simd_local_equal_length)
+    add_simd_platform_tests(test_align_simd_local_variable_length)
 endif ()
diff --git a/tests/align/test_align.cpp b/tests/align/test_align.cpp
index 762f45b..1cd06bf 100644
--- a/tests/align/test_align.cpp
+++ b/tests/align/test_align.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -189,9 +189,9 @@ SEQAN_BEGIN_TESTSUITE(test_align)
     // Test DPCell.
     // ----------------------------------------------------------------------------
 
-	SEQAN_CALL_TEST(test_dp_cell_value);
-	SEQAN_CALL_TEST(test_dp_cell_reference);
-	SEQAN_CALL_TEST(test_dp_cell_default_infinity);
+    SEQAN_CALL_TEST(test_dp_cell_value);
+    SEQAN_CALL_TEST(test_dp_cell_reference);
+    SEQAN_CALL_TEST(test_dp_cell_default_infinity);
 
     SEQAN_CALL_TEST(test_dp_cell_linear_constructor);
     SEQAN_CALL_TEST(test_dp_cell_linear_copy_constructor);
@@ -274,31 +274,24 @@ SEQAN_BEGIN_TESTSUITE(test_align)
     // Test DPMatrix Navigator.
     // ----------------------------------------------------------------------------
 
-    SEQAN_CALL_TEST(test_alignment_dp_matrix_navigator_score_matrix_full_constructor);
     SEQAN_CALL_TEST(test_alignment_dp_matrix_navigator_score_matrix_full_init_unbanded);
     SEQAN_CALL_TEST(test_alignment_dp_matrix_navigator_score_matrix_full_init_banded);
     SEQAN_CALL_TEST(test_alignment_dp_matrix_navigator_score_matrix_full_go_next_cell);
     SEQAN_CALL_TEST(test_alignment_dp_matrix_navigator_score_matrix_full_assign_value);
     SEQAN_CALL_TEST(test_alignment_dp_matrix_navigator_score_matrix_full_value);
-    SEQAN_CALL_TEST(test_alignment_dp_matrix_navigator_score_matrix_full_previous_cell_diagonal);
     SEQAN_CALL_TEST(test_alignment_dp_matrix_navigator_score_matrix_full_previous_cell_horizontal);
-    SEQAN_CALL_TEST(test_alignment_dp_matrix_navigator_score_matrix_full_previous_cell_vertical);
     SEQAN_CALL_TEST(test_alignment_dp_matrix_navigator_score_matrix_full_coordinate);
     SEQAN_CALL_TEST(test_alignment_dp_matrix_navigator_score_matrix_full_container);
 
-    SEQAN_CALL_TEST(test_alignment_dp_matrix_navigator_score_matrix_sparse_constructor);
     SEQAN_CALL_TEST(test_alignment_dp_matrix_navigator_score_matrix_sparse_init_unbanded);
     SEQAN_CALL_TEST(test_alignment_dp_matrix_navigator_score_matrix_sparse_init_banded);
     SEQAN_CALL_TEST(test_alignment_dp_matrix_navigator_score_matrix_sparse_go_next);
     SEQAN_CALL_TEST(test_alignment_dp_matrix_navigator_score_matrix_sparse_assign_value);
     SEQAN_CALL_TEST(test_alignment_dp_matrix_navigator_score_matrix_sparse_value);
-    SEQAN_CALL_TEST(test_alignment_dp_matrix_navigator_score_matrix_sparse_previous_cell_diagonal);
     SEQAN_CALL_TEST(test_alignment_dp_matrix_navigator_score_matrix_sparse_previous_cell_horizontal);
-    SEQAN_CALL_TEST(test_alignment_dp_matrix_navigator_score_matrix_sparse_previous_cell_vertical);
     SEQAN_CALL_TEST(test_alignment_dp_matrix_navigator_score_matrix_sparse_coordinate);
     SEQAN_CALL_TEST(test_alignment_dp_matrix_navigator_score_matrix_sparse_container);
 
-    SEQAN_CALL_TEST(test_alignment_dp_matrix_navigator_trace_matrix_constructor);
     SEQAN_CALL_TEST(test_alignment_dp_matrix_navigator_trace_matrix_enabled_init_unbanded);
     SEQAN_CALL_TEST(test_alignment_dp_matrix_navigator_trace_matrix_disabled_init_unbanded);
     SEQAN_CALL_TEST(test_alignment_dp_matrix_navigator_trace_matrix_enabled_init_banded);
@@ -308,6 +301,7 @@ SEQAN_BEGIN_TESTSUITE(test_align)
     SEQAN_CALL_TEST(test_alignment_dp_matrix_navigator_trace_matrix_enabled_value);
     SEQAN_CALL_TEST(test_alignment_dp_matrix_navigator_trace_matrix_enabled_coordinate);
     SEQAN_CALL_TEST(test_alignment_dp_matrix_navigator_trace_matrix_enabled_container);
+    SEQAN_CALL_TEST(test_alignment_dp_matrix_navigator_trace_matrix_enabled_to_global_position);
 
     // ----------------------------------------------------------------------------
     // Test Recursion Formula.
diff --git a/tests/align/test_align_align.h b/tests/align/test_align_align.h
index 155309a..dbaad03 100644
--- a/tests/align/test_align_align.h
+++ b/tests/align/test_align_align.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/align/test_align_alignment_operations.h b/tests/align/test_align_alignment_operations.h
index 37325b4..b723ecc 100644
--- a/tests/align/test_align_alignment_operations.h
+++ b/tests/align/test_align_alignment_operations.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/align/test_align_fragment.h b/tests/align/test_align_fragment.h
index 1f6f303..a35ce64 100644
--- a/tests/align/test_align_fragment.h
+++ b/tests/align/test_align_fragment.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/align/test_align_gaps.h b/tests/align/test_align_gaps.h
index 51eb950..55c7551 100644
--- a/tests/align/test_align_gaps.h
+++ b/tests/align/test_align_gaps.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/align/test_align_gaps_iterator.h b/tests/align/test_align_gaps_iterator.h
index dc4e353..58c06fa 100644
--- a/tests/align/test_align_gaps_iterator.h
+++ b/tests/align/test_align_gaps_iterator.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/align/test_align_global_alignment.h b/tests/align/test_align_global_alignment.h
index 72f950e..cc9db9a 100644
--- a/tests/align/test_align_global_alignment.h
+++ b/tests/align/test_align_global_alignment.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/align/test_align_global_alignment_banded.h b/tests/align/test_align_global_alignment_banded.h
index d17a649..fd77803 100644
--- a/tests/align/test_align_global_alignment_banded.h
+++ b/tests/align/test_align_global_alignment_banded.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/align/test_align_global_alignment_score.h b/tests/align/test_align_global_alignment_score.h
index 7851f75..fdf58ab 100644
--- a/tests/align/test_align_global_alignment_score.h
+++ b/tests/align/test_align_global_alignment_score.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/align/test_align_global_alignment_specialized.h b/tests/align/test_align_global_alignment_specialized.h
index 515609c..042462f 100644
--- a/tests/align/test_align_global_alignment_specialized.h
+++ b/tests/align/test_align_global_alignment_specialized.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/align/test_align_local_alignment.h b/tests/align/test_align_local_alignment.h
index 50defbe..6a566bd 100644
--- a/tests/align/test_align_local_alignment.h
+++ b/tests/align/test_align_local_alignment.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/align/test_align_matrix.h b/tests/align/test_align_matrix.h
index 780dac3..062b321 100644
--- a/tests/align/test_align_matrix.h
+++ b/tests/align/test_align_matrix.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/align/test_align_myers.h b/tests/align/test_align_myers.h
index 5b40248..84a8c4e 100644
--- a/tests/align/test_align_myers.h
+++ b/tests/align/test_align_myers.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/align/test_align_simd.h b/tests/align/test_align_simd.h
deleted file mode 100644
index 7da774c..0000000
--- a/tests/align/test_align_simd.h
+++ /dev/null
@@ -1,559 +0,0 @@
-// ==========================================================================
-//                 SeqAn - The Library for Sequence Analysis
-// ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-//     * Redistributions of source code must retain the above copyright
-//       notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above copyright
-//       notice, this list of conditions and the following disclaimer in the
-//       documentation and/or other materials provided with the distribution.
-//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
-//       its contributors may be used to endorse or promote products derived
-//       from this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
-// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
-// DAMAGE.
-//
-// ==========================================================================
-// Author: Rene Rahn <rene.rahn at fu-berlin.de>
-// ==========================================================================
-
-#ifndef TESTS_ALIGN_TEST_ALIGN_SIMD_H_
-#define TESTS_ALIGN_TEST_ALIGN_SIMD_H_
-
-#include <tuple>
-
-#include <seqan/basic.h>
-#include <seqan/align.h>
-
-namespace impl
-{
-namespace test_align_simd
-{
-
-struct TestAlignSimdVariableLength_;
-using VariableLengthSimd = seqan::Tag<TestAlignSimdVariableLength_>;
-
-struct TestAlignSimdEqualLength_;
-using EqualLengthSimd = seqan::Tag<TestAlignSimdEqualLength_>;
-
-template <typename TAlphabet, typename TSimdLength>
-struct TestSequences_;
-
-template <>
-struct TestSequences_<seqan::Dna, EqualLengthSimd>
-{
-    using TSeq = seqan::String<seqan::Dna>;
-
-    static auto
-    getSequences()
-    {
-        seqan::StringSet<TSeq> set;
-        appendValue(set, "AGCGACTGCAAACATCAGATCAGAG");
-        appendValue(set, "TAATACTAGCATGCGATAAGTCCCT");
-        appendValue(set, "GGCACGTGGATGGTTTAGAGGAATC");
-        appendValue(set, "AGATTCAAGTCTGGTTAACCATCAA");
-        appendValue(set, "ACAGGTCTTGAGTCTAAAATTGTCG");
-        appendValue(set, "TCTCCTGCGTACGAGATGGAAATAC");
-        appendValue(set, "TAGGTAACTACAGGGACTCCGACGT");
-        appendValue(set, "TATGTACGTTGCTCCGTCAGAGGCG");
-
-        appendValue(set, "CCATTCAGGATCACGTTACCGCGAA");
-        appendValue(set, "AAAAAGGGACCAGGAGCTCTTCTCC");
-        appendValue(set, "CCTGCGGTCACGTCTATAGAAATTA");
-        appendValue(set, "CACCATTAACCCTCCTGAGAACCGG");
-        appendValue(set, "GAGGCGGGAATCCGTCACGTATGAG");
-        appendValue(set, "AAGGTATTTGCCCGATAATCAATAC");
-        appendValue(set, "CCCAGGCTTCTAACTTTTTCCACTC");
-        appendValue(set, "GCTTGAGCCGGCTAGGCCTTTCTGC");
-
-        appendValue(set, "ATCTCGGGTCCTGCCCAACCGGTCT");
-        appendValue(set, "AACAAGGGACCAGGAGCTCTTCTCC");
-        appendValue(set, "ACACGCTAATATAGCGAATCACCGA");
-        appendValue(set, "GAACCCGGCGCCACGCAATGGAACG");
-        appendValue(set, "TCCTTAACTCCGGCAGGCAATTAAA");
-        appendValue(set, "ACAGAAAAATAGGCGAATGAATCTT");
-        appendValue(set, "GGGAACGTATGTATAACGCAAAAAA");
-        appendValue(set, "TTCTCTGTGTATCGAAGAATGGCCT");
-
-        appendValue(set, "CCGAAGTTTCGATGGACTGGTGCCA");
-        appendValue(set, "ACGCGCAGGCATAGTTTTAGGAGAA");
-        appendValue(set, "TTATTCGGGGGCAGTGACAACCAAC");
-
-        seqan::StringSet<TSeq>  set2(set);
-        std::sort(seqan::begin(set2, seqan::Standard()), seqan::end(set2, seqan::Standard()),
-                  [](auto& strA, auto& strB){ return seqan::isLess(strA, strB); });
-        return std::make_tuple(set, set2);
-    }
-};
-
-template <>
-struct TestSequences_<seqan::Dna, VariableLengthSimd>
-{
-    using TSeq = seqan::String<seqan::Dna>;
-
-    static auto
-    getSequences()
-    {
-        seqan::StringSet<TSeq> set;
-        appendValue(set, "AGCGACTGCAAACATCAGATCAGAGGTAGAG");
-        appendValue(set, "TAATACTAGCATGCGATAAGTCCCT");
-        appendValue(set, "GGCACGTGTGGTTTAGAGGAATC");
-        appendValue(set, "AGATTCAAGTCTGGTTAACCATCAA");
-        appendValue(set, "ACAGGTCTTGAGTCTAAAATTGTCGAA");
-        appendValue(set, "TCTCCTGCGTACGAGATGGAAATAC");
-        appendValue(set, "TAGGTAACTACAGGGACACGT");
-        appendValue(set, "TATGTACGTCTCCGTCAGAGGCG");
-
-        appendValue(set, "CCATTCAGGATCACGTTACCGCGAAGTACCC");
-        appendValue(set, "AAGGGACCAGGAGCTCTTCTCC");
-        appendValue(set, "CCTGCGGTCACGTCTATAGAAATT");
-        appendValue(set, "CACCATTAACCCTCCTGAGAACCGAGTAGG");
-        appendValue(set, "GAGGCGGGAATCCGTCACGTATGAG");
-        appendValue(set, "AAGGTATTTGCCCGATAATCAATACGATGAGATAGAGAGATAGAATAGAGAAGGGACCGCGCATGACTACGATCGACTGACTACGA");
-        appendValue(set, "CGAGTATATCGAGAGAGGTCACG");
-        appendValue(set, "GCTTGAGCCGGCTAGGCTCTGC");
-
-        appendValue(set, "ATCTCGGGTCCTGCCAACCGGTCT");
-        appendValue(set, "AAAAAGGGACCAGGAGCTCTTCTCC");
-        appendValue(set, "ACACGCTAATATAGCGAATCACCGA");
-        appendValue(set, "AATGGAACG");
-        appendValue(set, "TCCTTAACTCCGGCAGGCAATTATACCGGACTGACACTTAAA");
-        appendValue(set, "ACAGAAAAATAGGCGAATGAAACACTCTT");
-        appendValue(set, "GGGAACGTATGTATAACGCAAAAA");
-        appendValue(set, "TTCTCTGTGTATCGAAGAATGCT");
-
-        appendValue(set, "CCGAAGTTTCGATGGATGGATTCCACACACCTGGTGCCA");
-        appendValue(set, "ACGCGCAGGCATAGTTGGAGAA");
-        appendValue(set, "TTATTCGGGGGCAGTGACAACACTTAGCGACTAC");
-        
-        auto set2(set);
-        std::sort(seqan::begin(set2, seqan::Standard()), seqan::end(set2, seqan::Standard()),
-                  [](auto& strA, auto& strB){ return seqan::isLess(strA, strB); });
-        return std::make_tuple(set, set2);
-    }
-};
-
-template <>
-struct TestSequences_<seqan::AminoAcid, EqualLengthSimd>
-{
-    using TSeq = seqan::String<seqan::AminoAcid>;
-
-    static auto
-    getSequences()
-    {
-        seqan::StringSet<TSeq> set;
-        appendValue(set, "FNQSAEYPDISLHCGVLKWRATLGT");
-        appendValue(set, "EIKSDVLLHRPGNIGMQVAESYFAT");
-        appendValue(set, "PIIMWSMKNRTIERLPTGVLMISHT");
-        appendValue(set, "FMATNEKVHCACGADYQMIIDCNEA");
-        appendValue(set, "MFHQTSNANWMFVSNKFHIKFGTLD");
-        appendValue(set, "SNEMGQCFPHEPACFFDKDFRLFIN");
-        appendValue(set, "FPWAHYVVHTLREHRKDANHRSTSY");
-        appendValue(set, "QYRNTESMGCEMRCFTETIMIAGVA");
-
-        appendValue(set, "VVRMDGKEVLKQHVPTYADKHPTGQ");
-        appendValue(set, "TMLKWCEWCFAEFPPFASEPKFPPN");
-        appendValue(set, "GTWGWVDGVHHTMGEQCGPGRACWG");
-        appendValue(set, "ECDFQTWYFYCVNQEIFELFICCMG");
-        appendValue(set, "KRRELNGQERGGWWTVDGPGVSMGT");
-        appendValue(set, "CWAAHYVCWRTKQKQLVAFQRLNCI");
-        appendValue(set, "NRLVGFQIHCFLIRCVEPGQTHTID");
-        appendValue(set, "AYYVRGFMMGQMYGRPVILMTFTKP");
-
-        appendValue(set, "SFTQPVELHIPHYWWHLAYFMIMFY");
-        appendValue(set, "PMNKMFDFNNHQDLLTFTKRFPTPW");
-        appendValue(set, "VIPMIYHDWSIISALMMQKDIYYIA");
-        appendValue(set, "TPGMWGMATLTGNFNSIFVSKYVKN");
-        appendValue(set, "GKELWGMVIARAGMAVQNMYSRDTF");
-        appendValue(set, "VHASDLYAKCYSNCVYQENIDIAEV");
-        appendValue(set, "KQSGTLSGPQYWENVHRVLEDYPKE");
-        appendValue(set, "DPHGYCFYEGTFAWDVEVHEFNNKD");
-
-        appendValue(set, "NMQDVIGGKSLAQHSSVTYKAQQEH");
-        appendValue(set, "CQTPRWECSLNFDEKEAADLMIDVS");
-        appendValue(set, "PMMDLDHCMLIECLRPHNRDNCARH");
-
-        decltype(set) set2(set);
-        std::sort(seqan::begin(set2, seqan::Standard()), seqan::end(set2, seqan::Standard()),
-                  [](auto& strA, auto& strB){ return seqan::isLess(strA, strB); });
-        return std::make_tuple(set, set2);
-    }
-};
-
-template <>
-struct TestSequences_<seqan::AminoAcid, VariableLengthSimd>
-{
-    using TSeq = seqan::String<seqan::AminoAcid>;
-
-    static auto
-    getSequences()    {
-        seqan::StringSet<TSeq> set;
-        appendValue(set, "FNQSAEYPDISHCGVMQLKWRATLGT");
-        appendValue(set, "EIKSDVLLHRWSMKNPGNILMIDVGMQVAESYFAT");
-        appendValue(set, "PIIMWSMKNRTIEPTGLMISHT");
-        appendValue(set, "FMATNEKVHCACGWSMKNADLMIDVYQMIIDCNEA");
-        appendValue(set, "MWSMKNFHQTSNANWMFVSNMQKFHIKFGTLD");
-        appendValue(set, "SNEGQCFPHEPACFWSMKFDKDFRLFIN");
-        appendValue(set, "FPWAHYVVHTLREHMQRKDANHRSTSY");
-        appendValue(set, "QYRNTWSMKNESMGCEMRFLMIVTETIMIAGVA");
-
-        appendValue(set, "VVRMDGKEVLWSMKNKQHVPTYADKHPTGQ");
-        appendValue(set, "TMLKWCEWCFALMIDVEFPPFASEPKFPPN");
-        appendValue(set, "GTWGVDGVHHWSMWSMKNLMIDVTMGEQCGPGRACWG");
-        appendValue(set, "ECDFQTWYFYCVNQMQEIFELFICCMG");
-        appendValue(set, "KRREWSMKNLNGQERGGWWTVDGPGVSMGT");
-        appendValue(set, "CWAAHYCWRWWSMKNSMKNTKLMIDVQMQKQLVAFQRLNCI");
-        appendValue(set, "NRLVGFQIHCFIRCVEPGQTHTID");
-        appendValue(set, "AYYVRGFMMGQMMQYGRPVILMTFTKP");
-
-        appendValue(set, "SFTQPVELHIPHYWLMIDVWHLAYFMIMFY");
-        appendValue(set, "PMNKMFDFNHQMQDLLTFTKPTPW");
-        appendValue(set, "VIPMIYHDWSIISALMMLMIDVQKDIYYIA");
-        appendValue(set, "TPGMWGMATLTGMQNFNSFVSKYVKN");
-        appendValue(set, "GKELWGMVIARAGMAVQNLMIDVMYSRDTF");
-        appendValue(set, "VHASDLWSNYAKCYSNCVYQEIDIAEV");
-        appendValue(set, "KQSGTLSMQGPYWENVHRVLLMIDVEDYPKE");
-        appendValue(set, "DPHGYCFMQYEGTFAWDVEVHEFNNKD");
-
-        appendValue(set, "NMQDVIGGKSLAQHSSVTYAQQEH");
-        appendValue(set, "CQTPRWECMQSLNFDEKEAADLMIDVS");
-        appendValue(set, "PMMDLDWSMKNMLIECLRPHNRMQDNLMIDVCARH");
-        
-        auto set2(set);
-        std::sort(seqan::begin(set2, seqan::Standard()), seqan::end(set2, seqan::Standard()),
-                  [](auto& strA, auto& strB){ return seqan::isLess(strA, strB); });
-        return std::make_tuple(set, set2);
-    }
-};
-
-struct LocalAlignTester_
-{
-    template <typename TAlign,
-              typename TScoreValue, typename TScoreSpec,
-              typename TConfig>
-    static auto
-    run(TAlign & align,
-        seqan::Score<TScoreValue, TScoreSpec> const & score,
-        TConfig const &,
-        int const lDiag,
-        int const uDiag)
-    {
-        if (lDiag == seqan::MinValue<int>::VALUE && uDiag == seqan::MaxValue<int>::VALUE)
-            return localAlignment(align, score);
-        else
-            return localAlignment(align, score, lDiag, uDiag);
-    }
-};
-
-struct GlobalAlignTester_
-{
-    template <typename TAlign,
-              typename TScoreValue, typename TScoreSpec,
-              typename TConfig>
-    static auto
-    run(TAlign & align,
-        seqan::Score<TScoreValue, TScoreSpec> const & score,
-        TConfig const & config,
-        int const lDiag,
-        int const uDiag)
-    {
-        if (lDiag == seqan::MinValue<int>::VALUE && uDiag == seqan::MaxValue<int>::VALUE)
-            return globalAlignment(align, score, config);
-        else
-            return globalAlignment(align, score, config, lDiag, uDiag);
-    }
-};
-
-struct GlobalAlignScoreTester_
-{
-    template <typename TStringsH,
-              typename TStringsV,
-              typename TScoreValue, typename TScoreSpec,
-              typename TConfig>
-    static auto
-    run(TStringsH const & strH,
-        TStringsV const & strV,
-        seqan::Score<TScoreValue, TScoreSpec> const & score,
-        TConfig const & config,
-        int const lDiag,
-        int const uDiag)
-    {
-        if (lDiag == seqan::MinValue<int>::VALUE && uDiag == seqan::MaxValue<int>::VALUE)
-            return globalAlignmentScore(strH, strV, score, config);
-        else
-            return globalAlignmentScore(strH, strV, score, config, lDiag, uDiag);
-    }
-};
-}  // namespace test_align_simd
-}  // namespace impl
-
-// ----------------------------------------------------------------------------
-// Class SimdAlignTest
-// ----------------------------------------------------------------------------
-
-// Common test class instance, which stores the types to be accessed.
-template <typename TTuple>
-class SimdAlignTest : public seqan::Test
-{
-public:
-    using TAlignConfig = std::tuple_element_t<0, TTuple>;
-    using TLengthParam = std::tuple_element_t<1, TTuple>;
-    using TBandSwitch = std::tuple_element_t<2, TTuple>;
-};
-
-// ----------------------------------------------------------------------------
-// Configuration of typed tests for global alignment.
-// ----------------------------------------------------------------------------
-
-template <typename T>
-class SimdAlignTestCommon : public SimdAlignTest<T>
-{};
-
-typedef
-        seqan::TagList<std::tuple<seqan::AlignConfig<>,                         impl::test_align_simd::EqualLengthSimd,     seqan::BandOff>,
-        seqan::TagList<std::tuple<seqan::AlignConfig<>,                         impl::test_align_simd::VariableLengthSimd,  seqan::BandOff>,
-        seqan::TagList<std::tuple<seqan::AlignConfig<true, true, true, true>,   impl::test_align_simd::EqualLengthSimd,     seqan::BandOff>,
-        seqan::TagList<std::tuple<seqan::AlignConfig<true, true, true, true>,   impl::test_align_simd::VariableLengthSimd,  seqan::BandOff>,
-        seqan::TagList<std::tuple<seqan::AlignConfig<true, false, false, true>, impl::test_align_simd::EqualLengthSimd,     seqan::BandOff>,
-        seqan::TagList<std::tuple<seqan::AlignConfig<true, false, false, true>, impl::test_align_simd::VariableLengthSimd,  seqan::BandOff>,
-        seqan::TagList<std::tuple<seqan::AlignConfig<false, true, true, false>, impl::test_align_simd::EqualLengthSimd,     seqan::BandOff>,
-        seqan::TagList<std::tuple<seqan::AlignConfig<false, true, true, false>, impl::test_align_simd::VariableLengthSimd,  seqan::BandOff>,
-        seqan::TagList<std::tuple<seqan::AlignConfig<>,                         impl::test_align_simd::EqualLengthSimd,     seqan::BandOn>,
-        seqan::TagList<std::tuple<seqan::AlignConfig<true, true, true, true>,   impl::test_align_simd::EqualLengthSimd,     seqan::BandOn>,
-        seqan::TagList<std::tuple<seqan::AlignConfig<true, false, false, true>, impl::test_align_simd::EqualLengthSimd,     seqan::BandOn>,
-        seqan::TagList<std::tuple<seqan::AlignConfig<false, true, true, false>, impl::test_align_simd::EqualLengthSimd,     seqan::BandOn>
-        > > > > > > > > > > > > SimdAlignTestCommonCommonTypes;
-
-SEQAN_TYPED_TEST_CASE(SimdAlignTestCommon, SimdAlignTestCommonCommonTypes);
-
-// ----------------------------------------------------------------------------
-// Configuration of typed tests for local alignment.
-// ----------------------------------------------------------------------------
-
-template <typename T>
-class SimdAlignLocalTestCommon : public SimdAlignTest<T>
-{};
-
-typedef
-        seqan::TagList<std::tuple<seqan::AlignConfig<>, impl::test_align_simd::EqualLengthSimd,    seqan::BandOff>,
-        seqan::TagList<std::tuple<seqan::AlignConfig<>, impl::test_align_simd::VariableLengthSimd, seqan::BandOff>,
-        seqan::TagList<std::tuple<seqan::AlignConfig<>, impl::test_align_simd::EqualLengthSimd,    seqan::BandOn>
-        > > > SimdAlignLocalTestCommonCommonTypes;
-
-SEQAN_TYPED_TEST_CASE(SimdAlignLocalTestCommon, SimdAlignLocalTestCommonCommonTypes);
-
-// ----------------------------------------------------------------------------
-// Function testAlignSimd()
-// ----------------------------------------------------------------------------
-
-template <typename TAlphabet,
-          typename TFunctor,
-          typename TScoreValue, typename TScoreSpec,
-          typename TAlignConfig,
-          typename TSimdLength>
-void testAlignSimd(TFunctor const &,
-                   seqan::Score<TScoreValue, TScoreSpec> const & score,
-                   TAlignConfig const & config,
-                   TSimdLength const & /*tag*/,
-                   int const lDiag = seqan::MinValue<int>::VALUE,
-                   int const uDiag = seqan::MaxValue<int>::VALUE)
-{
-    auto sets = impl::test_align_simd::TestSequences_<TAlphabet, TSimdLength>::getSequences();
-
-    // Prepare an align object with the sequences.
-    seqan::StringSet<seqan::Align<seqan::String<TAlphabet> > > alignments;
-    resize(alignments, length(std::get<0>(sets)));
-    auto zipCont = makeZipView(alignments, std::get<0>(sets), std::get<1>(sets));
-
-    for(auto tuple : zipCont)
-    {
-        resize(rows(std::get<0>(tuple)), 2);
-        assignSource(row(std::get<0>(tuple), 0), std::get<1>(tuple));
-        assignSource(row(std::get<0>(tuple), 1), std::get<2>(tuple));
-    }
-
-    // Run the SIMD accelerated alignment.
-    seqan::String<TScoreValue> scores = TFunctor::run(alignments, score, config, lDiag, uDiag);
-    SEQAN_ASSERT_EQ(length(scores), length(alignments));
-
-    // Check correctness of alignments using sequential alignment.
-    auto zipRes = makeZipView(scores, alignments);
-    for(auto res : zipRes)
-    {
-        typename std::decay<decltype(std::get<1>(res))>::type goldAlign;
-        resize(rows(goldAlign), 2);
-        assignSource(row(goldAlign, 0), source(row(std::get<1>(res), 0)));
-        assignSource(row(goldAlign, 1), source(row(std::get<1>(res), 1)));
-
-        TScoreValue goldScore = TFunctor::run(goldAlign, score, config, lDiag, uDiag);
-
-        SEQAN_ASSERT_EQ(std::get<0>(res), goldScore);
-        SEQAN_ASSERT(row(std::get<1>(res), 0) == row(goldAlign, 0));
-        SEQAN_ASSERT(row(std::get<1>(res), 1) == row(goldAlign, 1));
-    }
-}
-
-// Helper function to set band parameters.
-template <typename TAlphabet,
-          typename TFunctor,
-          typename TScoreValue, typename TScoreSpec,
-          typename TAlignConfig,
-          typename TSimdLength,
-          typename TBandFlag>
-void testAlignSimd(TFunctor const &,
-                   seqan::Score<TScoreValue, TScoreSpec> const & score,
-                   TAlignConfig const & config,
-                   TSimdLength const & /*tag*/,
-                   TBandFlag const &)
-{
-    if (seqan::IsSameType<TBandFlag, seqan::BandOff>::VALUE)
-        testAlignSimd<TAlphabet>(TFunctor(), score, config, TSimdLength());
-    else
-        testAlignSimd<TAlphabet>(TFunctor(), score, config, TSimdLength(), -4, 6);
-}
-
-// ----------------------------------------------------------------------------
-// Function testAlignScoreSimd()
-// ----------------------------------------------------------------------------
-
-template <typename TAlphabet,
-          typename TTester,
-          typename TScoreValue, typename TScoreSpec,
-          typename TAlignConfig,
-          typename TSimdLength>
-void testAlignSimdScore(TTester const &,
-                        seqan::Score<TScoreValue, TScoreSpec> const & score,
-                        TAlignConfig const & config,
-                        TSimdLength const & /*tag*/,
-                        int const lDiag = seqan::MinValue<int>::VALUE,
-                        int const uDiag = seqan::MaxValue<int>::VALUE)
-{
-    auto sets = impl::test_align_simd::TestSequences_<TAlphabet, TSimdLength>::getSequences();
-
-    seqan::String<TScoreValue> scores = TTester::run(std::get<0>(sets), std::get<1>(sets), score, config, lDiag, uDiag);
-
-    SEQAN_ASSERT_EQ(length(scores), length(std::get<0>(sets)));
-
-    auto zipRes = makeZipView(scores, std::get<0>(sets), std::get<1>(sets));
-    for(auto res : zipRes)
-    {
-        TScoreValue goldScore = TTester::run(std::get<1>(res), std::get<2>(res), score, config, lDiag, uDiag);
-        SEQAN_ASSERT_EQ(std::get<0>(res), goldScore);
-    }
-}
-
-// Helper function to set band parameters.
-template <typename TAlphabet,
-          typename TFunctor,
-          typename TScoreValue, typename TScoreSpec,
-          typename TAlignConfig,
-          typename TSimdLength,
-          typename TBandFlag>
-void testAlignSimdScore(TFunctor const &,
-                        seqan::Score<TScoreValue, TScoreSpec> const & score,
-                        TAlignConfig const & config,
-                        TSimdLength const & /*tag*/,
-                        TBandFlag const &)
-{
-    if (seqan::IsSameType<TBandFlag, seqan::BandOff>::VALUE)
-        testAlignSimdScore<TAlphabet>(TFunctor(), score, config, TSimdLength());
-    else
-        testAlignSimdScore<TAlphabet>(TFunctor(), score, config, TSimdLength(), -4, 6);
-}
-
-// ----------------------------------------------------------------------------
-// Global Alignments.
-// ----------------------------------------------------------------------------
-
-SEQAN_TYPED_TEST(SimdAlignTestCommon, Linear_Align)
-{
-    using TAlignConf = typename TestFixture::TAlignConfig;
-    using TLengthParam = typename TestFixture::TLengthParam;
-    using TBandSwitch = typename TestFixture::TBandSwitch;
-
-    testAlignSimd<seqan::Dna>(impl::test_align_simd::GlobalAlignTester_(), seqan::Score<int>(2, -1, -1),
-                              TAlignConf(), TLengthParam(), TBandSwitch());
-    testAlignSimd<seqan::AminoAcid>(impl::test_align_simd::GlobalAlignTester_(), seqan::Blosum62(-2),
-                                    TAlignConf(), TLengthParam(), TBandSwitch());
-}
-
-SEQAN_TYPED_TEST(SimdAlignTestCommon, Linear_Score)
-{
-    using TAlignConf = typename TestFixture::TAlignConfig;
-    using TLengthParam = typename TestFixture::TLengthParam;
-    using TBandSwitch = typename TestFixture::TBandSwitch;
-
-    testAlignSimdScore<seqan::Dna>(impl::test_align_simd::GlobalAlignScoreTester_(), seqan::Score<int>(2, -1, -1),
-                                   TAlignConf(), TLengthParam(), TBandSwitch());
-    testAlignSimdScore<seqan::AminoAcid>(impl::test_align_simd::GlobalAlignScoreTester_(), seqan::Blosum62(-2),
-                                         TAlignConf(), TLengthParam(), TBandSwitch());
-}
-
-SEQAN_TYPED_TEST(SimdAlignTestCommon, Affine_Align)
-{
-    using TAlignConf = typename TestFixture::TAlignConfig;
-    using TLengthParam = typename TestFixture::TLengthParam;
-    using TBandSwitch = typename TestFixture::TBandSwitch;
-
-    testAlignSimd<seqan::Dna>(impl::test_align_simd::GlobalAlignTester_(), seqan::Score<int>(2, -1, -1, -3),
-                              TAlignConf(), TLengthParam(), TBandSwitch());
-    testAlignSimd<seqan::AminoAcid>(impl::test_align_simd::GlobalAlignTester_(), seqan::Blosum62(-2, -4),
-                                    TAlignConf(), TLengthParam(), TBandSwitch());
-}
-
-SEQAN_TYPED_TEST(SimdAlignTestCommon, Affine_Score)
-{
-    using TAlignConf = typename TestFixture::TAlignConfig;
-    using TLengthParam = typename TestFixture::TLengthParam;
-    using TBandSwitch = typename TestFixture::TBandSwitch;
-
-    testAlignSimdScore<seqan::Dna>(impl::test_align_simd::GlobalAlignScoreTester_(), seqan::Score<int>(2, -1, -1, -3),
-                                   TAlignConf(), TLengthParam(), TBandSwitch());
-    testAlignSimdScore<seqan::AminoAcid>(impl::test_align_simd::GlobalAlignScoreTester_(), seqan::Blosum62(-2, -4),
-                                         TAlignConf(), TLengthParam(), TBandSwitch());
-}
-
-// ----------------------------------------------------------------------------
-// Local Alignments.
-// ----------------------------------------------------------------------------
-
-SEQAN_TYPED_TEST(SimdAlignLocalTestCommon, Linear_Align)
-{
-    using TAlignConf = typename TestFixture::TAlignConfig;
-    using TLengthParam = typename TestFixture::TLengthParam;
-    using TBandSwitch = typename TestFixture::TBandSwitch;
-
-    testAlignSimd<seqan::Dna>(impl::test_align_simd::LocalAlignTester_(), seqan::Score<int>(2, -1, -1),
-                              TAlignConf(), TLengthParam(), TBandSwitch());
-    testAlignSimd<seqan::AminoAcid>(impl::test_align_simd::LocalAlignTester_(), seqan::Blosum62(-2),
-                                    TAlignConf(), TLengthParam(), TBandSwitch());
-}
-
-SEQAN_TYPED_TEST(SimdAlignLocalTestCommon, Affine_Align)
-{
-    using TAlignConf = typename TestFixture::TAlignConfig;
-    using TLengthParam = typename TestFixture::TLengthParam;
-    using TBandSwitch = typename TestFixture::TBandSwitch;
-
-    testAlignSimd<seqan::Dna>(impl::test_align_simd::LocalAlignTester_(), seqan::Score<int>(2, -1, -1, -3),
-                              TAlignConf(), TLengthParam(), TBandSwitch());
-    testAlignSimd<seqan::AminoAcid>(impl::test_align_simd::LocalAlignTester_(), seqan::Blosum62(-2, -4),
-                                    TAlignConf(), TLengthParam(), TBandSwitch());
-}
-
-#endif  // #ifndef TESTS_ALIGN_TEST_ALIGN_SIMD_H_
diff --git a/tests/align/test_align_simd_base.h b/tests/align/test_align_simd_base.h
new file mode 100644
index 0000000..debeebd
--- /dev/null
+++ b/tests/align/test_align_simd_base.h
@@ -0,0 +1,270 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Rene Rahn <rene.rahn at fu-berlin.de>
+// ==========================================================================
+
+#ifndef TESTS_ALIGN_TEST_ALIGN_SIMD_BASE_H_
+#define TESTS_ALIGN_TEST_ALIGN_SIMD_BASE_H_
+
+#include <tuple>
+
+#include <seqan/basic.h>
+#include <seqan/align.h>
+
+#include "test_mock.h"
+
+// ----------------------------------------------------------------------------
+// Class SimdAlignTest
+// ----------------------------------------------------------------------------
+
+// Common test class instance, which stores the types to be accessed.
+template <typename TTuple>
+class SimdAlignTest : public seqan::Test
+{
+public:
+    using TAlignConfig = std::tuple_element_t<0, TTuple>;
+    using TLengthParam = std::tuple_element_t<1, TTuple>;
+    using TBandSwitch = std::tuple_element_t<2, TTuple>;
+};
+
+namespace impl
+{
+namespace test_align_simd
+{
+
+struct LocalAlignTester_
+{
+    template <typename TAlign,
+              typename TScoreValue, typename TScoreSpec,
+              typename TConfig>
+    static auto
+    run(TAlign & align,
+        seqan::Score<TScoreValue, TScoreSpec> const & score,
+        TConfig const &,
+        int const lDiag,
+        int const uDiag)
+    {
+        if (lDiag == std::numeric_limits<int>::min() && uDiag == std::numeric_limits<int>::max())
+            return localAlignment(align, score);
+        else
+            return localAlignment(align, score, lDiag, uDiag);
+    }
+};
+
+struct GlobalAlignTester_
+{
+    template <typename TAlign,
+              typename TScoreValue, typename TScoreSpec,
+              typename TConfig>
+    static auto
+    run(TAlign & align,
+        seqan::Score<TScoreValue, TScoreSpec> const & score,
+        TConfig const & config,
+        int const lDiag,
+        int const uDiag)
+    {
+        if (lDiag == std::numeric_limits<int>::min() && uDiag == std::numeric_limits<int>::max())
+            return globalAlignment(align, score, config);
+        else
+            return globalAlignment(align, score, config, lDiag, uDiag);
+    }
+};
+
+struct GlobalAlignScoreTester_
+{
+    template <typename TStringsH,
+              typename TStringsV,
+              typename TScoreValue, typename TScoreSpec,
+              typename TConfig>
+    static auto
+    run(TStringsH const & strH,
+        TStringsV const & strV,
+        seqan::Score<TScoreValue, TScoreSpec> const & score,
+        TConfig const & config,
+        int const lDiag,
+        int const uDiag)
+    {
+        if (lDiag == std::numeric_limits<int>::min() && uDiag == std::numeric_limits<int>::max())
+            return globalAlignmentScore(strH, strV, score, config);
+        else
+            return globalAlignmentScore(strH, strV, score, config, lDiag, uDiag);
+    }
+};
+
+struct LocalScoreTester_
+{
+    template <typename TStringsH,
+              typename TStringsV,
+              typename TScoreValue, typename TScoreSpec,
+              typename TConfig>
+    static auto
+    run(TStringsH const & strH,
+        TStringsV const & strV,
+        seqan::Score<TScoreValue, TScoreSpec> const & score,
+        TConfig const & /*config*/,
+        int const lDiag,
+        int const uDiag)
+    {
+        if (lDiag == seqan::MinValue<int>::VALUE && uDiag == seqan::MaxValue<int>::VALUE)
+            return localAlignmentScore(strH, strV, score);
+        else
+            return localAlignmentScore(strH, strV, score, lDiag, uDiag);
+    }
+};
+}  // namespace test_align_simd
+}  // namespace impl
+
+// ----------------------------------------------------------------------------
+// Function testAlignSimd()
+// ----------------------------------------------------------------------------
+
+template <typename TAlphabet,
+          typename TFunctor,
+          typename TScoreValue, typename TScoreSpec,
+          typename TAlignConfig,
+          typename TSimdLength>
+void testAlignSimd(TFunctor const &,
+                   seqan::Score<TScoreValue, TScoreSpec> const & score,
+                   TAlignConfig const & config,
+                   TSimdLength const & /*tag*/,
+                   int const lDiag = std::numeric_limits<int>::min(),
+                   int const uDiag = std::numeric_limits<int>::max())
+{
+    auto sets = impl::test_align_mock::TestSequences_<TAlphabet, TSimdLength>::getSequences();
+
+    // Prepare an align object with the sequences.
+    seqan::StringSet<seqan::Align<seqan::String<TAlphabet> > > alignments;
+    resize(alignments, length(std::get<0>(sets)));
+    auto zipCont = makeZipView(alignments, std::get<0>(sets), std::get<1>(sets));
+
+    for (auto tuple : zipCont)
+    {
+        resize(rows(std::get<0>(tuple)), 2);
+        assignSource(row(std::get<0>(tuple), 0), std::get<1>(tuple));
+        assignSource(row(std::get<0>(tuple), 1), std::get<2>(tuple));
+    }
+
+    // Run the SIMD accelerated alignment.
+    seqan::String<TScoreValue> scores = TFunctor::run(alignments, score, config, lDiag, uDiag);
+    SEQAN_ASSERT_EQ(length(scores), length(alignments));
+
+    // Check correctness of alignments using sequential alignment.
+    // NOTE(rrahn): There seems to be a bug with the intel compiler and the zipView.
+    // The following works without running into the problem, but we need to investigate the issue at some point.
+    auto itBeg = makeZipIterator(begin(scores, seqan::Standard()), begin(alignments, seqan::Standard()));
+    auto itEnd = makeZipIterator(end(scores, seqan::Standard()), end(alignments, seqan::Standard()));
+
+    for (auto it = itBeg; it != itEnd; ++it)
+    {
+        auto res = *it;
+        typename std::decay<decltype(std::get<1>(res))>::type goldAlign;
+        resize(rows(goldAlign), 2);
+        assignSource(row(goldAlign, 0), source(row(std::get<1>(res), 0)));
+        assignSource(row(goldAlign, 1), source(row(std::get<1>(res), 1)));
+
+        TScoreValue goldScore = TFunctor::run(goldAlign, score, config, lDiag, uDiag);
+
+        SEQAN_ASSERT_EQ(std::get<0>(res), goldScore);
+        SEQAN_ASSERT(row(std::get<1>(res), 0) == row(goldAlign, 0));
+        SEQAN_ASSERT(row(std::get<1>(res), 1) == row(goldAlign, 1));
+    }
+}
+
+// Helper function to set band parameters.
+template <typename TAlphabet,
+          typename TFunctor,
+          typename TScoreValue, typename TScoreSpec,
+          typename TAlignConfig,
+          typename TSimdLength,
+          typename TBandFlag>
+void testAlignSimd(TFunctor const &,
+                   seqan::Score<TScoreValue, TScoreSpec> const & score,
+                   TAlignConfig const & config,
+                   TSimdLength const & /*tag*/,
+                   TBandFlag const &)
+{
+    if (seqan::IsSameType<TBandFlag, seqan::BandOff>::VALUE)
+        testAlignSimd<TAlphabet>(TFunctor(), score, config, TSimdLength());
+    else
+        testAlignSimd<TAlphabet>(TFunctor(), score, config, TSimdLength(), -4, 6);
+}
+
+// ----------------------------------------------------------------------------
+// Function testAlignScoreSimd()
+// ----------------------------------------------------------------------------
+
+template <typename TAlphabet,
+          typename TTester,
+          typename TScoreValue, typename TScoreSpec,
+          typename TAlignConfig,
+          typename TSimdLength>
+void testAlignSimdScore(TTester const &,
+                        seqan::Score<TScoreValue, TScoreSpec> const & score,
+                        TAlignConfig const & config,
+                        TSimdLength const & /*tag*/,
+                        int const lDiag = std::numeric_limits<int>::min(),
+                        int const uDiag = std::numeric_limits<int>::max())
+{
+    auto sets = impl::test_align_mock::TestSequences_<TAlphabet, TSimdLength>::getSequences();
+
+    seqan::String<TScoreValue> scores = TTester::run(std::get<0>(sets), std::get<1>(sets), score, config, lDiag, uDiag);
+
+    SEQAN_ASSERT_EQ(length(scores), length(std::get<0>(sets)));
+
+    auto zipRes = makeZipView(scores, std::get<0>(sets), std::get<1>(sets));
+    for (auto res : zipRes)
+    {
+        TScoreValue goldScore = TTester::run(std::get<1>(res), std::get<2>(res), score, config, lDiag, uDiag);
+        SEQAN_ASSERT_EQ(std::get<0>(res), goldScore);
+    }
+}
+
+// Helper function to set band parameters.
+template <typename TAlphabet,
+          typename TFunctor,
+          typename TScoreValue, typename TScoreSpec,
+          typename TAlignConfig,
+          typename TSimdLength,
+          typename TBandFlag>
+void testAlignSimdScore(TFunctor const &,
+                        seqan::Score<TScoreValue, TScoreSpec> const & score,
+                        TAlignConfig const & config,
+                        TSimdLength const & /*tag*/,
+                        TBandFlag const &)
+{
+    if (seqan::IsSameType<TBandFlag, seqan::BandOff>::VALUE)
+        testAlignSimdScore<TAlphabet>(TFunctor(), score, config, TSimdLength());
+    else
+        testAlignSimdScore<TAlphabet>(TFunctor(), score, config, TSimdLength(), -4, 6);
+}
+
+#endif  // #ifndef TESTS_ALIGN_TEST_ALIGN_SIMD_BASE_H_
diff --git a/tests/align/test_align_simd_global.h b/tests/align/test_align_simd_global.h
new file mode 100644
index 0000000..0d2a851
--- /dev/null
+++ b/tests/align/test_align_simd_global.h
@@ -0,0 +1,122 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Rene Rahn <rene.rahn at fu-berlin.de>
+// ==========================================================================
+
+#ifndef TESTS_ALIGN_TEST_ALIGN_SIMD_GLOBAL_H_
+#define TESTS_ALIGN_TEST_ALIGN_SIMD_GLOBAL_H_
+
+#include "test_align_simd_base.h"
+
+// ----------------------------------------------------------------------------
+// Global Alignments.
+// ----------------------------------------------------------------------------
+
+SEQAN_TYPED_TEST(SimdAlignTestCommon, Linear_Align)
+{
+    using TAlignConf = typename TestFixture::TAlignConfig;
+    using TLengthParam = typename TestFixture::TLengthParam;
+    using TBandSwitch = typename TestFixture::TBandSwitch;
+
+    testAlignSimd<seqan::Dna>(impl::test_align_simd::GlobalAlignTester_(), seqan::Score<int>(2, -1, -1),
+                              TAlignConf(), TLengthParam(), TBandSwitch());
+    testAlignSimd<seqan::AminoAcid>(impl::test_align_simd::GlobalAlignTester_(), seqan::Blosum62(-2),
+                                    TAlignConf(), TLengthParam(), TBandSwitch());
+}
+
+SEQAN_TYPED_TEST(SimdAlignTestCommon, Linear_Score)
+{
+    using TAlignConf = typename TestFixture::TAlignConfig;
+    using TLengthParam = typename TestFixture::TLengthParam;
+    using TBandSwitch = typename TestFixture::TBandSwitch;
+
+    testAlignSimdScore<seqan::Dna>(impl::test_align_simd::GlobalAlignScoreTester_(), seqan::Score<int>(2, -1, -1),
+                                   TAlignConf(), TLengthParam(), TBandSwitch());
+    testAlignSimdScore<seqan::AminoAcid>(impl::test_align_simd::GlobalAlignScoreTester_(), seqan::Blosum62(-2),
+                                         TAlignConf(), TLengthParam(), TBandSwitch());
+}
+
+SEQAN_TYPED_TEST(SimdAlignTestCommon, Affine_Align)
+{
+    using TAlignConf = typename TestFixture::TAlignConfig;
+    using TLengthParam = typename TestFixture::TLengthParam;
+    using TBandSwitch = typename TestFixture::TBandSwitch;
+
+    testAlignSimd<seqan::Dna>(impl::test_align_simd::GlobalAlignTester_(), seqan::Score<int>(2, -1, -1, -3),
+                              TAlignConf(), TLengthParam(), TBandSwitch());
+    testAlignSimd<seqan::AminoAcid>(impl::test_align_simd::GlobalAlignTester_(), seqan::Blosum62(-2, -4),
+                                    TAlignConf(), TLengthParam(), TBandSwitch());
+}
+
+SEQAN_TYPED_TEST(SimdAlignTestCommon, Dynamic_Score_Matrix_Align)
+{
+    using namespace seqan;
+
+    using TAlignConf = typename TestFixture::TAlignConfig;
+    using TLengthParam = typename TestFixture::TLengthParam;
+    using TBandSwitch = typename TestFixture::TBandSwitch;
+
+    Score<int, ScoreMatrix<AminoAcid, ScoreSpecSelectable> > dynScore{-2, -4};
+    setScoreMatrixById(dynScore, AminoAcidScoreMatrixID::PAM120);
+
+    testAlignSimd<seqan::AminoAcid>(::impl::test_align_simd::GlobalAlignTester_(), dynScore,
+                                    TAlignConf(), TLengthParam(), TBandSwitch());
+}
+
+SEQAN_TYPED_TEST(SimdAlignTestCommon, Affine_Score)
+{
+    using TAlignConf = typename TestFixture::TAlignConfig;
+    using TLengthParam = typename TestFixture::TLengthParam;
+    using TBandSwitch = typename TestFixture::TBandSwitch;
+
+    testAlignSimdScore<seqan::Dna>(impl::test_align_simd::GlobalAlignScoreTester_(), seqan::Score<int>(2, -1, -1, -3),
+                                   TAlignConf(), TLengthParam(), TBandSwitch());
+    testAlignSimdScore<seqan::AminoAcid>(impl::test_align_simd::GlobalAlignScoreTester_(), seqan::Blosum62(-2, -4),
+                                         TAlignConf(), TLengthParam(), TBandSwitch());
+}
+
+SEQAN_TYPED_TEST(SimdAlignTestCommon, Dynamic_Score_Matrix)
+{
+    using namespace seqan;
+
+    using TAlignConf = typename TestFixture::TAlignConfig;
+    using TLengthParam = typename TestFixture::TLengthParam;
+    using TBandSwitch = typename TestFixture::TBandSwitch;
+
+    Score<int, ScoreMatrix<AminoAcid, ScoreSpecSelectable> > dynScore{-2, -4};
+    setScoreMatrixById(dynScore, AminoAcidScoreMatrixID::PAM120);
+
+    testAlignSimdScore<seqan::AminoAcid>(::impl::test_align_simd::GlobalAlignScoreTester_(), dynScore,
+                                         TAlignConf(), TLengthParam(), TBandSwitch());
+}
+
+#endif  // #ifndef TESTS_ALIGN_TEST_ALIGN_SIMD_GLOBAL_H_
diff --git a/tests/align/test_align_simd.cpp b/tests/align/test_align_simd_global_equal_length.cpp
similarity index 56%
copy from tests/align/test_align_simd.cpp
copy to tests/align/test_align_simd_global_equal_length.cpp
index 405b6b6..29f75b5 100644
--- a/tests/align/test_align_simd.cpp
+++ b/tests/align/test_align_simd_global_equal_length.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -32,10 +32,34 @@
 // Author: René Rahn <rene.rahn at fu-berlin.de>
 // ==========================================================================
 
+
 #include <seqan/basic.h>
 #include <seqan/stream.h>
 
-#include "test_align_simd.h"
+#include "test_align_simd_base.h"
+
+// ----------------------------------------------------------------------------
+// Configuration of typed tests for global alignment.
+// ----------------------------------------------------------------------------
+
+template <typename T>
+class SimdAlignTestCommon : public SimdAlignTest<T>
+{};
+
+typedef
+        seqan::TagList<std::tuple<seqan::AlignConfig<>,                         impl::test_align_mock::EqualLengthSimd,     seqan::BandOff>,
+        seqan::TagList<std::tuple<seqan::AlignConfig<true, true, true, true>,   impl::test_align_mock::EqualLengthSimd,     seqan::BandOff>,
+        seqan::TagList<std::tuple<seqan::AlignConfig<true, false, false, true>, impl::test_align_mock::EqualLengthSimd,     seqan::BandOff>,
+        seqan::TagList<std::tuple<seqan::AlignConfig<false, true, true, false>, impl::test_align_mock::EqualLengthSimd,     seqan::BandOff>,
+        seqan::TagList<std::tuple<seqan::AlignConfig<>,                         impl::test_align_mock::EqualLengthSimd,     seqan::BandOn>,
+        seqan::TagList<std::tuple<seqan::AlignConfig<true, true, true, true>,   impl::test_align_mock::EqualLengthSimd,     seqan::BandOn>,
+        seqan::TagList<std::tuple<seqan::AlignConfig<true, false, false, true>, impl::test_align_mock::EqualLengthSimd,     seqan::BandOn>,
+        seqan::TagList<std::tuple<seqan::AlignConfig<false, true, true, false>, impl::test_align_mock::EqualLengthSimd,     seqan::BandOn>
+        > > > > > > > > SimdAlignGlobalEqualLengthTestTypes;
+
+SEQAN_TYPED_TEST_CASE(SimdAlignTestCommon, SimdAlignGlobalEqualLengthTestTypes);
+
+#include "test_align_simd_global.h"
 
 int main(int argc, char const ** argv) {
     seqan::TestSystem::init(argc, argv);
diff --git a/tests/align/test_align_simd.cpp b/tests/align/test_align_simd_global_variable_length.cpp
similarity index 65%
copy from tests/align/test_align_simd.cpp
copy to tests/align/test_align_simd_global_variable_length.cpp
index 405b6b6..fe76430 100644
--- a/tests/align/test_align_simd.cpp
+++ b/tests/align/test_align_simd_global_variable_length.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -35,7 +35,26 @@
 #include <seqan/basic.h>
 #include <seqan/stream.h>
 
-#include "test_align_simd.h"
+#include "test_align_simd_base.h"
+
+// ----------------------------------------------------------------------------
+// Configuration of typed tests for global alignment.
+// ----------------------------------------------------------------------------
+
+template <typename T>
+class SimdAlignTestCommon : public SimdAlignTest<T>
+{};
+
+typedef
+        seqan::TagList<std::tuple<seqan::AlignConfig<>,                         impl::test_align_mock::VariableLengthSimd,  seqan::BandOff>,
+        seqan::TagList<std::tuple<seqan::AlignConfig<true, true, true, true>,   impl::test_align_mock::VariableLengthSimd,  seqan::BandOff>,
+        seqan::TagList<std::tuple<seqan::AlignConfig<true, false, false, true>, impl::test_align_mock::VariableLengthSimd,  seqan::BandOff>,
+        seqan::TagList<std::tuple<seqan::AlignConfig<false, true, true, false>, impl::test_align_mock::VariableLengthSimd,  seqan::BandOff>
+        > > > > SimdAlignGlobalVariableLengthTestTypes;
+
+SEQAN_TYPED_TEST_CASE(SimdAlignTestCommon, SimdAlignGlobalVariableLengthTestTypes);
+
+#include "test_align_simd_global.h"
 
 int main(int argc, char const ** argv) {
     seqan::TestSystem::init(argc, argv);
diff --git a/tests/align/test_align_simd_local.h b/tests/align/test_align_simd_local.h
new file mode 100644
index 0000000..f37a10e
--- /dev/null
+++ b/tests/align/test_align_simd_local.h
@@ -0,0 +1,122 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Rene Rahn <rene.rahn at fu-berlin.de>
+// ==========================================================================
+
+#ifndef TESTS_ALIGN_TEST_ALIGN_SIMD_LOCAL_H_
+#define TESTS_ALIGN_TEST_ALIGN_SIMD_LOCAL_H_
+
+#include "test_align_simd_base.h"
+
+// ----------------------------------------------------------------------------
+// Local Alignments.
+// ----------------------------------------------------------------------------
+
+SEQAN_TYPED_TEST(SimdAlignTestCommon, Linear_Align)
+{
+    using TAlignConf = typename TestFixture::TAlignConfig;
+    using TLengthParam = typename TestFixture::TLengthParam;
+    using TBandSwitch = typename TestFixture::TBandSwitch;
+
+    testAlignSimd<seqan::Dna>(impl::test_align_simd::LocalAlignTester_(), seqan::Score<int>(2, -1, -1),
+                              TAlignConf(), TLengthParam(), TBandSwitch());
+    testAlignSimd<seqan::AminoAcid>(impl::test_align_simd::LocalAlignTester_(), seqan::Blosum62(-2),
+                                    TAlignConf(), TLengthParam(), TBandSwitch());
+}
+
+SEQAN_TYPED_TEST(SimdAlignTestCommon, Linear_Score)
+{
+    using TAlignConf = typename TestFixture::TAlignConfig;
+    using TLengthParam = typename TestFixture::TLengthParam;
+    using TBandSwitch = typename TestFixture::TBandSwitch;
+
+    testAlignSimdScore<seqan::Dna>(impl::test_align_simd::LocalScoreTester_(), seqan::Score<int>(2, -1, -1),
+                                   TAlignConf(), TLengthParam(), TBandSwitch());
+    testAlignSimdScore<seqan::AminoAcid>(impl::test_align_simd::LocalScoreTester_(), seqan::Blosum62(-2),
+                                         TAlignConf(), TLengthParam(), TBandSwitch());
+}
+
+SEQAN_TYPED_TEST(SimdAlignTestCommon, Affine_Align)
+{
+    using TAlignConf = typename TestFixture::TAlignConfig;
+    using TLengthParam = typename TestFixture::TLengthParam;
+    using TBandSwitch = typename TestFixture::TBandSwitch;
+
+    testAlignSimd<seqan::Dna>(impl::test_align_simd::LocalAlignTester_(), seqan::Score<int>(2, -1, -1, -3),
+                              TAlignConf(), TLengthParam(), TBandSwitch());
+    testAlignSimd<seqan::AminoAcid>(impl::test_align_simd::LocalAlignTester_(), seqan::Blosum62(-2, -4),
+                                    TAlignConf(), TLengthParam(), TBandSwitch());
+}
+
+SEQAN_TYPED_TEST(SimdAlignTestCommon, Dynamic_Score_Matrix_Align)
+{
+    using namespace seqan;
+
+    using TAlignConf = typename TestFixture::TAlignConfig;
+    using TLengthParam = typename TestFixture::TLengthParam;
+    using TBandSwitch = typename TestFixture::TBandSwitch;
+
+    Score<int, ScoreMatrix<AminoAcid, ScoreSpecSelectable> > dynScore{-2, -4};
+    setScoreMatrixById(dynScore, AminoAcidScoreMatrixID::PAM120);
+
+    testAlignSimd<seqan::AminoAcid>(::impl::test_align_simd::LocalAlignTester_(), dynScore,
+                                    TAlignConf(), TLengthParam(), TBandSwitch());
+}
+
+SEQAN_TYPED_TEST(SimdAlignTestCommon, Affine_Score)
+{
+    using TAlignConf = typename TestFixture::TAlignConfig;
+    using TLengthParam = typename TestFixture::TLengthParam;
+    using TBandSwitch = typename TestFixture::TBandSwitch;
+
+    testAlignSimdScore<seqan::Dna>(impl::test_align_simd::LocalScoreTester_(), seqan::Score<int>(2, -1, -1, -3),
+                                   TAlignConf(), TLengthParam(), TBandSwitch());
+    testAlignSimdScore<seqan::AminoAcid>(impl::test_align_simd::LocalScoreTester_(), seqan::Blosum62(-2, -4),
+                                         TAlignConf(), TLengthParam(), TBandSwitch());
+}
+
+SEQAN_TYPED_TEST(SimdAlignTestCommon, Dynamic_Score_Matrix)
+{
+    using namespace seqan;
+
+    using TAlignConf = typename TestFixture::TAlignConfig;
+    using TLengthParam = typename TestFixture::TLengthParam;
+    using TBandSwitch = typename TestFixture::TBandSwitch;
+
+    Score<int, ScoreMatrix<AminoAcid, ScoreSpecSelectable> > dynScore{-2, -4};
+    setScoreMatrixById(dynScore, AminoAcidScoreMatrixID::PAM120);
+
+    testAlignSimdScore<seqan::AminoAcid>(::impl::test_align_simd::LocalScoreTester_(), dynScore,
+                                         TAlignConf(), TLengthParam(), TBandSwitch());
+}
+
+#endif  // #ifndef TESTS_ALIGN_TEST_ALIGN_SIMD_LOCAL_H_
diff --git a/tests/align/test_align_simd.cpp b/tests/align/test_align_simd_local_equal_length.cpp
similarity index 73%
copy from tests/align/test_align_simd.cpp
copy to tests/align/test_align_simd_local_equal_length.cpp
index 405b6b6..3a513f7 100644
--- a/tests/align/test_align_simd.cpp
+++ b/tests/align/test_align_simd_local_equal_length.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -35,7 +35,24 @@
 #include <seqan/basic.h>
 #include <seqan/stream.h>
 
-#include "test_align_simd.h"
+#include "test_align_simd_base.h"
+
+// ----------------------------------------------------------------------------
+// Configuration of typed tests for local alignment.
+// ----------------------------------------------------------------------------
+
+template <typename T>
+class SimdAlignTestCommon : public SimdAlignTest<T>
+{};
+
+typedef
+        seqan::TagList<std::tuple<seqan::AlignConfig<>, impl::test_align_mock::EqualLengthSimd,    seqan::BandOff>,
+        seqan::TagList<std::tuple<seqan::AlignConfig<>, impl::test_align_mock::EqualLengthSimd,    seqan::BandOn>
+        > > SimdAlignLocalEqualLengthTestTypes;
+
+SEQAN_TYPED_TEST_CASE(SimdAlignTestCommon, SimdAlignLocalEqualLengthTestTypes);
+
+#include "test_align_simd_local.h"
 
 int main(int argc, char const ** argv) {
     seqan::TestSystem::init(argc, argv);
diff --git a/tests/align/test_align_simd.cpp b/tests/align/test_align_simd_local_variable_length.cpp
similarity index 76%
copy from tests/align/test_align_simd.cpp
copy to tests/align/test_align_simd_local_variable_length.cpp
index 405b6b6..2eef8fa 100644
--- a/tests/align/test_align_simd.cpp
+++ b/tests/align/test_align_simd_local_variable_length.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -35,7 +35,23 @@
 #include <seqan/basic.h>
 #include <seqan/stream.h>
 
-#include "test_align_simd.h"
+#include "test_align_simd_base.h"
+
+// ----------------------------------------------------------------------------
+// Configuration of typed tests for local alignment.
+// ----------------------------------------------------------------------------
+
+template <typename T>
+class SimdAlignTestCommon : public SimdAlignTest<T>
+{};
+
+typedef
+        seqan::TagList<std::tuple<seqan::AlignConfig<>, impl::test_align_mock::VariableLengthSimd, seqan::BandOff>
+        > SimdAlignLocalVariableLengthTestTypes;
+
+SEQAN_TYPED_TEST_CASE(SimdAlignTestCommon, SimdAlignLocalVariableLengthTestTypes);
+
+#include "test_align_simd_local.h"
 
 int main(int argc, char const ** argv) {
     seqan::TestSystem::init(argc, argv);
diff --git a/tests/align/test_align_stream.h b/tests/align/test_align_stream.h
index c3f204d..c86df09 100644
--- a/tests/align/test_align_stream.h
+++ b/tests/align/test_align_stream.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/align/test_alignment_algorithms_band_position.h b/tests/align/test_alignment_algorithms_band_position.h
index 579ba14..6544014 100644
--- a/tests/align/test_alignment_algorithms_band_position.h
+++ b/tests/align/test_alignment_algorithms_band_position.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 test_alignment_algorithms_band_position.h
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -44,7 +44,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case1)
 
     typedef DPProfile_<GlobalAlignment_<>, LinearGaps, TracebackOn<> > TDPProfile;
     typedef DPProfile_<GlobalAlignment_<FreeEndGaps_<True, True, True, True> >, LinearGaps, TracebackOn<> > TDPProfileOverlap;
-    typedef DPContext<int, LinearGaps> TDPContext;
+    typedef DPContext<DPCell_<int, LinearGaps>, typename TraceBitMap_<>::Type> TDPContext;
     TDPContext dpContext;
     DPScoutState_<Default> scoutState;
 
@@ -67,7 +67,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case1)
                                                            -static_cast<int>(length(strV)) - 1), TDPProfile());
         _adaptTraceSegmentsTo(row(align, 0), row(align, 1), traces);
 
-        int testScore = +MinValue<int>::VALUE;
+        int testScore = +std::numeric_limits<int>::min();
         SEQAN_ASSERT_EQ(score, testScore);
 
         std::stringstream ssH;
@@ -89,7 +89,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case1)
                                                            -static_cast<int>(length(strV)) - 1), TDPProfileOverlap());
         _adaptTraceSegmentsTo(row(align, 0), row(align, 1), traces);
 
-        int testScore = +MinValue<int>::VALUE;
+        int testScore = +std::numeric_limits<int>::min();
         SEQAN_ASSERT_EQ(score, testScore);
 
         std::stringstream ssH;
@@ -109,7 +109,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case2)
 
     typedef DPProfile_<GlobalAlignment_<>, LinearGaps, TracebackOn<> > TDPProfile;
     typedef DPProfile_<GlobalAlignment_<FreeEndGaps_<True, True, True, True> >, LinearGaps, TracebackOn<> > TDPProfileOverlap;
-    typedef DPContext<int, LinearGaps> TDPContext;
+    typedef DPContext<DPCell_<int, LinearGaps>, typename TraceBitMap_<>::Type> TDPContext;
     TDPContext dpContext;
     DPScoutState_<Default> scoutState;
 
@@ -132,7 +132,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case2)
                                                            -static_cast<int>(length(strV))), TDPProfile());
         _adaptTraceSegmentsTo(row(align, 0), row(align, 1), traces);
 
-        int testScore = +MinValue<int>::VALUE;
+        int testScore = +std::numeric_limits<int>::min();
         SEQAN_ASSERT_EQ(score, testScore);
 
         std::stringstream ssH;
@@ -172,7 +172,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case3)
 
     typedef DPProfile_<GlobalAlignment_<>, LinearGaps, TracebackOn<> > TDPProfile;
     typedef DPProfile_<GlobalAlignment_<FreeEndGaps_<True, True, True, True> >, LinearGaps, TracebackOn<> > TDPProfileOverlap;
-    typedef DPContext<int, LinearGaps> TDPContext;
+    typedef DPContext<DPCell_<int, LinearGaps>, typename TraceBitMap_<>::Type> TDPContext;
     TDPContext dpContext;
     DPScoutState_<Default> scoutState;
 
@@ -194,7 +194,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case3)
                                       DPBandConfig<BandOn>(-static_cast<int>(length(strV)) - 1, -3), TDPProfile());
         _adaptTraceSegmentsTo(row(align, 0), row(align, 1), traces);
 
-        int testScore = +MinValue<int>::VALUE;
+        int testScore = +std::numeric_limits<int>::min();
         SEQAN_ASSERT_EQ(score, testScore);
 
         std::stringstream ssH;
@@ -234,7 +234,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case4)
 
     typedef DPProfile_<GlobalAlignment_<>, LinearGaps, TracebackOn<> > TDPProfile;
     typedef DPProfile_<GlobalAlignment_<FreeEndGaps_<True, True, True, True> >, LinearGaps, TracebackOn<> > TDPProfileOverlap;
-    typedef DPContext<int, LinearGaps> TDPContext;
+    typedef DPContext<DPCell_<int, LinearGaps>, typename TraceBitMap_<>::Type> TDPContext;
     TDPContext dpContext;
     DPScoutState_<Default> scoutState;
 
@@ -256,7 +256,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case4)
                                       DPBandConfig<BandOn>(-static_cast<int>(length(strV)) - 1, 0), TDPProfile());
         _adaptTraceSegmentsTo(row(align, 0), row(align, 1), traces);
 
-        int testScore = +MinValue<int>::VALUE;
+        int testScore = +std::numeric_limits<int>::min();
         SEQAN_ASSERT_EQ(score, testScore);
 
         std::stringstream ssH;
@@ -295,7 +295,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case5)
 
     typedef DPProfile_<GlobalAlignment_<>, LinearGaps, TracebackOn<> > TDPProfile;
     typedef DPProfile_<GlobalAlignment_<FreeEndGaps_<True, True, True, True> >, LinearGaps, TracebackOn<> > TDPProfileOverlap;
-    typedef DPContext<int, LinearGaps> TDPContext;
+    typedef DPContext<DPCell_<int, LinearGaps>, typename TraceBitMap_<>::Type> TDPContext;
     TDPContext dpContext;
     DPScoutState_<Default> scoutState;
 
@@ -359,7 +359,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case6)
 
     typedef DPProfile_<GlobalAlignment_<>, LinearGaps, TracebackOn<> > TDPProfile;
     typedef DPProfile_<GlobalAlignment_<FreeEndGaps_<True, True, True, True> >, LinearGaps, TracebackOn<> > TDPProfileOverlap;
-    typedef DPContext<int, LinearGaps> TDPContext;
+    typedef DPContext<DPCell_<int, LinearGaps>, typename TraceBitMap_<>::Type> TDPContext;
     TDPContext dpContext;
     DPScoutState_<Default> scoutState;
 
@@ -422,7 +422,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case7)
 
     typedef DPProfile_<GlobalAlignment_<>, LinearGaps, TracebackOn<> > TDPProfile;
     typedef DPProfile_<GlobalAlignment_<FreeEndGaps_<True, True, True, True> >, LinearGaps, TracebackOn<> > TDPProfileOverlap;
-    typedef DPContext<int, LinearGaps> TDPContext;
+    typedef DPContext<DPCell_<int, LinearGaps>, typename TraceBitMap_<>::Type> TDPContext;
     TDPContext dpContext;
     DPScoutState_<Default> scoutState;
 
@@ -485,7 +485,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case8)
 
     typedef DPProfile_<GlobalAlignment_<>, LinearGaps, TracebackOn<> > TDPProfile;
     typedef DPProfile_<GlobalAlignment_<FreeEndGaps_<True, True, True, True> >, LinearGaps, TracebackOn<> > TDPProfileOverlap;
-    typedef DPContext<int, LinearGaps> TDPContext;
+    typedef DPContext<DPCell_<int, LinearGaps>, typename TraceBitMap_<>::Type> TDPContext;
     TDPContext dpContext;
     DPScoutState_<Default> scoutState;
 
@@ -547,7 +547,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case9)
 
     typedef DPProfile_<GlobalAlignment_<>, LinearGaps, TracebackOn<> > TDPProfile;
     typedef DPProfile_<GlobalAlignment_<FreeEndGaps_<True, True, True, True> >, LinearGaps, TracebackOn<> > TDPProfileOverlap;
-    typedef DPContext<int, LinearGaps> TDPContext;
+    typedef DPContext<DPCell_<int, LinearGaps>, typename TraceBitMap_<>::Type> TDPContext;
     TDPContext dpContext;
     DPScoutState_<Default> scoutState;
 
@@ -570,7 +570,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case9)
                                       DPBandConfig<BandOn>(-static_cast<int>(length(strV)), -3), TDPProfile());
         _adaptTraceSegmentsTo(row(align, 0), row(align, 1), traces);
 
-        SEQAN_ASSERT_EQ(score, MinValue<int>::VALUE);
+        SEQAN_ASSERT_EQ(score, std::numeric_limits<int>::min());
 
         std::stringstream ssH;
         std::stringstream ssV;
@@ -609,7 +609,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case10)
 
     typedef DPProfile_<GlobalAlignment_<>, LinearGaps, TracebackOn<> > TDPProfile;
     typedef DPProfile_<GlobalAlignment_<FreeEndGaps_<True, True, True, True> >, LinearGaps, TracebackOn<> > TDPProfileOverlap;
-    typedef DPContext<int, LinearGaps> TDPContext;
+    typedef DPContext<DPCell_<int, LinearGaps>, typename TraceBitMap_<>::Type> TDPContext;
     TDPContext dpContext;
     DPScoutState_<Default> scoutState;
     //012345678901
@@ -631,7 +631,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case10)
                                       DPBandConfig<BandOn>(-static_cast<int>(length(strV)), 0), TDPProfile());
         _adaptTraceSegmentsTo(row(align, 0), row(align, 1), traces);
 
-        SEQAN_ASSERT_EQ(score, MinValue<int>::VALUE);
+        SEQAN_ASSERT_EQ(score, std::numeric_limits<int>::min());
 
         std::stringstream ssH;
         std::stringstream ssV;
@@ -670,7 +670,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case11)
 
     typedef DPProfile_<GlobalAlignment_<>, LinearGaps, TracebackOn<> > TDPProfile;
     typedef DPProfile_<GlobalAlignment_<FreeEndGaps_<True, True, True, True> >, LinearGaps, TracebackOn<> > TDPProfileOverlap;
-    typedef DPContext<int, LinearGaps> TDPContext;
+    typedef DPContext<DPCell_<int, LinearGaps>, typename TraceBitMap_<>::Type> TDPContext;
     TDPContext dpContext;
     DPScoutState_<Default> scoutState;
 
@@ -733,7 +733,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case12)
 
     typedef DPProfile_<GlobalAlignment_<>, LinearGaps, TracebackOn<> > TDPProfile;
     typedef DPProfile_<GlobalAlignment_<FreeEndGaps_<True, True, True, True> >, LinearGaps, TracebackOn<> > TDPProfileOverlap;
-    typedef DPContext<int, LinearGaps> TDPContext;
+    typedef DPContext<DPCell_<int, LinearGaps>, typename TraceBitMap_<>::Type> TDPContext;
     TDPContext dpContext;
     DPScoutState_<Default> scoutState;
 
@@ -795,7 +795,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case13)
 
     typedef DPProfile_<GlobalAlignment_<>, LinearGaps, TracebackOn<> > TDPProfile;
     typedef DPProfile_<GlobalAlignment_<FreeEndGaps_<True, True, True, True> >, LinearGaps, TracebackOn<> > TDPProfileOverlap;
-    typedef DPContext<int, LinearGaps> TDPContext;
+    typedef DPContext<DPCell_<int, LinearGaps>, typename TraceBitMap_<>::Type> TDPContext;
     TDPContext dpContext;
     DPScoutState_<Default> scoutState;
     //012345678901
@@ -857,7 +857,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case14)
 
     typedef DPProfile_<GlobalAlignment_<>, LinearGaps, TracebackOn<> > TDPProfile;
     typedef DPProfile_<GlobalAlignment_<FreeEndGaps_<True, True, True, True> >, LinearGaps, TracebackOn<> > TDPProfileOverlap;
-    typedef DPContext<int, LinearGaps> TDPContext;
+    typedef DPContext<DPCell_<int, LinearGaps>, typename TraceBitMap_<>::Type> TDPContext;
     TDPContext dpContext;
     DPScoutState_<Default> scoutState;
 
@@ -920,7 +920,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case15)
 
     typedef DPProfile_<GlobalAlignment_<>, LinearGaps, TracebackOn<> > TDPProfile;
     typedef DPProfile_<GlobalAlignment_<FreeEndGaps_<True, True, True, True> >, LinearGaps, TracebackOn<> > TDPProfileOverlap;
-    typedef DPContext<int, LinearGaps> TDPContext;
+    typedef DPContext<DPCell_<int, LinearGaps>, typename TraceBitMap_<>::Type> TDPContext;
     TDPContext dpContext;
     DPScoutState_<Default> scoutState;
 
@@ -943,7 +943,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case15)
                                       DPBandConfig<BandOn>(-3, 0), TDPProfile());
         _adaptTraceSegmentsTo(row(align, 0), row(align, 1), traces);
 
-        SEQAN_ASSERT_EQ(score, MinValue<int>::VALUE);
+        SEQAN_ASSERT_EQ(score, std::numeric_limits<int>::min());
 
         std::stringstream ssH;
         std::stringstream ssV;
@@ -982,7 +982,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case16)
 
     typedef DPProfile_<GlobalAlignment_<>, LinearGaps, TracebackOn<> > TDPProfile;
     typedef DPProfile_<GlobalAlignment_<FreeEndGaps_<True, True, True, True> >, LinearGaps, TracebackOn<> > TDPProfileOverlap;
-    typedef DPContext<int, LinearGaps> TDPContext;
+    typedef DPContext<DPCell_<int, LinearGaps>, typename TraceBitMap_<>::Type> TDPContext;
     TDPContext dpContext;
     DPScoutState_<Default> scoutState;
 
@@ -1043,7 +1043,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case17)
 
     typedef DPProfile_<GlobalAlignment_<>, LinearGaps, TracebackOn<> > TDPProfile;
     typedef DPProfile_<GlobalAlignment_<FreeEndGaps_<True, True, True, True> >, LinearGaps, TracebackOn<> > TDPProfileOverlap;
-    typedef DPContext<int, LinearGaps> TDPContext;
+    typedef DPContext<DPCell_<int, LinearGaps>, typename TraceBitMap_<>::Type> TDPContext;
     TDPContext dpContext;
     DPScoutState_<Default> scoutState;
 
@@ -1104,7 +1104,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case18)
 
     typedef DPProfile_<GlobalAlignment_<>, LinearGaps, TracebackOn<> > TDPProfile;
     typedef DPProfile_<GlobalAlignment_<FreeEndGaps_<True, True, True, True> >, LinearGaps, TracebackOn<> > TDPProfileOverlap;
-    typedef DPContext<int, LinearGaps> TDPContext;
+    typedef DPContext<DPCell_<int, LinearGaps>, typename TraceBitMap_<>::Type> TDPContext;
     TDPContext dpContext;
     DPScoutState_<Default> scoutState;
 
@@ -1165,7 +1165,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case19)
 
     typedef DPProfile_<GlobalAlignment_<>, LinearGaps, TracebackOn<> > TDPProfile;
     typedef DPProfile_<GlobalAlignment_<FreeEndGaps_<True, True, True, True> >, LinearGaps, TracebackOn<> > TDPProfileOverlap;
-    typedef DPContext<int, LinearGaps> TDPContext;
+    typedef DPContext<DPCell_<int, LinearGaps>, typename TraceBitMap_<>::Type> TDPContext;
     TDPContext dpContext;
     DPScoutState_<Default> scoutState;
 
@@ -1226,7 +1226,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case20)
 
     typedef DPProfile_<GlobalAlignment_<>, LinearGaps, TracebackOn<> > TDPProfile;
     typedef DPProfile_<GlobalAlignment_<FreeEndGaps_<True, True, True, True> >, LinearGaps, TracebackOn<> > TDPProfileOverlap;
-    typedef DPContext<int, LinearGaps> TDPContext;
+    typedef DPContext<DPCell_<int, LinearGaps>, typename TraceBitMap_<>::Type> TDPContext;
     TDPContext dpContext;
     DPScoutState_<Default> scoutState;
 
@@ -1287,7 +1287,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case21)
 
     typedef DPProfile_<GlobalAlignment_<>, LinearGaps, TracebackOn<> > TDPProfile;
     typedef DPProfile_<GlobalAlignment_<FreeEndGaps_<True, True, True, True> >, LinearGaps, TracebackOn<> > TDPProfileOverlap;
-    typedef DPContext<int, LinearGaps> TDPContext;
+    typedef DPContext<DPCell_<int, LinearGaps>, typename TraceBitMap_<>::Type> TDPContext;
     TDPContext dpContext;
     DPScoutState_<Default> scoutState;
 
@@ -1348,7 +1348,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case22)
 
     typedef DPProfile_<GlobalAlignment_<>, LinearGaps, TracebackOn<> > TDPProfile;
     typedef DPProfile_<GlobalAlignment_<FreeEndGaps_<True, True, True, True> >, LinearGaps, TracebackOn<> > TDPProfileOverlap;
-    typedef DPContext<int, LinearGaps> TDPContext;
+    typedef DPContext<DPCell_<int, LinearGaps>, typename TraceBitMap_<>::Type> TDPContext;
     TDPContext dpContext;
     DPScoutState_<Default> scoutState;
 
@@ -1409,7 +1409,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case23)
 
     typedef DPProfile_<GlobalAlignment_<>, LinearGaps, TracebackOn<> > TDPProfile;
     typedef DPProfile_<GlobalAlignment_<FreeEndGaps_<True, True, True, True> >, LinearGaps, TracebackOn<> > TDPProfileOverlap;
-    typedef DPContext<int, LinearGaps> TDPContext;
+    typedef DPContext<DPCell_<int, LinearGaps>, typename TraceBitMap_<>::Type> TDPContext;
     TDPContext dpContext;
     DPScoutState_<Default> scoutState;
 
@@ -1470,7 +1470,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case24)
 
     typedef DPProfile_<GlobalAlignment_<>, LinearGaps, TracebackOn<> > TDPProfile;
     typedef DPProfile_<GlobalAlignment_<FreeEndGaps_<True, True, True, True> >, LinearGaps, TracebackOn<> > TDPProfileOverlap;
-    typedef DPContext<int, LinearGaps> TDPContext;
+    typedef DPContext<DPCell_<int, LinearGaps>, typename TraceBitMap_<>::Type> TDPContext;
     TDPContext dpContext;
     DPScoutState_<Default> scoutState;
 
@@ -1492,7 +1492,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case24)
                                       DPBandConfig<BandOn>(length(strH) - length(strV), 6), TDPProfile());
         _adaptTraceSegmentsTo(row(align, 0), row(align, 1), traces);
 
-        SEQAN_ASSERT_EQ(score, MinValue<int>::VALUE);
+        SEQAN_ASSERT_EQ(score, std::numeric_limits<int>::min());
 
         std::stringstream ssH;
         std::stringstream ssV;
@@ -1533,7 +1533,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case25)
 
     typedef DPProfile_<GlobalAlignment_<>, LinearGaps, TracebackOn<> > TDPProfile;
     typedef DPProfile_<GlobalAlignment_<FreeEndGaps_<True, True, True, True> >, LinearGaps, TracebackOn<> > TDPProfileOverlap;
-    typedef DPContext<int, LinearGaps> TDPContext;
+    typedef DPContext<DPCell_<int, LinearGaps>, typename TraceBitMap_<>::Type> TDPContext;
     TDPContext dpContext;
     DPScoutState_<Default> scoutState;
 
@@ -1555,7 +1555,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case25)
                                       DPBandConfig<BandOn>(length(strH) - length(strV), length(strH)), TDPProfile());
         _adaptTraceSegmentsTo(row(align, 0), row(align, 1), traces);
 
-        SEQAN_ASSERT_EQ(score, MinValue<int>::VALUE);
+        SEQAN_ASSERT_EQ(score, std::numeric_limits<int>::min());
 
         std::stringstream ssH;
         std::stringstream ssV;
@@ -1595,7 +1595,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case26)
 
     typedef DPProfile_<GlobalAlignment_<>, LinearGaps, TracebackOn<> > TDPProfile;
     typedef DPProfile_<GlobalAlignment_<FreeEndGaps_<True, True, True, True> >, LinearGaps, TracebackOn<> > TDPProfileOverlap;
-    typedef DPContext<int, LinearGaps> TDPContext;
+    typedef DPContext<DPCell_<int, LinearGaps>, typename TraceBitMap_<>::Type> TDPContext;
     TDPContext dpContext;
     DPScoutState_<Default> scoutState;
 
@@ -1618,7 +1618,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case26)
                                       DPBandConfig<BandOn>(length(strH) - length(strV), length(strH) + 1), TDPProfile());
         _adaptTraceSegmentsTo(row(align, 0), row(align, 1), traces);
 
-        SEQAN_ASSERT_EQ(score, MinValue<int>::VALUE);
+        SEQAN_ASSERT_EQ(score, std::numeric_limits<int>::min());
 
         std::stringstream ssH;
         std::stringstream ssV;
@@ -1658,7 +1658,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case27)
 
     typedef DPProfile_<GlobalAlignment_<>, LinearGaps, TracebackOn<> > TDPProfile;
     typedef DPProfile_<GlobalAlignment_<FreeEndGaps_<True, True, True, True> >, LinearGaps, TracebackOn<> > TDPProfileOverlap;
-    typedef DPContext<int, LinearGaps> TDPContext;
+    typedef DPContext<DPCell_<int, LinearGaps>, typename TraceBitMap_<>::Type> TDPContext;
     TDPContext dpContext;
     DPScoutState_<Default> scoutState;
 
@@ -1680,7 +1680,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case27)
                                       DPBandConfig<BandOn>(6, length(strH)), TDPProfile());
         _adaptTraceSegmentsTo(row(align, 0), row(align, 1), traces);
 
-        SEQAN_ASSERT_EQ(score, MinValue<int>::VALUE);
+        SEQAN_ASSERT_EQ(score, std::numeric_limits<int>::min());
 
         std::stringstream ssH;
         std::stringstream ssV;
@@ -1719,7 +1719,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case28)
 
     typedef DPProfile_<GlobalAlignment_<>, LinearGaps, TracebackOn<> > TDPProfile;
     typedef DPProfile_<GlobalAlignment_<FreeEndGaps_<True, True, True, True> >, LinearGaps, TracebackOn<> > TDPProfileOverlap;
-    typedef DPContext<int, LinearGaps> TDPContext;
+    typedef DPContext<DPCell_<int, LinearGaps>, typename TraceBitMap_<>::Type> TDPContext;
     TDPContext dpContext;
     DPScoutState_<Default> scoutState;
 
@@ -1742,7 +1742,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case28)
                                       DPBandConfig<BandOn>(6, length(strH) + 1), TDPProfile());
         _adaptTraceSegmentsTo(row(align, 0), row(align, 1), traces);
 
-        SEQAN_ASSERT_EQ(score, MinValue<int>::VALUE);
+        SEQAN_ASSERT_EQ(score, std::numeric_limits<int>::min());
 
         std::stringstream ssH;
         std::stringstream ssV;
@@ -1781,7 +1781,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case29)
 
     typedef DPProfile_<GlobalAlignment_<>, LinearGaps, TracebackOn<> > TDPProfile;
     typedef DPProfile_<GlobalAlignment_<FreeEndGaps_<True, True, True, True> >, LinearGaps, TracebackOn<> > TDPProfileOverlap;
-    typedef DPContext<int, LinearGaps> TDPContext;
+    typedef DPContext<DPCell_<int, LinearGaps>, typename TraceBitMap_<>::Type> TDPContext;
     TDPContext dpContext;
     DPScoutState_<Default> scoutState;
 
@@ -1803,7 +1803,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case29)
                                       DPBandConfig<BandOn>(length(strH), length(strH) + 1), TDPProfile());
         _adaptTraceSegmentsTo(row(align, 0), row(align, 1), traces);
 
-        SEQAN_ASSERT_EQ(score, MinValue<int>::VALUE);
+        SEQAN_ASSERT_EQ(score, std::numeric_limits<int>::min());
 
         std::stringstream ssH;
         std::stringstream ssV;
@@ -1842,7 +1842,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case30)
 
     typedef DPProfile_<GlobalAlignment_<>, LinearGaps, TracebackOn<> > TDPProfile;
     typedef DPProfile_<GlobalAlignment_<FreeEndGaps_<True, True, True, True> >, LinearGaps, TracebackOn<> > TDPProfileOverlap;
-    typedef DPContext<int, LinearGaps> TDPContext;
+    typedef DPContext<DPCell_<int, LinearGaps>, typename TraceBitMap_<>::Type> TDPContext;
     TDPContext dpContext;
     DPScoutState_<Default> scoutState;
 
@@ -1864,7 +1864,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case30)
                                       DPBandConfig<BandOn>(length(strH) + 1, length(strH) + 1), TDPProfile());
         _adaptTraceSegmentsTo(row(align, 0), row(align, 1), traces);
 
-        SEQAN_ASSERT_EQ(score, MinValue<int>::VALUE);
+        SEQAN_ASSERT_EQ(score, std::numeric_limits<int>::min());
 
         std::stringstream ssH;
         std::stringstream ssV;
@@ -1884,7 +1884,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case30)
                                       DPBandConfig<BandOn>(length(strH) + 1, length(strH) + 1), TDPProfileOverlap());
         _adaptTraceSegmentsTo(row(align, 0), row(align, 1), traces);
 
-        SEQAN_ASSERT_EQ(score, MinValue<int>::VALUE);
+        SEQAN_ASSERT_EQ(score, std::numeric_limits<int>::min());
 
         std::stringstream ssH;
         std::stringstream ssV;
@@ -1903,7 +1903,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case31)
 
     typedef DPProfile_<GlobalAlignment_<>, LinearGaps, TracebackOn<> > TDPProfile;
     typedef DPProfile_<GlobalAlignment_<FreeEndGaps_<True, True, True, True> >, LinearGaps, TracebackOn<> > TDPProfileOverlap;
-    typedef DPContext<int, LinearGaps> TDPContext;
+    typedef DPContext<DPCell_<int, LinearGaps>, typename TraceBitMap_<>::Type> TDPContext;
     TDPContext dpContext;
     DPScoutState_<Default> scoutState;
 
@@ -1925,7 +1925,7 @@ SEQAN_DEFINE_TEST(test_alignment_algorithms_band_position_case31)
                                       TDPProfile());
         _adaptTraceSegmentsTo(row(align, 0), row(align, 1), traces);
 
-        SEQAN_ASSERT_EQ(score, MinValue<int>::VALUE);
+        SEQAN_ASSERT_EQ(score, std::numeric_limits<int>::min());
 
         std::stringstream ssH;
         std::stringstream ssV;
diff --git a/tests/align/test_alignment_algorithms_dynamic_gap.h b/tests/align/test_alignment_algorithms_dynamic_gap.h
index 16bd719..0ae463b 100644
--- a/tests/align/test_alignment_algorithms_dynamic_gap.h
+++ b/tests/align/test_alignment_algorithms_dynamic_gap.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/align/test_alignment_algorithms_global.h b/tests/align/test_alignment_algorithms_global.h
index 723ef42..27fa8c8 100644
--- a/tests/align/test_alignment_algorithms_global.h
+++ b/tests/align/test_alignment_algorithms_global.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                     test_alignment_algorithms_global.h
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/align/test_alignment_algorithms_global_banded.h b/tests/align/test_alignment_algorithms_global_banded.h
index c5f4fe7..bb16de7 100644
--- a/tests/align/test_alignment_algorithms_global_banded.h
+++ b/tests/align/test_alignment_algorithms_global_banded.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 test_alignment_algorithms_global_banded.h
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/align/test_alignment_algorithms_local.h b/tests/align/test_alignment_algorithms_local.h
index f6c1d73..114acf4 100644
--- a/tests/align/test_alignment_algorithms_local.h
+++ b/tests/align/test_alignment_algorithms_local.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                     test_alignment_algorithms_local.h
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -607,6 +607,53 @@ SEQAN_DEFINE_TEST(test_align_local_alignment_enumeration_gaps)
 
         SEQAN_ASSERT_NOT(nextLocalAlignment(gapsH, gapsV, enumerator));
     }
+
+    // Test scoring matrix
+    {
+
+        std::stringstream ssH, ssV;
+
+        String<AminoAcid> strH("IGYELAPIPHTRTMDDFGNWWWKKWIHDDELNYFGTQLLIWHLQEKEGEQ");
+        String<AminoAcid> strV("KHSDQGQIALLIHNTLQDWRPKVECDSPRTMIRRDFDDPQLAPPPHTNHRGNM");
+
+        Gaps<String<AminoAcid>, ArrayGaps> gapsH(strH);
+        Gaps<String<AminoAcid>, ArrayGaps> gapsV(strV);
+
+        Blosum62 scoringScheme;
+        int cutoff =  40;
+
+        LocalAlignmentEnumerator<Blosum62, Unbanded> enumerator(scoringScheme, cutoff);
+
+        SEQAN_ASSERT(nextLocalAlignment(gapsH, gapsV, enumerator));
+        SEQAN_ASSERT_EQ(getScore(enumerator), 69);
+        ssH.clear(); ssH.str(""); ssH << gapsH;
+        SEQAN_ASSERT_EQ(ssH.str(), "GYELAP--IPHTRTMDDFGNWWWK-KWIH-DD-E-L---NYFGT-QLLIW---HLQEKEG");
+        ssV.clear(); ssV.str(""); ssV << gapsV;
+        SEQAN_ASSERT_EQ(ssV.str(), "G-QIA-LLI-HN-TLQD---W--RPK-VECDSPRTMIRRD-FDDPQLA--PPPHTNHR-G");
+
+        SEQAN_ASSERT(nextLocalAlignment(gapsH, gapsV, enumerator));
+        SEQAN_ASSERT_EQ(getScore(enumerator), 57);
+        ssH.clear(); ssH.str(""); ssH << gapsH;
+        SEQAN_ASSERT_EQ(ssH.str(), "KWIHDDELNYFGTQ--LLIWH--LQE---K-E");
+        ssV.clear(); ssV.str(""); ssV << gapsV;
+        SEQAN_ASSERT(ssV.str() == "K--HSDQ----G-QIALLI-HNTLQDWRPKVE");
+
+        SEQAN_ASSERT(nextLocalAlignment(gapsH, gapsV, enumerator));
+        SEQAN_ASSERT_EQ(getScore(enumerator), 51);
+        ssH.clear(); ssH.str(""); ssH << gapsH;
+        SEQAN_ASSERT_EQ(ssH.str(), "IGYE-LA---P-I----PHTRTMD---DFGNWWWKKWIHDD-EL------NYF-GTQL");
+        ssV.clear(); ssV.str(""); ssV << gapsV;
+        SEQAN_ASSERT_EQ(ssV.str(), "I-HNTLQDWRPKVECDSP--RTM-IRRDF----------DDPQLAPPPHTNH-RGN-M");
+
+        SEQAN_ASSERT(nextLocalAlignment(gapsH, gapsV, enumerator));
+        SEQAN_ASSERT_EQ(getScore(enumerator), 46);
+        ssH.clear(); ssH.str(""); ssH << gapsH;
+        SEQAN_ASSERT_EQ(ssH.str(), "I--GYE---LAPIP-HT--RTMDDFGN");
+        ssV.clear(); ssV.str(""); ssV << gapsV;
+        SEQAN_ASSERT_EQ(ssV.str(), "IRRDFDDPQLAP-PPHTNHR-----GN");
+
+        SEQAN_ASSERT_NOT(nextLocalAlignment(gapsH, gapsV, enumerator));
+    }
 }
 
 SEQAN_DEFINE_TEST(test_align_local_alignment_enumeration_fragment)
diff --git a/tests/align/test_alignment_algorithms_local_banded.h b/tests/align/test_alignment_algorithms_local_banded.h
index 846cf94..742b750 100644
--- a/tests/align/test_alignment_algorithms_local_banded.h
+++ b/tests/align/test_alignment_algorithms_local_banded.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                  test_alignment_algorithms_local_banded.h
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -502,6 +502,38 @@ SEQAN_DEFINE_TEST(test_align_local_alignment_enumeration_banded_gaps)
 
         SEQAN_ASSERT_NOT(nextLocalAlignment(gapsH, gapsV, enumerator));
     }
+
+    // Test scoring matrix
+    {
+        std::stringstream ssH, ssV;
+
+        String<AminoAcid> strH("IGYELAPIPHTRTMDDFGNWWWKKWIHDDELNYFGTQLLIWHLQEKEGEQ");
+        String<AminoAcid> strV("KHSDQGQIALLIHNTLQDWRPKVECDSPRTMIRRDFDDPQLAPPPHTNHRGNM");
+
+        Gaps<String<AminoAcid>, ArrayGaps> gapsH(strH);
+        Gaps<String<AminoAcid>, ArrayGaps> gapsV(strV);
+
+        Blosum62 scoringScheme;
+        int cutoff =  40;
+
+        LocalAlignmentEnumerator<Blosum62, Banded> enumerator(scoringScheme, -20, 20, cutoff);
+
+        SEQAN_ASSERT(nextLocalAlignment(gapsH, gapsV, enumerator));
+        SEQAN_ASSERT_EQ(getScore(enumerator), 69);
+        ssH.clear(); ssH.str(""); ssH << gapsH;
+        SEQAN_ASSERT_EQ(ssH.str(), "GYELAP--IPHTRTMDDFGNWWWK-KWIH-DD-E--L--NYF-GTQLLIW---HLQEKEG");
+        ssV.clear(); ssV.str(""); ssV << gapsV;
+        SEQAN_ASSERT_EQ(ssV.str(), "G-QIA-LLI-H-NTLQD-----WRPK-VECDSPRTMIRRD-FDDPQ-LA-PPPHTNHR-G");
+
+        SEQAN_ASSERT(nextLocalAlignment(gapsH, gapsV, enumerator));
+        SEQAN_ASSERT_EQ(getScore(enumerator), 51);
+        ssH.clear(); ssH.str(""); ssH << gapsH;
+        SEQAN_ASSERT_EQ(ssH.str(), "IGYE-L---AP-I----PHTRTM--DDFGNWWWKKWIHDD-EL------NYF-GTQL");
+        ssV.clear(); ssV.str(""); ssV << gapsV;
+        SEQAN_ASSERT(ssV.str() == "I-HNTLQDWRPKVECDSP--RTMIRRDF----------DDPQLAPPPHTNH-RG-NM");
+
+        SEQAN_ASSERT_NOT(nextLocalAlignment(gapsH, gapsV, enumerator));
+    }
 }
 
 SEQAN_DEFINE_TEST(test_align_local_alignment_enumeration_banded_fragment)
diff --git a/tests/align/test_alignment_dp_adapt_tracesegments.h b/tests/align/test_alignment_dp_adapt_tracesegments.h
index b883c85..1487d9f 100644
--- a/tests/align/test_alignment_dp_adapt_tracesegments.h
+++ b/tests/align/test_alignment_dp_adapt_tracesegments.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                  test_alignment_dp_adapt_tracesegments.h
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -50,7 +50,7 @@ testAlign2TracebackTraceSegmentsConstructor()
         SEQAN_ASSERT_EQ(traceSegment._horizontalBeginPos, (TPosition) 0);
         SEQAN_ASSERT_EQ(traceSegment._verticalBeginPos, (TPosition) 0);
         SEQAN_ASSERT_EQ(traceSegment._length, (TSize) 0);
-        SEQAN_ASSERT_EQ(traceSegment._traceValue, +TraceBitMap_<>::NONE);
+        SEQAN_ASSERT_EQ(traceSegment._traceValue, TraceBitMap_<>::NONE);
     }
 
     { // test copy ctor
@@ -58,30 +58,30 @@ testAlign2TracebackTraceSegmentsConstructor()
         traceSegment._horizontalBeginPos = 10;
         traceSegment._verticalBeginPos = 3;
         traceSegment._length = 5;
-        traceSegment._traceValue = +TraceBitMap_<>::DIAGONAL;
+        traceSegment._traceValue = TraceBitMap_<>::DIAGONAL;
 
         TTraceSegment traceSegment2(traceSegment);
 
         SEQAN_ASSERT_EQ(traceSegment2._horizontalBeginPos, (TPosition) 10);
         SEQAN_ASSERT_EQ(traceSegment2._verticalBeginPos, (TPosition) 3);
         SEQAN_ASSERT_EQ(traceSegment2._length, (TSize) 5);
-        SEQAN_ASSERT_EQ(traceSegment2._traceValue, +TraceBitMap_<>::DIAGONAL);
+        SEQAN_ASSERT_EQ(traceSegment2._traceValue, TraceBitMap_<>::DIAGONAL);
 
         TTraceSegment traceSegment3 = traceSegment;
 
         SEQAN_ASSERT_EQ(traceSegment3._horizontalBeginPos, (TPosition) 10);
         SEQAN_ASSERT_EQ(traceSegment3._verticalBeginPos, (TPosition) 3);
         SEQAN_ASSERT_EQ(traceSegment3._length, (TSize) 5);
-        SEQAN_ASSERT_EQ(traceSegment3._traceValue, +TraceBitMap_<>::DIAGONAL);
+        SEQAN_ASSERT_EQ(traceSegment3._traceValue, TraceBitMap_<>::DIAGONAL);
     }
 
     { // test additional ctor
-        TTraceSegment traceSegment(12, 13, 8, +TraceBitMap_<>::VERTICAL);
+        TTraceSegment traceSegment(12, 13, 8, TraceBitMap_<>::VERTICAL);
 
         SEQAN_ASSERT_EQ(traceSegment._horizontalBeginPos, (TPosition) 12);
         SEQAN_ASSERT_EQ(traceSegment._verticalBeginPos, (TPosition) 13);
         SEQAN_ASSERT_EQ(traceSegment._length, (TSize) 8);
-        SEQAN_ASSERT_EQ(traceSegment._traceValue, +TraceBitMap_<>::VERTICAL);
+        SEQAN_ASSERT_EQ(traceSegment._traceValue, TraceBitMap_<>::VERTICAL);
     }
 }
 
@@ -98,21 +98,21 @@ testAlign2TracebackTraceSegmentsAssignment()
         traceSegment._horizontalBeginPos = 10;
         traceSegment._verticalBeginPos = 3;
         traceSegment._length = 5;
-        traceSegment._traceValue = +TraceBitMap_<>::DIAGONAL;
+        traceSegment._traceValue = TraceBitMap_<>::DIAGONAL;
 
         TTraceSegment traceSegment2;
 
         SEQAN_ASSERT_EQ(traceSegment2._horizontalBeginPos, (TPosition) 0);
         SEQAN_ASSERT_EQ(traceSegment2._verticalBeginPos, (TPosition) 0);
         SEQAN_ASSERT_EQ(traceSegment2._length, (TSize) 0);
-        SEQAN_ASSERT_EQ(traceSegment2._traceValue, +TraceBitMap_<>::NONE);
+        SEQAN_ASSERT_EQ(traceSegment2._traceValue, TraceBitMap_<>::NONE);
 
         traceSegment2 = traceSegment;
 
         SEQAN_ASSERT_EQ(traceSegment2._horizontalBeginPos, (TPosition) 10);
         SEQAN_ASSERT_EQ(traceSegment2._verticalBeginPos, (TPosition) 3);
         SEQAN_ASSERT_EQ(traceSegment2._length, (TSize) 5);
-        SEQAN_ASSERT_EQ(traceSegment2._traceValue, +TraceBitMap_<>::DIAGONAL);
+        SEQAN_ASSERT_EQ(traceSegment2._traceValue, TraceBitMap_<>::DIAGONAL);
     }
 }
 
@@ -127,12 +127,12 @@ testAlign2TracebackTraceSegmentsCompare()
     traceSegment._horizontalBeginPos = 10;
     traceSegment._verticalBeginPos = 3;
     traceSegment._length = 5;
-    traceSegment._traceValue = +TraceBitMap_<>::DIAGONAL;
+    traceSegment._traceValue = TraceBitMap_<>::DIAGONAL;
 
     TTraceSegment traceSegment2(traceSegment);
 
     SEQAN_ASSERT(traceSegment2 == traceSegment);
-    traceSegment._traceValue = +TraceBitMap_<>::HORIZONTAL;
+    traceSegment._traceValue = TraceBitMap_<>::HORIZONTAL;
     SEQAN_ASSERT(traceSegment2 !=  traceSegment);
 }
 
@@ -171,26 +171,26 @@ void testAlign2TracebackRecordTrace(TTarget & target)
     _recordSegment(target, 0, 0, 3, tv1);
     _recordSegment(target, 0, 3, 5, tv2);
     _recordSegment(target, 5, 8, 3, tv3);
-    _recordSegment(target, 8, 8, 0, +TraceBitMap_<>::DIAGONAL);
+    _recordSegment(target, 8, 8, 0, TraceBitMap_<>::DIAGONAL);
 
 
 
     SEQAN_ASSERT_EQ(target[0]._horizontalBeginPos, 0);
     SEQAN_ASSERT_EQ(target[0]._verticalBeginPos, 0);
     SEQAN_ASSERT_EQ(target[0]._length, 3);
-    SEQAN_ASSERT_EQ(target[0]._traceValue, +TraceBitMap_<>::DIAGONAL);
+    SEQAN_ASSERT_EQ(target[0]._traceValue, TraceBitMap_<>::DIAGONAL);
     SEQAN_ASSERT_EQ(target[1]._horizontalBeginPos, 0);
     SEQAN_ASSERT_EQ(target[1]._verticalBeginPos, 3);
     SEQAN_ASSERT_EQ(target[1]._length, 5);
-    SEQAN_ASSERT_EQ(target[1]._traceValue, +TraceBitMap_<>::VERTICAL);
+    SEQAN_ASSERT_EQ(target[1]._traceValue, TraceBitMap_<>::VERTICAL);
     SEQAN_ASSERT_EQ(target[2]._horizontalBeginPos, 5);
     SEQAN_ASSERT_EQ(target[2]._verticalBeginPos, 8);
     SEQAN_ASSERT_EQ(target[2]._length, 3);
-    SEQAN_ASSERT_EQ(target[2]._traceValue, +TraceBitMap_<>::HORIZONTAL);
+    SEQAN_ASSERT_EQ(target[2]._traceValue, TraceBitMap_<>::HORIZONTAL);
 
     SEQAN_ASSERT_EQ(length(target), 3u);
 
-//    _recordSegment(target, 8, 8, 10, +TraceBitMap_<>::NONE); // note this should fail when uncommented
+//    _recordSegment(target, 8, 8, 10, TraceBitMap_<>::NONE); // note this should fail when uncommented
 }
 
 void testAlign2TraceAdaptorAdaptFile()
@@ -200,12 +200,12 @@ void testAlign2TraceAdaptorAdaptFile()
     typedef TraceSegment_<size_t, size_t> TTraceSegment;
     String<TTraceSegment> traceSegments;
 
-    appendValue(traceSegments, TTraceSegment(12, 8, 4, +TraceBitMap_<>::VERTICAL));
-    appendValue(traceSegments, TTraceSegment(8, 4, 4, +TraceBitMap_<>::DIAGONAL));
-    appendValue(traceSegments, TTraceSegment(8, 3, 1, +TraceBitMap_<>::VERTICAL));
-    appendValue(traceSegments, TTraceSegment(4, 3, 4, +TraceBitMap_<>::HORIZONTAL));
-    appendValue(traceSegments, TTraceSegment(1, 0, 3, +TraceBitMap_<>::DIAGONAL));
-    appendValue(traceSegments, TTraceSegment(0, 0, 1, +TraceBitMap_<>::HORIZONTAL));
+    appendValue(traceSegments, TTraceSegment(12, 8, 4, TraceBitMap_<>::VERTICAL));
+    appendValue(traceSegments, TTraceSegment(8, 4, 4, TraceBitMap_<>::DIAGONAL));
+    appendValue(traceSegments, TTraceSegment(8, 3, 1, TraceBitMap_<>::VERTICAL));
+    appendValue(traceSegments, TTraceSegment(4, 3, 4, TraceBitMap_<>::HORIZONTAL));
+    appendValue(traceSegments, TTraceSegment(1, 0, 3, TraceBitMap_<>::DIAGONAL));
+    appendValue(traceSegments, TTraceSegment(0, 0, 1, TraceBitMap_<>::HORIZONTAL));
 
     String<char> seq0 = "AAAACCCCGGGG";
     String<char> seq1 = "AAAACCCCGGGG";
@@ -272,12 +272,12 @@ void testAlign2TraceAdaptorAdaptAlign()
     typedef TraceSegment_<size_t, size_t> TTraceSegment;
     String<TTraceSegment> traceSegments;
 
-    appendValue(traceSegments, TTraceSegment(12, 8, 4, +TraceBitMap_<>::VERTICAL));
-    appendValue(traceSegments, TTraceSegment(8, 4, 4, +TraceBitMap_<>::DIAGONAL));
-    appendValue(traceSegments, TTraceSegment(8, 3, 1, +TraceBitMap_<>::VERTICAL));
-    appendValue(traceSegments, TTraceSegment(4, 3, 4, +TraceBitMap_<>::HORIZONTAL));
-    appendValue(traceSegments, TTraceSegment(1, 0, 3, +TraceBitMap_<>::DIAGONAL));
-    appendValue(traceSegments, TTraceSegment(0, 0, 1, +TraceBitMap_<>::HORIZONTAL));
+    appendValue(traceSegments, TTraceSegment(12, 8, 4, TraceBitMap_<>::VERTICAL));
+    appendValue(traceSegments, TTraceSegment(8, 4, 4, TraceBitMap_<>::DIAGONAL));
+    appendValue(traceSegments, TTraceSegment(8, 3, 1, TraceBitMap_<>::VERTICAL));
+    appendValue(traceSegments, TTraceSegment(4, 3, 4, TraceBitMap_<>::HORIZONTAL));
+    appendValue(traceSegments, TTraceSegment(1, 0, 3, TraceBitMap_<>::DIAGONAL));
+    appendValue(traceSegments, TTraceSegment(0, 0, 1, TraceBitMap_<>::HORIZONTAL));
 
     String<char> seq0 = "AAAACCCCGGGG";
     String<char> seq1 = "AAAACCCCGGGG";
@@ -316,12 +316,12 @@ void testAlign2TraceAdaptorAdaptFragments()
 
     String<TTraceSegment> traceSegments;
 
-    appendValue(traceSegments, TTraceSegment(12, 8, 4, +TraceBitMap_<>::VERTICAL));
-    appendValue(traceSegments, TTraceSegment(8, 4, 4, +TraceBitMap_<>::DIAGONAL));
-    appendValue(traceSegments, TTraceSegment(8, 3, 1, +TraceBitMap_<>::VERTICAL));
-    appendValue(traceSegments, TTraceSegment(4, 3, 4, +TraceBitMap_<>::HORIZONTAL));
-    appendValue(traceSegments, TTraceSegment(1, 0, 3, +TraceBitMap_<>::DIAGONAL));
-    appendValue(traceSegments, TTraceSegment(0, 0, 1, +TraceBitMap_<>::HORIZONTAL));
+    appendValue(traceSegments, TTraceSegment(12, 8, 4, TraceBitMap_<>::VERTICAL));
+    appendValue(traceSegments, TTraceSegment(8, 4, 4, TraceBitMap_<>::DIAGONAL));
+    appendValue(traceSegments, TTraceSegment(8, 3, 1, TraceBitMap_<>::VERTICAL));
+    appendValue(traceSegments, TTraceSegment(4, 3, 4, TraceBitMap_<>::HORIZONTAL));
+    appendValue(traceSegments, TTraceSegment(1, 0, 3, TraceBitMap_<>::DIAGONAL));
+    appendValue(traceSegments, TTraceSegment(0, 0, 1, TraceBitMap_<>::HORIZONTAL));
 
     _adaptTraceSegmentsTo(fragmentString, 0, 1, traceSegments);
 
@@ -344,12 +344,12 @@ void testAlign2TraceAdaptorAdaptAlignmentGraph()
 
     String<TTraceSegment> traceSegments;
 
-    appendValue(traceSegments, TTraceSegment(12, 8, 4, +TraceBitMap_<>::VERTICAL));
-    appendValue(traceSegments, TTraceSegment(8, 4, 4, +TraceBitMap_<>::DIAGONAL));
-    appendValue(traceSegments, TTraceSegment(8, 3, 1, +TraceBitMap_<>::VERTICAL));
-    appendValue(traceSegments, TTraceSegment(4, 3, 4, +TraceBitMap_<>::HORIZONTAL));
-    appendValue(traceSegments, TTraceSegment(1, 0, 3, +TraceBitMap_<>::DIAGONAL));
-    appendValue(traceSegments, TTraceSegment(0, 0, 1, +TraceBitMap_<>::HORIZONTAL));
+    appendValue(traceSegments, TTraceSegment(12, 8, 4, TraceBitMap_<>::VERTICAL));
+    appendValue(traceSegments, TTraceSegment(8, 4, 4, TraceBitMap_<>::DIAGONAL));
+    appendValue(traceSegments, TTraceSegment(8, 3, 1, TraceBitMap_<>::VERTICAL));
+    appendValue(traceSegments, TTraceSegment(4, 3, 4, TraceBitMap_<>::HORIZONTAL));
+    appendValue(traceSegments, TTraceSegment(1, 0, 3, TraceBitMap_<>::DIAGONAL));
+    appendValue(traceSegments, TTraceSegment(0, 0, 1, TraceBitMap_<>::HORIZONTAL));
 
     _adaptTraceSegmentsTo(alignGraph, 0, 1, traceSegments);
 
diff --git a/tests/align/test_alignment_dp_band.h b/tests/align/test_alignment_dp_band.h
index 5615c8f..4da80c8 100644
--- a/tests/align/test_alignment_dp_band.h
+++ b/tests/align/test_alignment_dp_band.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/align/test_alignment_dp_cell.h b/tests/align/test_alignment_dp_cell.h
index 6a53e85..7e9dcaa 100644
--- a/tests/align/test_alignment_dp_cell.h
+++ b/tests/align/test_alignment_dp_cell.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                         test_alignment_dp_cell.h
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -83,7 +83,7 @@ void testDPCellDefaultInfinity(TGapCosts const &)
     int result1 = DPCellDefaultInfinity<TDPCell>::VALUE;
     int result2 = DPCellDefaultInfinity<TDPConstCell>::VALUE;
 
-    int test = MinValue<int>::VALUE / 2;
+    int test = std::numeric_limits<int>::min() / 2;
     SEQAN_ASSERT_EQ(result1, test);
     SEQAN_ASSERT_EQ(result2, test);
 }
diff --git a/tests/align/test_alignment_dp_formula.h b/tests/align/test_alignment_dp_formula.h
index d4cae4c..6cf5af5 100644
--- a/tests/align/test_alignment_dp_formula.h
+++ b/tests/align/test_alignment_dp_formula.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                        test_alignment_dp_formula.h
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -62,7 +62,7 @@ void testDPFormulaNoTraceLocalLinearDiagonalDirection(TBand const &)
     TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                            scoringScheme, RecursionDirectionDiagonal(), TDPProfile());
 
-    SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::NONE);
+    SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::NONE));
     SEQAN_ASSERT_EQ(activeCell._score, 4);
     SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
     SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
@@ -71,7 +71,7 @@ void testDPFormulaNoTraceLocalLinearDiagonalDirection(TBand const &)
     traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'C', 'A',
                                scoringScheme, RecursionDirectionDiagonal(), TDPProfile());
 
-    SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::NONE);
+    SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::NONE));
     SEQAN_ASSERT_EQ(activeCell._score, 0);
     SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
     SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
@@ -101,7 +101,7 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_linear_diagonal_direction)
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::DIAGONAL);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::DIAGONAL));
         SEQAN_ASSERT_EQ(activeCell._score, -8);
         SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
@@ -110,7 +110,7 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_linear_diagonal_direction)
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                    scoringScheme, RecursionDirectionDiagonal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::DIAGONAL);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::DIAGONAL));
         SEQAN_ASSERT_EQ(activeCell._score, -8);
         SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
@@ -121,7 +121,7 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_linear_diagonal_direction)
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'C', 'A',
                                    scoringScheme, RecursionDirectionDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::DIAGONAL);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::DIAGONAL));
         SEQAN_ASSERT_EQ(activeCell._score, -12);
         SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
@@ -130,7 +130,7 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_linear_diagonal_direction)
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'C', 'A',
                                    scoringScheme, RecursionDirectionDiagonal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::DIAGONAL);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::DIAGONAL));
         SEQAN_ASSERT_EQ(activeCell._score, -12);
         SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
@@ -159,20 +159,20 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_linear_horizontal_direction)
     TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                            scoringScheme, RecursionDirectionHorizontal(), TDPProfileSingleTrace());
 
-    SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX);
+    SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
     SEQAN_ASSERT_EQ(activeCell._score, 6);
-    SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
+    SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
     SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
-    SEQAN_ASSERT_EQ(prevVertical._score, 10);
+    SEQAN_ASSERT_EQ(prevVertical._score, 6);
 
     traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                            scoringScheme, RecursionDirectionHorizontal(), TDPProfileCompleteTrace());
 
-    SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX);
+    SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
     SEQAN_ASSERT_EQ(activeCell._score, 6);
-    SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
+    SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
     SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
-    SEQAN_ASSERT_EQ(prevVertical._score, 10);
+    SEQAN_ASSERT_EQ(prevVertical._score, 6);
 }
 
 SEQAN_DEFINE_TEST(test_dp_formula_trace_global_linear_vertical_direction)
@@ -196,14 +196,14 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_linear_vertical_direction)
     TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                            scoringScheme, RecursionDirectionVertical(), TDPProfileSingleTrace());
 
-    SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX);
+    SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
     SEQAN_ASSERT_EQ(activeCell._score, 6);
 
     traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                            scoringScheme, RecursionDirectionVertical(), TDPProfileCompleteTrace());
 
-    SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX);
-    SEQAN_ASSERT_EQ(activeCell._score, 6);
+    SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
+    SEQAN_ASSERT_EQ(activeCell._score, 2);
 }
 
 SEQAN_DEFINE_TEST(test_dp_formula_trace_global_linear_upper_band_direction)
@@ -228,41 +228,43 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_linear_upper_band_direction)
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionUpperDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 6);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 6);
 
+        prevDiagonal._score = -10;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionUpperDiagonal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 6);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 6);
     }
 
     {
+        prevDiagonal._score = -10;
         prevHorizontal._score = -10;
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionUpperDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::DIAGONAL);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::DIAGONAL));
         SEQAN_ASSERT_EQ(activeCell._score, -8);
         SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, -10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, -8);
 
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionUpperDiagonal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::DIAGONAL);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::DIAGONAL));
         SEQAN_ASSERT_EQ(activeCell._score, -8);
         SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, -10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, -8);
     }
 
     {
@@ -270,20 +272,21 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_linear_upper_band_direction)
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionUpperDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL));
         SEQAN_ASSERT_EQ(activeCell._score, -8);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, -4);
         SEQAN_ASSERT_EQ(prevHorizontal._score, -4);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, -8);
 
+        prevDiagonal._score = -10;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionUpperDiagonal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, -8);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, -4);
         SEQAN_ASSERT_EQ(prevHorizontal._score, -4);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, -8);
     }
 }
 
@@ -309,7 +312,7 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_linear_lower_band_direction)
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionLowerDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 6);
         SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
@@ -318,7 +321,7 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_linear_lower_band_direction)
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionLowerDiagonal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 6);
         SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
@@ -330,7 +333,7 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_linear_lower_band_direction)
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionLowerDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::DIAGONAL);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::DIAGONAL));
         SEQAN_ASSERT_EQ(activeCell._score, -8);
         SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
@@ -339,7 +342,7 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_linear_lower_band_direction)
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionLowerDiagonal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::DIAGONAL);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::DIAGONAL));
         SEQAN_ASSERT_EQ(activeCell._score, -8);
         SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
@@ -351,7 +354,7 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_linear_lower_band_direction)
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'C',
                                                scoringScheme, RecursionDirectionLowerDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL));
         SEQAN_ASSERT_EQ(activeCell._score, -12);
         SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
@@ -360,7 +363,7 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_linear_lower_band_direction)
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'C',
                                                scoringScheme, RecursionDirectionLowerDiagonal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | +TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, -12);
         SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
@@ -390,148 +393,174 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_linear_all_direction)
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 6);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 6);
 
+        prevDiagonal._score = -10;
+        prevVertical._score = 10;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::VERTICAL | +TraceBitMap_<>::HORIZONTAL |
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::VERTICAL | TraceBitMap_<>::HORIZONTAL )|
                         TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX);
         SEQAN_ASSERT_EQ(activeCell._score, 6);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 6);
     }
 
     {
-        prevHorizontal._score = 0;
+        prevDiagonal._score = -10;
+        prevVertical._score = 5;
+        prevHorizontal._score = -5;
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX);
-        SEQAN_ASSERT_EQ(activeCell._score, 6);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
-        SEQAN_ASSERT_EQ(prevHorizontal._score, 0);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
+        SEQAN_ASSERT_EQ(activeCell._score, 1);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, -5);
+        SEQAN_ASSERT_EQ(prevHorizontal._score, -5);
+        SEQAN_ASSERT_EQ(prevVertical._score, 1);
 
+        prevDiagonal._score = -10;
+        prevVertical._score = 10;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 6);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
-        SEQAN_ASSERT_EQ(prevHorizontal._score, 0);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, -5);
+        SEQAN_ASSERT_EQ(prevHorizontal._score, -5);
+        SEQAN_ASSERT_EQ(prevVertical._score, 6);
     }
 
     {
+        prevDiagonal._score = -10;
         prevVertical._score = -10;
+        prevHorizontal._score = 5;
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX);
-        SEQAN_ASSERT_EQ(activeCell._score, -4);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
-        SEQAN_ASSERT_EQ(prevHorizontal._score, 0);
-        SEQAN_ASSERT_EQ(prevVertical._score, -10);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
+        SEQAN_ASSERT_EQ(activeCell._score, 1);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 5);
+        SEQAN_ASSERT_EQ(prevHorizontal._score, 5);
+        SEQAN_ASSERT_EQ(prevVertical._score, 1);
 
+        prevDiagonal._score = -10;
+        prevVertical._score = -10;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX);
-        SEQAN_ASSERT_EQ(activeCell._score, -4);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
-        SEQAN_ASSERT_EQ(prevHorizontal._score, 0);
-        SEQAN_ASSERT_EQ(prevVertical._score, -10);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
+        SEQAN_ASSERT_EQ(activeCell._score, 1);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 5);
+        SEQAN_ASSERT_EQ(prevHorizontal._score, 5);
+        SEQAN_ASSERT_EQ(prevVertical._score, 1);
     }
 
     {
+        prevDiagonal._score = 4;
+        prevVertical._score = 2;
         prevHorizontal._score = -4;
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL));
-        SEQAN_ASSERT_EQ(activeCell._score, -8);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL));
+        SEQAN_ASSERT_EQ(activeCell._score, 6);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, -4);
         SEQAN_ASSERT_EQ(prevHorizontal._score, -4);
-        SEQAN_ASSERT_EQ(prevVertical._score, -10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 6);
 
+        prevDiagonal._score = 4;
+        prevHorizontal._score = 10;
+        prevVertical._score = -4;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | +TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
-        SEQAN_ASSERT_EQ(activeCell._score, -8);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
-        SEQAN_ASSERT_EQ(prevHorizontal._score, -4);
-        SEQAN_ASSERT_EQ(prevVertical._score, -10);
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
+        SEQAN_ASSERT_EQ(activeCell._score, 6);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
+        SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 6);
     }
 
     {
+        prevDiagonal._score = 10;
+        prevVertical._score = 10;
         prevHorizontal._score = -12;
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::DIAGONAL);
-        SEQAN_ASSERT_EQ(activeCell._score, -8);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::DIAGONAL));
+        SEQAN_ASSERT_EQ(activeCell._score, 12);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, -12);
         SEQAN_ASSERT_EQ(prevHorizontal._score, -12);
-        SEQAN_ASSERT_EQ(prevVertical._score, -10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 12);
 
+        prevDiagonal._score = 10;
+        prevVertical._score = 10;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::DIAGONAL);
-        SEQAN_ASSERT_EQ(activeCell._score, -8);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::DIAGONAL));
+        SEQAN_ASSERT_EQ(activeCell._score, 12);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, -12);
         SEQAN_ASSERT_EQ(prevHorizontal._score, -12);
-        SEQAN_ASSERT_EQ(prevVertical._score, -10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 12);
     }
 
     {
-        prevVertical._score = -8;
+        prevDiagonal._score = 10;
+        prevVertical._score = 8;
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'C',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL));
-        SEQAN_ASSERT_EQ(activeCell._score, -12);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL));
+        SEQAN_ASSERT_EQ(activeCell._score, 8);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, -12);
         SEQAN_ASSERT_EQ(prevHorizontal._score, -12);
-        SEQAN_ASSERT_EQ(prevVertical._score, -8);
+        SEQAN_ASSERT_EQ(prevVertical._score, 8);
 
+        prevDiagonal._score = 10;
+        prevVertical._score = 12;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'C',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | +TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
-        SEQAN_ASSERT_EQ(activeCell._score, -12);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
+        SEQAN_ASSERT_EQ(activeCell._score, 8);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, -12);
         SEQAN_ASSERT_EQ(prevHorizontal._score, -12);
-        SEQAN_ASSERT_EQ(prevVertical._score, -8);
+        SEQAN_ASSERT_EQ(prevVertical._score, 8);
     }
 
     {
-        prevHorizontal._score = -8;
+        prevDiagonal._score = 10;
+        prevVertical._score = 12;
+        prevHorizontal._score = 12;
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'C',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL));
-        SEQAN_ASSERT_EQ(activeCell._score, -12);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
-        SEQAN_ASSERT_EQ(prevHorizontal._score, -8);
-        SEQAN_ASSERT_EQ(prevVertical._score, -8);
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL));
+        SEQAN_ASSERT_EQ(activeCell._score, 8);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 12);
+        SEQAN_ASSERT_EQ(prevHorizontal._score, 12);
+        SEQAN_ASSERT_EQ(prevVertical._score, 8);
 
+        prevDiagonal._score = 10;
+        prevVertical._score = 12;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'C',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | +TraceBitMap_<>::VERTICAL | +TraceBitMap_<>::HORIZONTAL |
-                                     TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | +TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
-        SEQAN_ASSERT_EQ(activeCell._score, -12);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
-        SEQAN_ASSERT_EQ(prevHorizontal._score, -8);
-        SEQAN_ASSERT_EQ(prevVertical._score, -8);
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL | TraceBitMap_<>::HORIZONTAL |
+                                     TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
+        SEQAN_ASSERT_EQ(activeCell._score, 8);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 12);
+        SEQAN_ASSERT_EQ(prevHorizontal._score, 12);
+        SEQAN_ASSERT_EQ(prevVertical._score, 8);
     }
 }
 
@@ -563,7 +592,7 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_affine_diagonal_direction)
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::DIAGONAL);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::DIAGONAL));
         SEQAN_ASSERT_EQ(activeCell._score, -8);
         SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
@@ -572,7 +601,7 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_affine_diagonal_direction)
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionDiagonal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::DIAGONAL);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::DIAGONAL));
         SEQAN_ASSERT_EQ(activeCell._score, -8);
         SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
@@ -583,7 +612,7 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_affine_diagonal_direction)
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'C',
                                                scoringScheme, RecursionDirectionDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::DIAGONAL);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::DIAGONAL));
         SEQAN_ASSERT_EQ(activeCell._score, -12);
         SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
@@ -592,7 +621,7 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_affine_diagonal_direction)
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'C',
                                                scoringScheme, RecursionDirectionDiagonal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::DIAGONAL);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::DIAGONAL));
         SEQAN_ASSERT_EQ(activeCell._score, -12);
         SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
@@ -611,15 +640,12 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_affine_horizontal_direction)
     DPCell_<int, AffineGaps> activeCell;
     DPCell_<int, AffineGaps> prevDiagonal;
     prevDiagonal._score = -10;
-    prevDiagonal._verticalScore = -10;
     prevDiagonal._horizontalScore = -10;
     DPCell_<int, AffineGaps> prevHorizontal;
     prevHorizontal._score = 10;
-    prevHorizontal._verticalScore = -10;
     prevHorizontal._horizontalScore = -10;
     DPCell_<int, AffineGaps> prevVertical;
     prevVertical._score = 10;
-    prevVertical._verticalScore = -10;
     prevVertical._horizontalScore = -10;
 
     Score<int, Simple> scoringScheme(2, -2, -4, -6);
@@ -628,41 +654,53 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_affine_horizontal_direction)
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionHorizontal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::HORIZONTAL_OPEN | +TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 4);
 
+        prevVertical._score = 10;
+        prevVertical._verticalScore = -10;
+        prevDiagonal._score = -10;
+        prevDiagonal._horizontalScore = -10;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionHorizontal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::HORIZONTAL_OPEN | +TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 4);
     }
 
     {
+        prevVertical._score = 10;
+        prevVertical._verticalScore = -10;
+        prevDiagonal._score = -10;
+        prevDiagonal._horizontalScore = -10;
         prevHorizontal._horizontalScore = 10;
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionHorizontal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 6);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 6);
 
+        prevVertical._score = 10;
+        prevVertical._verticalScore = -10;
+        prevDiagonal._score = -10;
+        prevDiagonal._horizontalScore = -10;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionHorizontal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 6);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 6);
     }
 }
 
@@ -677,16 +715,13 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_affine_vertical_direction)
     DPCell_<int, AffineGaps> activeCell;
     DPCell_<int, AffineGaps> prevDiagonal;
     prevDiagonal._score = -10;
-    prevDiagonal._verticalScore = -10;
     prevDiagonal._horizontalScore = -10;
     DPCell_<int, AffineGaps> prevHorizontal;
     prevHorizontal._score = 10;
-    prevHorizontal._verticalScore = -10;
     prevHorizontal._horizontalScore = -10;
     DPCell_<int, AffineGaps> prevVertical;
     prevVertical._score = 10;
     prevVertical._verticalScore = -10;
-    prevVertical._horizontalScore = -10;
 
     Score<int, Simple> scoringScheme(2, -2, -4, -6);
 
@@ -694,41 +729,46 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_affine_vertical_direction)
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionVertical(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::VERTICAL_OPEN | +TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
         SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 4);
 
+        prevVertical._score = 10;
+        prevVertical._verticalScore = -10;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionVertical(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::VERTICAL_OPEN | +TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
         SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 4);
     }
 
     {
+        prevVertical._score = 10;
         prevVertical._verticalScore = 10;
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionVertical(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 6);
         SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 6);
 
+        prevVertical._score = 10;
+        prevVertical._verticalScore = 10;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionVertical(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 6);
         SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 6);
     }
 }
 
@@ -743,16 +783,13 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_affine_upper_band_direction)
     DPCell_<int, AffineGaps> activeCell;
     DPCell_<int, AffineGaps> prevDiagonal;
     prevDiagonal._score = -10;
-    prevDiagonal._verticalScore = -10;
     prevDiagonal._horizontalScore = -10;
     DPCell_<int, AffineGaps> prevHorizontal;
     prevHorizontal._score = 10;
-    prevHorizontal._verticalScore = -10;
     prevHorizontal._horizontalScore = -10;
     DPCell_<int, AffineGaps> prevVertical;
     prevVertical._score = 10;
     prevVertical._verticalScore = -10;
-    prevVertical._horizontalScore = -10;
 
     Score<int, Simple> scoringScheme(2, -2, -4, -6);
 
@@ -760,128 +797,171 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_affine_upper_band_direction)
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionUpperDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::HORIZONTAL_OPEN | +TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 4);
 
+        prevDiagonal._score = -10;
+        prevDiagonal._horizontalScore = -10;
+        prevVertical._score = 10;
+        prevVertical._verticalScore = -10;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionUpperDiagonal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::HORIZONTAL_OPEN | +TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 4);
     }
 
     {
         prevDiagonal._score = 10;
+        prevDiagonal._horizontalScore = -10;
+        prevVertical._score = 10;
+        prevVertical._verticalScore = -10;
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionUpperDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::HORIZONTAL_OPEN);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::HORIZONTAL_OPEN));
         SEQAN_ASSERT_EQ(activeCell._score, 12);
         SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 12);
 
+        prevDiagonal._score = 10;
+        prevDiagonal._horizontalScore = -10;
+        prevVertical._score = 10;
+        prevVertical._verticalScore = -10;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionUpperDiagonal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::DIAGONAL | +TraceBitMap_<>::HORIZONTAL_OPEN);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::HORIZONTAL_OPEN));
         SEQAN_ASSERT_EQ(activeCell._score, 12);
         SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 12);
     }
 
     {
+        prevDiagonal._score = 10;
+        prevDiagonal._horizontalScore = -10;
+        prevVertical._score = 10;
+        prevVertical._verticalScore = -10;
         prevHorizontal._horizontalScore = 16;
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'C',
                                                scoringScheme, RecursionDirectionUpperDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 12);
         SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 12);
 
+        prevDiagonal._score = 10;
+        prevDiagonal._horizontalScore = -10;
+        prevVertical._score = 10;
+        prevVertical._verticalScore = -10;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'C',
                                                scoringScheme, RecursionDirectionUpperDiagonal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 12);
         SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 12);
     }
 
     {
+        prevDiagonal._score = 10;
+        prevDiagonal._horizontalScore = -10;
+        prevVertical._score = 10;
+        prevVertical._verticalScore = -10;
         prevHorizontal._horizontalScore = 16;
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionUpperDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | +TraceBitMap_<>::HORIZONTAL));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::HORIZONTAL));
         SEQAN_ASSERT_EQ(activeCell._score, 12);
         SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 12);
 
+        prevDiagonal._score = 10;
+        prevDiagonal._horizontalScore = -10;
+        prevVertical._score = 10;
+        prevVertical._verticalScore = -10;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionUpperDiagonal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | +TraceBitMap_<>::HORIZONTAL |
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::HORIZONTAL |
                                      TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 12);
         SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 12);
     }
 
     {
+        prevDiagonal._score = 10;
+        prevDiagonal._horizontalScore = -10;
+        prevVertical._score = 10;
+        prevVertical._verticalScore = -10;
         prevHorizontal._score = 18;
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionUpperDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::HORIZONTAL));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::HORIZONTAL));
         SEQAN_ASSERT_EQ(activeCell._score, 12);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 18);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 18);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 12);
 
+        prevDiagonal._score = 10;
+        prevDiagonal._horizontalScore = -10;
+        prevVertical._score = 10;
+        prevVertical._verticalScore = -10;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionUpperDiagonal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX |
-                                     +TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::HORIZONTAL_OPEN));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX |
+                                     TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::HORIZONTAL_OPEN));
         SEQAN_ASSERT_EQ(activeCell._score, 12);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 18);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 18);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 12);
     }
 
     {
+        prevDiagonal._score = 10;
+        prevDiagonal._horizontalScore = -10;
+        prevVertical._score = 10;
+        prevVertical._verticalScore = -10;
         prevHorizontal._horizontalScore = -10;
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionUpperDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | +TraceBitMap_<>::HORIZONTAL_OPEN));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::HORIZONTAL_OPEN));
         SEQAN_ASSERT_EQ(activeCell._score, 12);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 18);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 18);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 12);
 
+        prevDiagonal._score = 10;
+        prevDiagonal._horizontalScore = -10;
+        prevVertical._score = 10;
+        prevVertical._verticalScore = -10;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionUpperDiagonal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | +TraceBitMap_<>::HORIZONTAL_OPEN |
-                                     +TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::HORIZONTAL_OPEN |
+                                     TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 12);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 18);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 18);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 12);
     }
 }
 
@@ -896,16 +976,13 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_affine_lower_band_direction)
     DPCell_<int, AffineGaps> activeCell;
     DPCell_<int, AffineGaps> prevDiagonal;
     prevDiagonal._score = -10;
-    prevDiagonal._verticalScore = -10;
     prevDiagonal._horizontalScore = -10;
     DPCell_<int, AffineGaps> prevHorizontal;
     prevHorizontal._score = 10;
-    prevHorizontal._verticalScore = -10;
     prevHorizontal._horizontalScore = -10;
     DPCell_<int, AffineGaps> prevVertical;
     prevVertical._score = 10;
     prevVertical._verticalScore = -10;
-    prevVertical._horizontalScore = -10;
 
     Score<int, Simple> scoringScheme(2, -2, -4, -6);
 
@@ -913,16 +990,20 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_affine_lower_band_direction)
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionLowerDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::VERTICAL_OPEN | +TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
         SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
         SEQAN_ASSERT_EQ(prevVertical._score, 10);
 
+        prevDiagonal._score = -10;
+        prevDiagonal._horizontalScore = -10;
+        prevVertical._score = 10;
+        prevVertical._verticalScore = -10;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionLowerDiagonal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::VERTICAL_OPEN | +TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
         SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
@@ -931,19 +1012,26 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_affine_lower_band_direction)
 
     {
         prevDiagonal._score = 10;
+        prevDiagonal._horizontalScore = -10;
+        prevVertical._score = 10;
+        prevVertical._verticalScore = -10;
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionLowerDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::DIAGONAL | +TraceBitMap_<>::VERTICAL_OPEN);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL_OPEN));
         SEQAN_ASSERT_EQ(activeCell._score, 12);
         SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
         SEQAN_ASSERT_EQ(prevVertical._score, 10);
 
+        prevDiagonal._score = 10;
+        prevDiagonal._horizontalScore = -10;
+        prevVertical._score = 10;
+        prevVertical._verticalScore = -10;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionLowerDiagonal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::DIAGONAL | +TraceBitMap_<>::VERTICAL_OPEN);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL_OPEN));
         SEQAN_ASSERT_EQ(activeCell._score, 12);
         SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
@@ -951,20 +1039,27 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_affine_lower_band_direction)
     }
 
     {
+        prevDiagonal._score = 10;
+        prevDiagonal._horizontalScore = -10;
+        prevVertical._score = 10;
         prevVertical._verticalScore = 16;
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'C',
                                                scoringScheme, RecursionDirectionLowerDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 12);
         SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
         SEQAN_ASSERT_EQ(prevVertical._score, 10);
 
+        prevDiagonal._score = 10;
+        prevDiagonal._horizontalScore = -10;
+        prevVertical._score = 10;
+        prevVertical._verticalScore = 16;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'C',
                                                scoringScheme, RecursionDirectionLowerDiagonal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 12);
         SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
@@ -972,20 +1067,27 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_affine_lower_band_direction)
     }
 
     {
+        prevDiagonal._score = 10;
+        prevDiagonal._horizontalScore = -10;
+        prevVertical._score = 10;
         prevVertical._verticalScore = 16;
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionLowerDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | +TraceBitMap_<>::VERTICAL));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL));
         SEQAN_ASSERT_EQ(activeCell._score, 12);
         SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
         SEQAN_ASSERT_EQ(prevVertical._score, 10);
 
+        prevDiagonal._score = 10;
+        prevDiagonal._horizontalScore = -10;
+        prevVertical._score = 10;
+        prevVertical._verticalScore = 16;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionLowerDiagonal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | +TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 12);
         SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
@@ -993,21 +1095,28 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_affine_lower_band_direction)
     }
 
     {
+        prevDiagonal._score = 10;
+        prevDiagonal._horizontalScore = -10;
         prevVertical._score = 18;
+        prevVertical._verticalScore = 16;
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionLowerDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | +TraceBitMap_<>::VERTICAL));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL));
         SEQAN_ASSERT_EQ(activeCell._score, 12);
         SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
         SEQAN_ASSERT_EQ(prevVertical._score, 18);
 
+        prevDiagonal._score = 10;
+        prevDiagonal._horizontalScore = -10;
+        prevVertical._score = 18;
+        prevVertical._verticalScore = 16;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionLowerDiagonal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | +TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX |
-                                     +TraceBitMap_<>::VERTICAL | TraceBitMap_<>::VERTICAL_OPEN));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX |
+                                     TraceBitMap_<>::VERTICAL | TraceBitMap_<>::VERTICAL_OPEN));
         SEQAN_ASSERT_EQ(activeCell._score, 12);
         SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
@@ -1015,21 +1124,28 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_affine_lower_band_direction)
     }
 
     {
+        prevDiagonal._score = 10;
+        prevDiagonal._horizontalScore = -10;
+        prevVertical._score = 18;
         prevVertical._verticalScore = -10;
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionLowerDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | +TraceBitMap_<>::VERTICAL_OPEN));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL_OPEN));
         SEQAN_ASSERT_EQ(activeCell._score, 12);
         SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
         SEQAN_ASSERT_EQ(prevVertical._score, 18);
 
+        prevDiagonal._score = 10;
+        prevDiagonal._horizontalScore = -10;
+        prevVertical._score = 18;
+        prevVertical._verticalScore = -10;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionLowerDiagonal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | +TraceBitMap_<>::VERTICAL_OPEN |
-                                     +TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL_OPEN |
+                                     TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 12);
         SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
@@ -1049,16 +1165,13 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_affine_all_direction)
     DPCell_<int, AffineGaps> activeCell;
     DPCell_<int, AffineGaps> prevDiagonal;
     prevDiagonal._score = -10;
-    prevDiagonal._verticalScore = -10;
     prevDiagonal._horizontalScore = -10;
     DPCell_<int, AffineGaps> prevHorizontal;
     prevHorizontal._score = -10;
-    prevHorizontal._verticalScore = -10;
     prevHorizontal._horizontalScore = -10;
     DPCell_<int, AffineGaps> prevVertical;
     prevVertical._score = 10;
     prevVertical._verticalScore = -10;
-    prevVertical._horizontalScore = -10;
 
     Score<int, Simple> scoringScheme(2, -2, -4, -6);
 
@@ -1066,282 +1179,340 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_affine_all_direction)
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | +TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::HORIZONTAL);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::HORIZONTAL));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
         SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, -10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 4);
 
+        prevDiagonal._score = -10;
+        prevDiagonal._horizontalScore = -10;
+        prevVertical._score = 10;
+        prevVertical._verticalScore = -10;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | +TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::HORIZONTAL);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::HORIZONTAL));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
         SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, -10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 4);
     }
 
     {
         prevDiagonal._score = 10;
+        prevDiagonal._horizontalScore = -10;
+        prevVertical._score = 10;
+        prevVertical._verticalScore = -10;
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::DIAGONAL | +TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::HORIZONTAL);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::HORIZONTAL));
         SEQAN_ASSERT_EQ(activeCell._score, 12);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, -10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 12);
 
+        prevDiagonal._score = 10;
+        prevDiagonal._horizontalScore = -10;
+        prevVertical._score = 10;
+        prevVertical._verticalScore = -10;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::DIAGONAL | +TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::HORIZONTAL);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::HORIZONTAL));
         SEQAN_ASSERT_EQ(activeCell._score, 12);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, -10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 12);
     }
 
     {
+        prevDiagonal._score = -10;
+        prevDiagonal._horizontalScore = -10;
+        prevVertical._score = 10;
         prevVertical._verticalScore = 16;
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'C',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::HORIZONTAL);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::HORIZONTAL));
         SEQAN_ASSERT_EQ(activeCell._score, 12);
         SEQAN_ASSERT_EQ(activeCell._horizontalScore, -14);
-        SEQAN_ASSERT_EQ(activeCell._verticalScore, 12);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, -10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 12);
 
+        prevDiagonal._score = -10;
+        prevDiagonal._horizontalScore = -10;
+        prevVertical._score = 10;
+        prevVertical._verticalScore = 16;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'C',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::HORIZONTAL);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::HORIZONTAL));
         SEQAN_ASSERT_EQ(activeCell._score, 12);
         SEQAN_ASSERT_EQ(activeCell._horizontalScore, -14);
-        SEQAN_ASSERT_EQ(activeCell._verticalScore, 12);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, -10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 12);
     }
 
     {
+        prevDiagonal._score = 10;
+        prevDiagonal._horizontalScore = -10;
+        prevVertical._score = 10;
         prevVertical._verticalScore = 16;
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | +TraceBitMap_<>::VERTICAL | TraceBitMap_<>::HORIZONTAL));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL | TraceBitMap_<>::HORIZONTAL));
         SEQAN_ASSERT_EQ(activeCell._score, 12);
         SEQAN_ASSERT_EQ(activeCell._horizontalScore, -14);
-        SEQAN_ASSERT_EQ(activeCell._verticalScore, 12);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, -10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 12);
 
+        prevDiagonal._score = 10;
+        prevDiagonal._horizontalScore = -10;
+        prevVertical._score = 10;
+        prevVertical._verticalScore = 16;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | +TraceBitMap_<>::VERTICAL |
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL |
                                      TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::HORIZONTAL));
         SEQAN_ASSERT_EQ(activeCell._score, 12);
         SEQAN_ASSERT_EQ(activeCell._horizontalScore, -14);
-        SEQAN_ASSERT_EQ(activeCell._verticalScore, 12);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, -10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 12);
     }
 
     {
+        prevDiagonal._score = 10;
+        prevDiagonal._horizontalScore = -10;
         prevVertical._score = 18;
+        prevVertical._verticalScore = 16;
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | +TraceBitMap_<>::VERTICAL | TraceBitMap_<>::HORIZONTAL));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL | TraceBitMap_<>::HORIZONTAL));
         SEQAN_ASSERT_EQ(activeCell._score, 12);
         SEQAN_ASSERT_EQ(activeCell._horizontalScore, -14);
-        SEQAN_ASSERT_EQ(activeCell._verticalScore, 12);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, -10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 18);
+        SEQAN_ASSERT_EQ(prevVertical._score, 12);
 
+        prevDiagonal._score = 10;
+        prevDiagonal._horizontalScore = -10;
+        prevVertical._score = 18;
+        prevVertical._verticalScore = 16;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | +TraceBitMap_<>::VERTICAL | TraceBitMap_<>::VERTICAL_OPEN |
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL | TraceBitMap_<>::VERTICAL_OPEN |
                                      TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 12);
         SEQAN_ASSERT_EQ(activeCell._horizontalScore, -14);
-        SEQAN_ASSERT_EQ(activeCell._verticalScore, 12);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, -10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 18);
+        SEQAN_ASSERT_EQ(prevVertical._score, 12);
     }
 
     {
+        prevDiagonal._score = 10;
+        prevDiagonal._horizontalScore = -10;
+        prevVertical._score = 18;
         prevVertical._verticalScore = -10;
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | +TraceBitMap_<>::VERTICAL_OPEN |
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL_OPEN |
                                      TraceBitMap_<>::HORIZONTAL));
         SEQAN_ASSERT_EQ(activeCell._score, 12);
         SEQAN_ASSERT_EQ(activeCell._horizontalScore, -14);
-        SEQAN_ASSERT_EQ(activeCell._verticalScore, 12);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, -10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 18);
+        SEQAN_ASSERT_EQ(prevVertical._score, 12);
 
+        prevDiagonal._score = 10;
+        prevDiagonal._horizontalScore = -10;
+        prevVertical._score = 18;
+        prevVertical._verticalScore = -10;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | +TraceBitMap_<>::VERTICAL_OPEN |
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL_OPEN |
                                      TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 12);
         SEQAN_ASSERT_EQ(activeCell._horizontalScore, -14);
-        SEQAN_ASSERT_EQ(activeCell._verticalScore, 12);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, -10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 18);
+        SEQAN_ASSERT_EQ(prevVertical._score, 12);
     }
 
     {
+        prevDiagonal._score = -10;
+        prevDiagonal._horizontalScore = -10;
+        prevVertical._score = 18;
+        prevVertical._verticalScore = -10;
         prevHorizontal._horizontalScore = 20;
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::HORIZONTAL | +TraceBitMap_<>::VERTICAL_OPEN |
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::VERTICAL_OPEN |
                                      TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 16);
         SEQAN_ASSERT_EQ(activeCell._horizontalScore, 16);
-        SEQAN_ASSERT_EQ(activeCell._verticalScore, 12);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, -10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 18);
+        SEQAN_ASSERT_EQ(prevVertical._score, 16);
 
+        prevDiagonal._score = -10;
+        prevDiagonal._horizontalScore = -10;
+        prevVertical._score = 18;
+        prevVertical._verticalScore = -10;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::HORIZONTAL | +TraceBitMap_<>::VERTICAL_OPEN |
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::VERTICAL_OPEN |
                                      TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 16);
         SEQAN_ASSERT_EQ(activeCell._horizontalScore, 16);
-        SEQAN_ASSERT_EQ(activeCell._verticalScore, 12);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, -10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, -10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 18);
+        SEQAN_ASSERT_EQ(prevVertical._score, 16);
     }
 
     {
+        prevDiagonal._score = -10;
+        prevDiagonal._horizontalScore = -10;
+        prevVertical._score = 18;
+        prevVertical._verticalScore = -10;
         prevHorizontal._score = 22;
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX | +TraceBitMap_<>::HORIZONTAL |
-                                     +TraceBitMap_<>::VERTICAL_OPEN));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX | TraceBitMap_<>::HORIZONTAL |
+                                     TraceBitMap_<>::VERTICAL_OPEN));
         SEQAN_ASSERT_EQ(activeCell._score, 16);
         SEQAN_ASSERT_EQ(activeCell._horizontalScore, 16);
-        SEQAN_ASSERT_EQ(activeCell._verticalScore, 12);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 22);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 22);
-        SEQAN_ASSERT_EQ(prevVertical._score, 18);
+        SEQAN_ASSERT_EQ(prevVertical._score, 16);
 
+        prevDiagonal._score = -10;
+        prevDiagonal._horizontalScore = -10;
+        prevVertical._score = 18;
+        prevVertical._verticalScore = -10;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX | +TraceBitMap_<>::HORIZONTAL |
-                                     +TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::HORIZONTAL_OPEN));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX | TraceBitMap_<>::HORIZONTAL |
+                                     TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::HORIZONTAL_OPEN));
         SEQAN_ASSERT_EQ(activeCell._score, 16);
         SEQAN_ASSERT_EQ(activeCell._horizontalScore, 16);
-        SEQAN_ASSERT_EQ(activeCell._verticalScore, 12);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 22);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 22);
-        SEQAN_ASSERT_EQ(prevVertical._score, 18);
+        SEQAN_ASSERT_EQ(prevVertical._score, 16);
     }
 
     {
+        prevDiagonal._score = -10;
+        prevDiagonal._horizontalScore = -10;
         prevVertical._score = 22;
+        prevVertical._verticalScore = -10;
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX |
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX |
                                      TraceBitMap_<>::VERTICAL_OPEN));
         SEQAN_ASSERT_EQ(activeCell._score, 16);
         SEQAN_ASSERT_EQ(activeCell._horizontalScore, 16);
-        SEQAN_ASSERT_EQ(activeCell._verticalScore, 16);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 22);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 22);
-        SEQAN_ASSERT_EQ(prevVertical._score, 22);
+        SEQAN_ASSERT_EQ(prevVertical._score, 16);
 
+        prevDiagonal._score = -10;
+        prevDiagonal._horizontalScore = -10;
+        prevVertical._score = 22;
+        prevVertical._verticalScore = -10;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX |
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX |
                                      TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 16);
         SEQAN_ASSERT_EQ(activeCell._horizontalScore, 16);
-        SEQAN_ASSERT_EQ(activeCell._verticalScore, 16);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 22);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 22);
-        SEQAN_ASSERT_EQ(prevVertical._score, 22);
+        SEQAN_ASSERT_EQ(prevVertical._score, 16);
     }
 
     {
+        prevDiagonal._score = -10;
+        prevDiagonal._horizontalScore = -10;
+        prevVertical._score = 22;
         prevVertical._verticalScore = 20;
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::HORIZONTAL | +TraceBitMap_<>::VERTICAL |
-                                     +TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::VERTICAL |
+                                     TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 16);
         SEQAN_ASSERT_EQ(activeCell._horizontalScore, 16);
-        SEQAN_ASSERT_EQ(activeCell._verticalScore, 16);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 22);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 22);
-        SEQAN_ASSERT_EQ(prevVertical._score, 22);
+        SEQAN_ASSERT_EQ(prevVertical._score, 16);
 
+        prevDiagonal._score = -10;
+        prevDiagonal._horizontalScore = -10;
+        prevVertical._score = 22;
+        prevVertical._verticalScore = 20;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::HORIZONTAL | +TraceBitMap_<>::VERTICAL |
-                                     +TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::HORIZONTAL_OPEN |
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::VERTICAL |
+                                     TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::HORIZONTAL_OPEN |
                                      TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 16);
         SEQAN_ASSERT_EQ(activeCell._horizontalScore, 16);
-        SEQAN_ASSERT_EQ(activeCell._verticalScore, 16);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 22);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 22);
-        SEQAN_ASSERT_EQ(prevVertical._score, 22);
+        SEQAN_ASSERT_EQ(prevVertical._score, 16);
     }
 
     {
         prevDiagonal._score = 14;
+        prevVertical._score = 22;
+        prevVertical._verticalScore = 20;
+        prevHorizontal._score = 22;
+        prevHorizontal._horizontalScore = 20;
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::HORIZONTAL | +TraceBitMap_<>::VERTICAL | TraceBitMap_<>::DIAGONAL));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::VERTICAL | TraceBitMap_<>::DIAGONAL));
         SEQAN_ASSERT_EQ(activeCell._score, 16);
         SEQAN_ASSERT_EQ(activeCell._horizontalScore, 16);
-        SEQAN_ASSERT_EQ(activeCell._verticalScore, 16);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, 14);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 22);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 22);
-        SEQAN_ASSERT_EQ(prevVertical._score, 22);
+        SEQAN_ASSERT_EQ(prevVertical._score, 16);
 
+        prevDiagonal._score = 14;
+        prevVertical._score = 22;
+        prevVertical._verticalScore = 20;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::HORIZONTAL | +TraceBitMap_<>::VERTICAL |
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::VERTICAL |
                                      TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::VERTICAL_OPEN |
                                      TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX |
                                      TraceBitMap_<>::DIAGONAL));
         SEQAN_ASSERT_EQ(activeCell._score, 16);
         SEQAN_ASSERT_EQ(activeCell._horizontalScore, 16);
-        SEQAN_ASSERT_EQ(activeCell._verticalScore, 16);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, 14);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 22);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 22);
-        SEQAN_ASSERT_EQ(prevVertical._score, 22);
+        SEQAN_ASSERT_EQ(prevVertical._score, 16);
     }
 }
 
@@ -1367,7 +1538,7 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_dynamic_diagonal_direction)
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::DIAGONAL);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::DIAGONAL));
         SEQAN_ASSERT_EQ(_scoreOfCell(activeCell), -8);
         SEQAN_ASSERT_EQ(_scoreOfCell(prevDiagonal), -10);
         SEQAN_ASSERT_EQ(_scoreOfCell(prevHorizontal), 10);
@@ -1376,7 +1547,7 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_dynamic_diagonal_direction)
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                    scoringScheme, RecursionDirectionDiagonal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::DIAGONAL);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::DIAGONAL));
         SEQAN_ASSERT_EQ(_scoreOfCell(activeCell), -8);
         SEQAN_ASSERT_EQ(_scoreOfCell(prevDiagonal), -10);
         SEQAN_ASSERT_EQ(_scoreOfCell(prevHorizontal), 10);
@@ -1387,7 +1558,7 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_dynamic_diagonal_direction)
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'C', 'A',
                                    scoringScheme, RecursionDirectionDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::DIAGONAL);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::DIAGONAL));
         SEQAN_ASSERT_EQ(_scoreOfCell(activeCell), -12);
         SEQAN_ASSERT_EQ(_scoreOfCell(prevDiagonal), -10);
         SEQAN_ASSERT_EQ(_scoreOfCell(prevHorizontal), 10);
@@ -1396,7 +1567,7 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_dynamic_diagonal_direction)
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'C', 'A',
                                    scoringScheme, RecursionDirectionDiagonal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::DIAGONAL);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::DIAGONAL));
         SEQAN_ASSERT_EQ(_scoreOfCell(activeCell), -12);
         SEQAN_ASSERT_EQ(_scoreOfCell(prevDiagonal), -10);
         SEQAN_ASSERT_EQ(_scoreOfCell(prevHorizontal), 10);
@@ -1426,7 +1597,7 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_dynamic_horizontal_direction)
     TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                            scoringScheme, RecursionDirectionHorizontal(), TDPProfileSingleTrace());
 
-    SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX);
+    SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
     SEQAN_ASSERT_EQ(_scoreOfCell(activeCell), 6);
     SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionHorizontal()), true);
     SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionVertical()), false);
@@ -1434,7 +1605,7 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_dynamic_horizontal_direction)
     traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'C',
                                            scoringScheme, RecursionDirectionHorizontal(), TDPProfileCompleteTrace());
 
-    SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX);
+    SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
     SEQAN_ASSERT_EQ(_scoreOfCell(activeCell), 6);
     SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionHorizontal()), true);
     SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionVertical()), false);
@@ -1443,7 +1614,7 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_dynamic_horizontal_direction)
     traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'C',
                                            scoringScheme, RecursionDirectionHorizontal(), TDPProfileCompleteTrace());
 
-    SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX);
+    SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
     SEQAN_ASSERT_EQ(_scoreOfCell(activeCell), 8);
     SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionHorizontal()), true);
     SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionVertical()), false);
@@ -1471,20 +1642,25 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_dynamic_vertical_direction)
     TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                            scoringScheme, RecursionDirectionVertical(), TDPProfileSingleTrace());
 
-    SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX);
+    SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
     SEQAN_ASSERT_EQ(activeCell._score, 6);
 
+    prevDiagonal._score = -10;
+    prevVertical._score = 10;
+    _setBit(prevVertical, False(), DynamicGapExtensionVertical());
     traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                            scoringScheme, RecursionDirectionVertical(), TDPProfileCompleteTrace());
 
-    SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX);
+    SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
     SEQAN_ASSERT_EQ(activeCell._score, 6);
 
+    prevDiagonal._score = -10;
+    prevVertical._score = 10;
     _setBit(prevVertical, True(), DynamicGapExtensionVertical());
     traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                            scoringScheme, RecursionDirectionVertical(), TDPProfileCompleteTrace());
 
-    SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX);
+    SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
     SEQAN_ASSERT_EQ(activeCell._score, 8);
 }
 
@@ -1511,77 +1687,100 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_dynamic_upper_band_direction)
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionUpperDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 6);
 
+        prevDiagonal._score = -10;
+        prevVertical._score = 10;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionUpperDiagonal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 6);
 
+        prevDiagonal._score = -10;
+        prevVertical._score = 10;
         _setBit(prevHorizontal, True(), DynamicGapExtensionHorizontal());
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionUpperDiagonal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 8);
     }
 
     {
+        prevDiagonal._score = -10;
+        prevVertical._score = 10;
         prevHorizontal._score = -10;
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionUpperDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::HORIZONTAL);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::HORIZONTAL));
         SEQAN_ASSERT_EQ(activeCell._score, -8);
 
+        prevDiagonal._score = -10;
+        prevVertical._score = 10;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionUpperDiagonal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::HORIZONTAL);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::HORIZONTAL));
         SEQAN_ASSERT_EQ(activeCell._score, -8);
     }
 
     {
+        prevDiagonal._score = -10;
+        prevVertical._score = 10;
         prevHorizontal._score = -4;
         _setBit(prevHorizontal, False(), DynamicGapExtensionHorizontal());
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionUpperDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::HORIZONTAL_OPEN);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::HORIZONTAL_OPEN));
         SEQAN_ASSERT_EQ(activeCell._score, -8);
 
+        prevDiagonal._score = -10;
+        prevVertical._score = 10;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'C',
                                                scoringScheme, RecursionDirectionUpperDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, -8);
 
+        prevDiagonal._score = -10;
+        prevVertical._score = 10;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionUpperDiagonal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, -8);
 
+        prevDiagonal._score = -10;
+        prevVertical._score = 10;
+        _setBit(prevHorizontal, False(), DynamicGapExtensionVertical());
         prevHorizontal._score = -6;
         _setBit(prevHorizontal, True(), DynamicGapExtensionHorizontal());
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                        scoringScheme, RecursionDirectionUpperDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::HORIZONTAL);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::HORIZONTAL));
         SEQAN_ASSERT_EQ(activeCell._score, -8);
 
+        prevDiagonal._score = -10;
+        prevVertical._score = 10;
+        _setBit(prevHorizontal, False(), DynamicGapExtensionVertical());
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'C',
                                                scoringScheme, RecursionDirectionUpperDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, -8);
 
+        prevDiagonal._score = -10;
+        prevVertical._score = 10;
+        _setBit(prevHorizontal, False(), DynamicGapExtensionVertical());
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionUpperDiagonal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, -8);
     }
 }
@@ -1609,20 +1808,20 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_dynamic_lower_band_direction)
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionLowerDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 6);
 
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionLowerDiagonal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 6);
 
         _setBit(prevVertical, True(), DynamicGapExtensionVertical());
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionLowerDiagonal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 8);
     }
 
@@ -1631,13 +1830,13 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_dynamic_lower_band_direction)
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionLowerDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL));
         SEQAN_ASSERT_EQ(activeCell._score, -8);
 
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionLowerDiagonal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL));
         SEQAN_ASSERT_EQ(activeCell._score, -8);
     }
 
@@ -1647,19 +1846,19 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_dynamic_lower_band_direction)
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionLowerDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL_OPEN);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL_OPEN));
         SEQAN_ASSERT_EQ(activeCell._score, -8);
 
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'C',
                                                scoringScheme, RecursionDirectionLowerDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, -8);
 
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionLowerDiagonal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, -8);
 
         prevVertical._score = -6;
@@ -1667,19 +1866,19 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_dynamic_lower_band_direction)
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                        scoringScheme, RecursionDirectionLowerDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL));
         SEQAN_ASSERT_EQ(activeCell._score, -8);
 
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'C',
                                                scoringScheme, RecursionDirectionLowerDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, -8);
 
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionLowerDiagonal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, -8);
     }
 }
@@ -1708,14 +1907,14 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_dynamic_all_direction)
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::HORIZONTAL_OPEN);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::HORIZONTAL_OPEN));
         SEQAN_ASSERT_EQ(activeCell._score, -8);
 
         // Complete trace.
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::HORIZONTAL_OPEN);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::HORIZONTAL_OPEN));
         SEQAN_ASSERT_EQ(activeCell._score, -8);
     }
 
@@ -1725,61 +1924,79 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_dynamic_all_direction)
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX | TraceBitMap_<>::VERTICAL_OPEN);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX | TraceBitMap_<>::VERTICAL_OPEN));
         SEQAN_ASSERT_EQ(activeCell._score, -4);
 
         // Complete Trace + horizontal open.
+        prevDiagonal._score = -10;
+        prevVertical._score = -10;
+        _setBit(prevVertical, False(), DynamicGapExtensionVertical());
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                    scoringScheme, RecursionDirectionAll(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX | TraceBitMap_<>::VERTICAL_OPEN);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX | TraceBitMap_<>::VERTICAL_OPEN));
         SEQAN_ASSERT_EQ(activeCell._score, -4);
 
         // Single Trace + horizontal extend.
+        prevDiagonal._score = -10;
+        prevVertical._score = -10;
+        _setBit(prevVertical, False(), DynamicGapExtensionVertical());
         _setBit(prevHorizontal, True(), DynamicGapExtensionHorizontal());
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                    scoringScheme, RecursionDirectionAll(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX | TraceBitMap_<>::VERTICAL_OPEN);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX | TraceBitMap_<>::VERTICAL_OPEN));
         SEQAN_ASSERT_EQ(activeCell._score, -2);
 
         // Complete Trace + horizontal extend.
+        prevDiagonal._score = -10;
+        prevVertical._score = -10;
+        _setBit(prevVertical, False(), DynamicGapExtensionVertical());
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                    scoringScheme, RecursionDirectionAll(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX | TraceBitMap_<>::VERTICAL_OPEN);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX | TraceBitMap_<>::VERTICAL_OPEN));
         SEQAN_ASSERT_EQ(activeCell._score, -2);
     }
 
     {  // From vertical only.
         // Single Trace + vertical open.
+        prevDiagonal._score = -10;
         prevVertical._score = 4;
+        _setBit(prevVertical, False(), DynamicGapExtensionVertical());
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::HORIZONTAL);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::HORIZONTAL));
         SEQAN_ASSERT_EQ(activeCell._score, 0);
 
-        // Complete Trace + horizontal open.
+        prevDiagonal._score = -10;
+        prevVertical._score = 4;
+        _setBit(prevVertical, False(), DynamicGapExtensionVertical());
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                    scoringScheme, RecursionDirectionAll(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::HORIZONTAL);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::HORIZONTAL));
         SEQAN_ASSERT_EQ(activeCell._score, 0);
 
         // Single Trace + horizontal extend.
+        prevDiagonal._score = -10;
+        prevVertical._score = 4;
         _setBit(prevVertical, True(), DynamicGapExtensionVertical());
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                    scoringScheme, RecursionDirectionAll(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::HORIZONTAL);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::HORIZONTAL));
         SEQAN_ASSERT_EQ(activeCell._score, 2);
 
         // Complete Trace + horizontal extend.
+        prevDiagonal._score = -10;
+        prevVertical._score = 4;
+        _setBit(prevVertical, True(), DynamicGapExtensionVertical());
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                    scoringScheme, RecursionDirectionAll(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::HORIZONTAL);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::HORIZONTAL));
         SEQAN_ASSERT_EQ(activeCell._score, 2);
     }
 
@@ -1787,39 +2004,50 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_dynamic_all_direction)
         // Single trace + horizontal extend.
         prevHorizontal._score = 6;
         prevDiagonal._score = 2;
+        prevVertical._score = 4;
+        _setBit(prevVertical, True(), DynamicGapExtensionVertical());
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::VERTICAL));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::VERTICAL));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionHorizontal()), false);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionVertical()), false);
 
         // Complete trace + horizontal extend.
+        prevDiagonal._score = 2;
+        prevVertical._score = 4;
+        _setBit(prevVertical, True(), DynamicGapExtensionVertical());
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                    scoringScheme, RecursionDirectionAll(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | +TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX | TraceBitMap_<>::VERTICAL));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX | TraceBitMap_<>::VERTICAL));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionHorizontal()), true);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionVertical()), false);
 
         // Single Trace + horizontal open
+        prevDiagonal._score = 2;
+        prevVertical._score = 4;
+        _setBit(prevVertical, True(), DynamicGapExtensionVertical());
         prevHorizontal._score = 8;
         _setBit(prevHorizontal, False(), DynamicGapExtensionHorizontal());
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                    scoringScheme, RecursionDirectionAll(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::VERTICAL));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::VERTICAL));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionHorizontal()), false);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionVertical()), false);
 
         // Complete trace + horizontal extend.
+        prevDiagonal._score = 2;
+        prevVertical._score = 4;
+        _setBit(prevVertical, True(), DynamicGapExtensionVertical());
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                    scoringScheme, RecursionDirectionAll(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | +TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX | TraceBitMap_<>::VERTICAL));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX | TraceBitMap_<>::VERTICAL));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionHorizontal()), true);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionVertical()), false);
@@ -1827,80 +2055,99 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_dynamic_all_direction)
 
     {  // From horziontal + vertical.
         // Single trace + vertical extend + horizontal open.
+        prevDiagonal._score = 2;
         prevVertical._score = 6;
+        _setBit(prevVertical, True(), DynamicGapExtensionVertical());
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'C',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::HORIZONTAL_OPEN));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::HORIZONTAL_OPEN));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionHorizontal()), false);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionVertical()), true);
 
         // Complete trace + vertical extend + horizontal open.
+        prevDiagonal._score = 2;
+        prevVertical._score = 6;
+        _setBit(prevVertical, True(), DynamicGapExtensionVertical());
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'C',
                                    scoringScheme, RecursionDirectionAll(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionHorizontal()), true);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionVertical()), true);
 
         // Single trace + vertical open + horizontal open.
-        _setBit(prevVertical, False(), DynamicGapExtensionVertical());
+        prevDiagonal._score = 2;
         prevVertical._score = 8;
+        _setBit(prevVertical, False(), DynamicGapExtensionVertical());
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'C',
                                    scoringScheme, RecursionDirectionAll(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::HORIZONTAL_OPEN));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::HORIZONTAL_OPEN));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionHorizontal()), false);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionVertical()), true);
 
         // Complete trace + vertical open + horizontal open.
+        prevDiagonal._score = 2;
+        prevVertical._score = 8;
+        _setBit(prevVertical, False(), DynamicGapExtensionVertical());
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'C',
                                    scoringScheme, RecursionDirectionAll(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionHorizontal()), true);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionVertical()), true);
 
         // Single trace + vertical open + horizontal extend.
+        prevDiagonal._score = 2;
+        prevVertical._score = 8;
+        _setBit(prevVertical, False(), DynamicGapExtensionVertical());
         _setBit(prevHorizontal, True(), DynamicGapExtensionHorizontal());
         prevHorizontal._score = 6;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'C',
                                    scoringScheme, RecursionDirectionAll(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::HORIZONTAL));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::HORIZONTAL));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionHorizontal()), false);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionVertical()), true);
 
         // Complete trace + vertical open + horizontal extend.
+        prevDiagonal._score = 2;
+        prevVertical._score = 8;
+        _setBit(prevVertical, False(), DynamicGapExtensionVertical());
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'C',
                                    scoringScheme, RecursionDirectionAll(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionHorizontal()), true);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionVertical()), true);
 
         // Single trace + vertical extend + horizontal extend.
-        _setBit(prevVertical, True(), DynamicGapExtensionVertical());
+        prevDiagonal._score = 2;
         prevVertical._score = 6;
+        _setBit(prevVertical, True(), DynamicGapExtensionVertical());
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'C',
                                    scoringScheme, RecursionDirectionAll(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::HORIZONTAL));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::HORIZONTAL));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionHorizontal()), false);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionVertical()), true);
 
         // Complete trace + vertical extend + horizontal extend.
+        prevDiagonal._score = 2;
+        prevVertical._score = 6;
+        _setBit(prevVertical, True(), DynamicGapExtensionVertical());
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'C',
                                    scoringScheme, RecursionDirectionAll(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionHorizontal()), true);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionVertical()), true);
@@ -1910,39 +2157,48 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_dynamic_all_direction)
         // Single trace + vertical extend.
         prevHorizontal._score = 0;
         prevDiagonal._score = 2;
+        prevVertical._score = 6;
+        _setBit(prevVertical, True(), DynamicGapExtensionVertical());
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::VERTICAL));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::VERTICAL));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionHorizontal()), false);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionVertical()), false);
 
         // Complete trace + horizontal extend.
+        prevDiagonal._score = 2;
+        prevVertical._score = 6;
+        _setBit(prevVertical, True(), DynamicGapExtensionVertical());
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                    scoringScheme, RecursionDirectionAll(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | +TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::VERTICAL));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::VERTICAL));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionHorizontal()), false);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionVertical()), true);
 
         // Single Trace + vertical open
+        prevDiagonal._score = 2;
         prevVertical._score = 8;
         _setBit(prevVertical, False(), DynamicGapExtensionVertical());
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                    scoringScheme, RecursionDirectionAll(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::HORIZONTAL));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::HORIZONTAL));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionHorizontal()), false);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionVertical()), false);
 
         // Complete trace + vertical extend.
+        prevDiagonal._score = 2;
+        prevVertical._score = 8;
+        _setBit(prevVertical, False(), DynamicGapExtensionVertical());
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                    scoringScheme, RecursionDirectionAll(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | +TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::VERTICAL_OPEN));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::VERTICAL_OPEN));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionHorizontal()), false);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionVertical()), true);
@@ -1951,19 +2207,25 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_dynamic_all_direction)
     {  // From horizontal + vertical + diagonal.
         // Single trace + vertical open + horizontal extend.
         prevHorizontal._score = 6;
+        prevDiagonal._score = 2;
+        prevVertical._score = 8;
+        _setBit(prevVertical, False(), DynamicGapExtensionVertical());
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::HORIZONTAL));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::HORIZONTAL));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionHorizontal()), false);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionVertical()), false);
 
         // Complete trace + vertical open + horizontal extend.
+        prevDiagonal._score = 2;
+        prevVertical._score = 8;
+        _setBit(prevVertical, False(), DynamicGapExtensionVertical());
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                    scoringScheme, RecursionDirectionAll(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionHorizontal()), true);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionVertical()), true);
@@ -1971,59 +2233,75 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_global_dynamic_all_direction)
         // Single trace + vertical open + horizontal open.
         _setBit(prevHorizontal, False(), DynamicGapExtensionHorizontal());
         prevHorizontal._score = 8;
+        prevDiagonal._score = 2;
+        prevVertical._score = 8;
+        _setBit(prevVertical, False(), DynamicGapExtensionVertical());
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                    scoringScheme, RecursionDirectionAll(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::HORIZONTAL_OPEN));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::HORIZONTAL_OPEN));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionHorizontal()), false);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionVertical()), false);
 
         // Complete trace + vertical open + horizontal open.
+        prevDiagonal._score = 2;
+        prevVertical._score = 8;
+        _setBit(prevVertical, False(), DynamicGapExtensionVertical());
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                    scoringScheme, RecursionDirectionAll(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionHorizontal()), true);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionVertical()), true);
 
         // Single trace + vertical extend + horizontal open.
-        _setBit(prevVertical, True(), DynamicGapExtensionVertical());
+        prevDiagonal._score = 2;
         prevVertical._score = 6;
+        _setBit(prevVertical, True(), DynamicGapExtensionVertical());
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                    scoringScheme, RecursionDirectionAll(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL | TraceBitMap_<>::HORIZONTAL_OPEN));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL | TraceBitMap_<>::HORIZONTAL_OPEN));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionHorizontal()), false);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionVertical()), false);
 
         // Complete trace + vertical open + horizontal extend.
+        prevDiagonal._score = 2;
+        prevVertical._score = 6;
+        _setBit(prevVertical, True(), DynamicGapExtensionVertical());
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                    scoringScheme, RecursionDirectionAll(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionHorizontal()), true);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionVertical()), true);
 
         // Single trace + vertical extend + horizontal extend.
+        prevDiagonal._score = 2;
+        prevVertical._score = 6;
+        _setBit(prevVertical, True(), DynamicGapExtensionVertical());
         _setBit(prevHorizontal, True(), DynamicGapExtensionHorizontal());
         prevHorizontal._score = 6;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                    scoringScheme, RecursionDirectionAll(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL | TraceBitMap_<>::HORIZONTAL));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL | TraceBitMap_<>::HORIZONTAL));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionHorizontal()), false);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionVertical()), false);
 
         // Complete trace + vertical extend + horizontal extend.
+        prevDiagonal._score = 2;
+        prevVertical._score = 6;
+        _setBit(prevVertical, True(), DynamicGapExtensionVertical());
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                    scoringScheme, RecursionDirectionAll(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionHorizontal()), true);
         SEQAN_ASSERT_EQ(isGapExtension(activeCell, DynamicGapExtensionVertical()), true);
@@ -2051,7 +2329,7 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_local_linear_diagonal_direction)
     TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                            scoringScheme, RecursionDirectionDiagonal(), TDPProfileSingleTrace());
 
-    SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::DIAGONAL);
+    SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::DIAGONAL));
     SEQAN_ASSERT_EQ(activeCell._score, 4);
     SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
     SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
@@ -2060,7 +2338,7 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_local_linear_diagonal_direction)
     traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                scoringScheme, RecursionDirectionDiagonal(), TDPProfileCompleteTrace());
 
-    SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::DIAGONAL);
+    SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::DIAGONAL));
     SEQAN_ASSERT_EQ(activeCell._score, 4);
     SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
     SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
@@ -2069,16 +2347,17 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_local_linear_diagonal_direction)
     traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'C', 'A',
                                scoringScheme, RecursionDirectionDiagonal(), TDPProfileSingleTrace());
 
-    SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::NONE);
+    SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::NONE));
     SEQAN_ASSERT_EQ(activeCell._score, 0);
     SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
     SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
     SEQAN_ASSERT_EQ(prevVertical._score, 10);
 
+    prevVertical._score = 10;
     traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'C', 'A',
                                scoringScheme, RecursionDirectionDiagonal(), TDPProfileCompleteTrace());
 
-    SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::NONE);
+    SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::DIAGONAL));
     SEQAN_ASSERT_EQ(activeCell._score, 0);
     SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
     SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
@@ -2107,40 +2386,46 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_local_linear_horizontal_direction)
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionHorizontal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 6);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 6);
 
+        prevDiagonal._score = 2;
+        prevVertical._score = 10;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionHorizontal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 6);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 6);
     }
     {
+        prevDiagonal._score = 2;
+        prevVertical._score = 10;
         prevHorizontal._score = 2;
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'C', 'A',
                                                scoringScheme, RecursionDirectionHorizontal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::NONE);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::NONE));
         SEQAN_ASSERT_EQ(activeCell._score, 0);
         SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 2);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 0);
 
+        prevDiagonal._score = 2;
+        prevVertical._score = 10;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'C', 'A',
                                                scoringScheme, RecursionDirectionHorizontal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::NONE);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::NONE));
         SEQAN_ASSERT_EQ(activeCell._score, 0);
         SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 2);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 0);
     }
 }
 SEQAN_DEFINE_TEST(test_dp_formula_trace_local_linear_vertical_direction)
@@ -2165,40 +2450,45 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_local_linear_vertical_direction)
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionVertical(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 6);
         SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 6);
 
+        prevDiagonal._score = 2;
+        prevVertical._score = 10;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionVertical(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 6);
         SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 6);
     }
     {
+        prevDiagonal._score = 2;
         prevVertical._score = 2;
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'C', 'A',
                                                scoringScheme, RecursionDirectionVertical(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::NONE);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::NONE));
         SEQAN_ASSERT_EQ(activeCell._score, 0);
         SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 2);
+        SEQAN_ASSERT_EQ(prevVertical._score, 0);
 
+        prevDiagonal._score = 2;
+        prevVertical._score = 2;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'C', 'A',
                                                scoringScheme, RecursionDirectionVertical(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::NONE);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::NONE));
         SEQAN_ASSERT_EQ(activeCell._score, 0);
         SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 2);
+        SEQAN_ASSERT_EQ(prevVertical._score, 0);
     }
 }
 SEQAN_DEFINE_TEST(test_dp_formula_trace_local_linear_upper_band_direction)
@@ -2223,42 +2513,49 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_local_linear_upper_band_direction)
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionUpperDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 8);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 8);
-        SEQAN_ASSERT_EQ(prevVertical._score, 2);
+        SEQAN_ASSERT_EQ(prevVertical._score, 4);
 
+        prevDiagonal._score = 2;
+        prevVertical._score = 2;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionUpperDiagonal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | +TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 8);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 8);
-        SEQAN_ASSERT_EQ(prevVertical._score, 2);
+        SEQAN_ASSERT_EQ(prevVertical._score, 4);
     }
     {
         prevHorizontal._score = 2;
+        prevDiagonal._score = 2;
+        prevVertical._score = 2;
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'C', 'A',
                                                scoringScheme, RecursionDirectionVertical(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::NONE);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::NONE));
         SEQAN_ASSERT_EQ(activeCell._score, 0);
         SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 2);
-        SEQAN_ASSERT_EQ(prevVertical._score, 2);
+        SEQAN_ASSERT_EQ(prevVertical._score, 0);
 
+        prevDiagonal._score = 2;
+        prevVertical._score = 2;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'C', 'A',
                                                scoringScheme, RecursionDirectionVertical(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::NONE);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::NONE));
         SEQAN_ASSERT_EQ(activeCell._score, 0);
         SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 2);
-        SEQAN_ASSERT_EQ(prevVertical._score, 2);
+        SEQAN_ASSERT_EQ(prevVertical._score, 0);
     }
 }
+
 SEQAN_DEFINE_TEST(test_dp_formula_trace_local_linear_lower_band_direction)
 {
     using namespace seqan;
@@ -2281,7 +2578,7 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_local_linear_lower_band_direction)
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionLowerDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
         SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 2);
@@ -2290,27 +2587,30 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_local_linear_lower_band_direction)
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionLowerDiagonal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | +TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
         SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 2);
         SEQAN_ASSERT_EQ(prevVertical._score, 8);
     }
     {
+        prevDiagonal._score = 2;
         prevVertical._score = 2;
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'C', 'A',
                                                scoringScheme, RecursionDirectionLowerDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::NONE);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::NONE));
         SEQAN_ASSERT_EQ(activeCell._score, 0);
         SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 2);
         SEQAN_ASSERT_EQ(prevVertical._score, 2);
 
+        prevDiagonal._score = 2;
+        prevVertical._score = 2;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'C', 'A',
                                                scoringScheme, RecursionDirectionLowerDiagonal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::NONE);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::DIAGONAL));
         SEQAN_ASSERT_EQ(activeCell._score, 0);
         SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 2);
@@ -2340,21 +2640,23 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_local_linear_all_direction)
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 8);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 8);
-        SEQAN_ASSERT_EQ(prevVertical._score, 8);
+        SEQAN_ASSERT_EQ(prevVertical._score, 4);
 
+        prevDiagonal._score = 2;
+        prevVertical._score = 8;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::DIAGONAL | +TraceBitMap_<>::HORIZONTAL | +TraceBitMap_<>::VERTICAL |
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::VERTICAL |
                                      TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 8);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 8);
-        SEQAN_ASSERT_EQ(prevVertical._score, 8);
+        SEQAN_ASSERT_EQ(prevVertical._score, 4);
     }
     {
         prevDiagonal._score = 0;
@@ -2363,20 +2665,22 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_local_linear_all_direction)
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'C', 'A',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::NONE);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::NONE));
         SEQAN_ASSERT_EQ(activeCell._score, 0);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, 0);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 2);
-        SEQAN_ASSERT_EQ(prevVertical._score, 2);
+        SEQAN_ASSERT_EQ(prevVertical._score, 0);
 
+        prevDiagonal._score = 0;
+        prevVertical._score = 2;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'C', 'A',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::NONE);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::NONE));
         SEQAN_ASSERT_EQ(activeCell._score, 0);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, 0);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 2);
-        SEQAN_ASSERT_EQ(prevVertical._score, 2);
+        SEQAN_ASSERT_EQ(prevVertical._score, 0);
     }
 }
 
@@ -2391,15 +2695,11 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_local_affine_diagonal_direction)
     DPCell_<int, AffineGaps> activeCell;
     DPCell_<int, AffineGaps> prevDiagonal;
     prevDiagonal._score = 2;
-    prevDiagonal._horizontalScore = 4;
-    prevDiagonal._verticalScore = 4;
     DPCell_<int, AffineGaps> prevHorizontal;
     prevHorizontal._score = 10;
     prevHorizontal._horizontalScore = 4;
-    prevHorizontal._verticalScore = 4;
     DPCell_<int, AffineGaps> prevVertical;
     prevVertical._score = 10;
-    prevVertical._horizontalScore = 4;
     prevVertical._verticalScore = 4;
 
     Score<int, Simple> scoringScheme(2, -2, -4, -6);
@@ -2409,7 +2709,7 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_local_affine_diagonal_direction)
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::DIAGONAL);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::DIAGONAL));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
         SEQAN_ASSERT_EQ(activeCell._verticalScore, inf);
         SEQAN_ASSERT_EQ(activeCell._horizontalScore, inf);
@@ -2420,7 +2720,7 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_local_affine_diagonal_direction)
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionDiagonal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::DIAGONAL);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::DIAGONAL));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
         SEQAN_ASSERT_EQ(activeCell._verticalScore, inf);
         SEQAN_ASSERT_EQ(activeCell._horizontalScore, inf);
@@ -2431,31 +2731,32 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_local_affine_diagonal_direction)
 
 
     {
-        prevDiagonal._horizontalScore = 2;
-        prevDiagonal._verticalScore = 2;
+        prevDiagonal._score = 2;
+        prevVertical._score = 10;
+        prevVertical._verticalScore = 4;
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'C', 'A',
                                                scoringScheme, RecursionDirectionDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::NONE);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::NONE));
         SEQAN_ASSERT_EQ(activeCell._score, 0);
-        SEQAN_ASSERT_EQ(activeCell._verticalScore, 0);
-        SEQAN_ASSERT_EQ(activeCell._horizontalScore, 0);
+        SEQAN_ASSERT_EQ(activeCell._horizontalScore, inf);
         SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
         SEQAN_ASSERT_EQ(prevVertical._score, 10);
 
+        prevDiagonal._score = 2;
+        prevVertical._score = 10;
+        prevVertical._verticalScore = 4;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'C', 'A',
                                                scoringScheme, RecursionDirectionDiagonal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::NONE);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::DIAGONAL));
         SEQAN_ASSERT_EQ(activeCell._score, 0);
-        SEQAN_ASSERT_EQ(activeCell._verticalScore, 0);
-        SEQAN_ASSERT_EQ(activeCell._horizontalScore, 0);
+        SEQAN_ASSERT_EQ(activeCell._horizontalScore, inf);
         SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
         SEQAN_ASSERT_EQ(prevVertical._score, 10);
     }
-
 }
 
 SEQAN_DEFINE_TEST(test_dp_formula_trace_local_affine_horizontal_direction)
@@ -2469,68 +2770,68 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_local_affine_horizontal_direction)
     DPCell_<int, AffineGaps> activeCell;
     DPCell_<int, AffineGaps> prevDiagonal;
     prevDiagonal._score = 2;
-    prevDiagonal._horizontalScore = 4;
-    prevDiagonal._verticalScore = 4;
     DPCell_<int, AffineGaps> prevHorizontal;
     prevHorizontal._score = 10;
     prevHorizontal._horizontalScore = 8;
-    prevHorizontal._verticalScore = 4;
     DPCell_<int, AffineGaps> prevVertical;
     prevVertical._score = 10;
-    prevVertical._horizontalScore = 4;
     prevVertical._verticalScore = 4;
 
     Score<int, Simple> scoringScheme(2, -2, -4, -6);
-    int inf = DPCellDefaultInfinity<DPCell_<int, AffineGaps> >::VALUE;
 
     {
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionHorizontal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::HORIZONTAL | +TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
-        SEQAN_ASSERT_EQ(activeCell._verticalScore, inf);
         SEQAN_ASSERT_EQ(activeCell._horizontalScore, 4);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 4);
 
+        prevDiagonal._score = 2;
+        prevVertical._score = 10;
+        prevVertical._verticalScore = 4;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                    scoringScheme, RecursionDirectionHorizontal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::HORIZONTAL_OPEN | +TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
-        SEQAN_ASSERT_EQ(activeCell._verticalScore, inf);
         SEQAN_ASSERT_EQ(activeCell._horizontalScore, 4);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 4);
     }
 
     {
+        prevDiagonal._score = 2;
+        prevVertical._score = 10;
+        prevVertical._verticalScore = 4;
         prevHorizontal._score = 1;
         prevHorizontal._horizontalScore = 1;
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'C', 'A',
                                                scoringScheme, RecursionDirectionHorizontal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::NONE);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::NONE));
         SEQAN_ASSERT_EQ(activeCell._score, 0);
-        SEQAN_ASSERT_EQ(activeCell._verticalScore, 0);
-        SEQAN_ASSERT_EQ(activeCell._horizontalScore, 0);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
+        SEQAN_ASSERT_EQ(activeCell._horizontalScore, -3);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 1);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 1);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 0);
 
+        prevDiagonal._score = 2;
+        prevVertical._score = 10;
+        prevVertical._verticalScore = 4;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'C', 'A',
                                                scoringScheme, RecursionDirectionHorizontal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::NONE);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::NONE));
         SEQAN_ASSERT_EQ(activeCell._score, 0);
-        SEQAN_ASSERT_EQ(activeCell._verticalScore, 0);
-        SEQAN_ASSERT_EQ(activeCell._horizontalScore, 0);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
+        SEQAN_ASSERT_EQ(activeCell._horizontalScore, -3);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 1);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 1);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 0);
     }
 }
 
@@ -2545,15 +2846,11 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_local_affine_vertical_direction)
     DPCell_<int, AffineGaps> activeCell;
     DPCell_<int, AffineGaps> prevDiagonal;
     prevDiagonal._score = 2;
-    prevDiagonal._horizontalScore = 4;
-    prevDiagonal._verticalScore = 4;
     DPCell_<int, AffineGaps> prevHorizontal;
     prevHorizontal._score = 10;
     prevHorizontal._horizontalScore = 8;
-    prevHorizontal._verticalScore = 4;
     DPCell_<int, AffineGaps> prevVertical;
     prevVertical._score = 10;
-    prevVertical._horizontalScore = 4;
     prevVertical._verticalScore = 8;
 
     Score<int, Simple> scoringScheme(2, -2, -4, -6);
@@ -2563,50 +2860,53 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_local_affine_vertical_direction)
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionVertical(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::VERTICAL | +TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
-        SEQAN_ASSERT_EQ(activeCell._verticalScore, 4);
         SEQAN_ASSERT_EQ(activeCell._horizontalScore, inf);
         SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 4);
 
+        prevDiagonal._score = 2;
+        prevVertical._score = 10;
+        prevVertical._verticalScore = 8;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                    scoringScheme, RecursionDirectionVertical(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::VERTICAL | +TraceBitMap_<>::VERTICAL_OPEN | +TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::VERTICAL | TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
-        SEQAN_ASSERT_EQ(activeCell._verticalScore, 4);
         SEQAN_ASSERT_EQ(activeCell._horizontalScore, inf);
         SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 4);
     }
 
     {
+        prevDiagonal._score = 2;
         prevVertical._score = 1;
         prevVertical._verticalScore = 1;
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'C', 'A',
                                                scoringScheme, RecursionDirectionVertical(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::NONE);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::NONE));
         SEQAN_ASSERT_EQ(activeCell._score, 0);
-        SEQAN_ASSERT_EQ(activeCell._verticalScore, 0);
-        SEQAN_ASSERT_EQ(activeCell._horizontalScore, 0);
+        SEQAN_ASSERT_EQ(activeCell._horizontalScore, inf);
         SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 1);
+        SEQAN_ASSERT_EQ(prevVertical._score, 0);
 
+        prevDiagonal._score = 2;
+        prevVertical._score = 1;
+        prevVertical._verticalScore = 1;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'C', 'A',
                                                scoringScheme, RecursionDirectionVertical(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::NONE);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::NONE));
         SEQAN_ASSERT_EQ(activeCell._score, 0);
-        SEQAN_ASSERT_EQ(activeCell._verticalScore, 0);
-        SEQAN_ASSERT_EQ(activeCell._horizontalScore, 0);
+        SEQAN_ASSERT_EQ(activeCell._horizontalScore, inf);
         SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 1);
+        SEQAN_ASSERT_EQ(prevVertical._score, 0);
     }
 }
 
@@ -2621,69 +2921,69 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_local_affine_upper_band_direction)
     DPCell_<int, AffineGaps> activeCell;
     DPCell_<int, AffineGaps> prevDiagonal;
     prevDiagonal._score = 2;
-    prevDiagonal._horizontalScore = 4;
-    prevDiagonal._verticalScore = 4;
     DPCell_<int, AffineGaps> prevHorizontal;
     prevHorizontal._score = 10;
     prevHorizontal._horizontalScore = 8;
-    prevHorizontal._verticalScore = 4;
     DPCell_<int, AffineGaps> prevVertical;
     prevVertical._score = 10;
-    prevVertical._horizontalScore = 4;
     prevVertical._verticalScore = 8;
 
     Score<int, Simple> scoringScheme(2, -2, -4, -6);
-    int inf = DPCellDefaultInfinity<DPCell_<int, AffineGaps> >::VALUE;
 
     {
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionUpperDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::DIAGONAL));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::DIAGONAL));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
         SEQAN_ASSERT_EQ(activeCell._horizontalScore, 4);
-        SEQAN_ASSERT_EQ(activeCell._verticalScore, inf);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 4);
 
+        prevDiagonal._score = 2;
+        prevVertical._score = 10;
+        prevVertical._verticalScore = 8;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                    scoringScheme, RecursionDirectionUpperDiagonal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::HORIZONTAL | +TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX |
-                                     +TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::HORIZONTAL_OPEN));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX |
+                                     TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::HORIZONTAL_OPEN));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
         SEQAN_ASSERT_EQ(activeCell._horizontalScore, 4);
-        SEQAN_ASSERT_EQ(activeCell._verticalScore, inf);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 4);
     }
 
     {
+        prevDiagonal._score = 2;
+        prevVertical._score = 10;
+        prevVertical._verticalScore = 8;
         prevHorizontal._score = 1;
         prevHorizontal._horizontalScore = 1;
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'C', 'A',
                                                scoringScheme, RecursionDirectionUpperDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::NONE);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::NONE));
         SEQAN_ASSERT_EQ(activeCell._score, 0);
-        SEQAN_ASSERT_EQ(activeCell._verticalScore, 0);
-        SEQAN_ASSERT_EQ(activeCell._horizontalScore, 0);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
+        SEQAN_ASSERT_EQ(activeCell._horizontalScore, -3);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 1);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 1);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 0);
 
+        prevDiagonal._score = 2;
+        prevVertical._score = 10;
+        prevVertical._verticalScore = 8;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'C', 'A',
                                    scoringScheme, RecursionDirectionUpperDiagonal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::NONE);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::HORIZONTAL));
         SEQAN_ASSERT_EQ(activeCell._score, 0);
-        SEQAN_ASSERT_EQ(activeCell._verticalScore, 0);
-        SEQAN_ASSERT_EQ(activeCell._horizontalScore, 0);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
+        SEQAN_ASSERT_EQ(activeCell._horizontalScore, -3);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 1);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 1);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 0);
     }
 }
 
@@ -2699,14 +2999,11 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_local_affine_lower_band_direction)
     DPCell_<int, AffineGaps> prevDiagonal;
     prevDiagonal._score = 2;
     prevDiagonal._horizontalScore = 4;
-    prevDiagonal._verticalScore = 4;
     DPCell_<int, AffineGaps> prevHorizontal;
     prevHorizontal._score = 10;
     prevHorizontal._horizontalScore = 8;
-    prevHorizontal._verticalScore = 4;
     DPCell_<int, AffineGaps> prevVertical;
     prevVertical._score = 10;
-    prevVertical._horizontalScore = 4;
     prevVertical._verticalScore = 8;
 
     Score<int, Simple> scoringScheme(2, -2, -4, -6);
@@ -2716,48 +3013,51 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_local_affine_lower_band_direction)
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionLowerDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::VERTICAL | TraceBitMap_<>::DIAGONAL));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::VERTICAL | TraceBitMap_<>::DIAGONAL));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
         SEQAN_ASSERT_EQ(activeCell._horizontalScore, inf);
-        SEQAN_ASSERT_EQ(activeCell._verticalScore, 4);
         SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
         SEQAN_ASSERT_EQ(prevVertical._score, 10);
 
+        prevDiagonal._score = 2;
+        prevVertical._score = 10;
+        prevVertical._verticalScore = 8;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                    scoringScheme, RecursionDirectionLowerDiagonal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::VERTICAL | +TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX |
-                                     +TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL_OPEN));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX |
+                                     TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL_OPEN));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
         SEQAN_ASSERT_EQ(activeCell._horizontalScore, inf);
-        SEQAN_ASSERT_EQ(activeCell._verticalScore, 4);
         SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
         SEQAN_ASSERT_EQ(prevVertical._score, 10);
     }
 
     {
+        prevDiagonal._score = 2;
         prevVertical._score = 1;
         prevVertical._verticalScore = 1;
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'C', 'A',
                                                scoringScheme, RecursionDirectionLowerDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::NONE);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::NONE));
         SEQAN_ASSERT_EQ(activeCell._score, 0);
-        SEQAN_ASSERT_EQ(activeCell._horizontalScore, 0);
-        SEQAN_ASSERT_EQ(activeCell._verticalScore, 0);
+        SEQAN_ASSERT_EQ(activeCell._horizontalScore, inf);
         SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
         SEQAN_ASSERT_EQ(prevVertical._score, 1);
 
+        prevDiagonal._score = 2;
+        prevVertical._score = 1;
+        prevVertical._verticalScore = 1;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'C', 'A',
                                    scoringScheme, RecursionDirectionLowerDiagonal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::NONE);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL));
         SEQAN_ASSERT_EQ(activeCell._score, 0);
-        SEQAN_ASSERT_EQ(activeCell._horizontalScore, 0);
-        SEQAN_ASSERT_EQ(activeCell._verticalScore, 0);
+        SEQAN_ASSERT_EQ(activeCell._horizontalScore, inf);
         SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
         SEQAN_ASSERT_EQ(prevVertical._score, 1);
@@ -2776,14 +3076,11 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_local_affine_all_direction)
     DPCell_<int, AffineGaps> prevDiagonal;
     prevDiagonal._score = 2;
     prevDiagonal._horizontalScore = 4;
-    prevDiagonal._verticalScore = 4;
     DPCell_<int, AffineGaps> prevHorizontal;
     prevHorizontal._score = 10;
     prevHorizontal._horizontalScore = 8;
-    prevHorizontal._verticalScore = 4;
     DPCell_<int, AffineGaps> prevVertical;
     prevVertical._score = 10;
-    prevVertical._horizontalScore = 4;
     prevVertical._verticalScore = 8;
 
     Score<int, Simple> scoringScheme(2, -2, -4, -6);
@@ -2792,30 +3089,32 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_local_affine_all_direction)
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                                scoringScheme, RecursionDirectionAll(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::VERTICAL | TraceBitMap_<>::DIAGONAL));
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::VERTICAL | TraceBitMap_<>::DIAGONAL));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
         SEQAN_ASSERT_EQ(activeCell._horizontalScore, 4);
-        SEQAN_ASSERT_EQ(activeCell._verticalScore, 4);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 4);
 
+        prevDiagonal._score = 2;
+        prevVertical._score = 10;
+        prevVertical._verticalScore = 8;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                    scoringScheme, RecursionDirectionAll(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, (+TraceBitMap_<>::HORIZONTAL | +TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX |
-                                     +TraceBitMap_<>::VERTICAL | +TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX |
-                                     +TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::HORIZONTAL_OPEN |
+        SEQAN_ASSERT_EQ(traceValue, (TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX |
+                                     TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX |
+                                     TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::HORIZONTAL_OPEN |
                                      TraceBitMap_<>::VERTICAL_OPEN));
         SEQAN_ASSERT_EQ(activeCell._score, 4);
         SEQAN_ASSERT_EQ(activeCell._horizontalScore, 4);
-        SEQAN_ASSERT_EQ(activeCell._verticalScore, 4);
-        SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
+        SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
-        SEQAN_ASSERT_EQ(prevVertical._score, 10);
+        SEQAN_ASSERT_EQ(prevVertical._score, 4);
     }
 
     {
+        prevDiagonal._score = 2;
         prevHorizontal._score = 1;
         prevHorizontal._horizontalScore = 1;
         prevVertical._score = 1;
@@ -2823,16 +3122,19 @@ SEQAN_DEFINE_TEST(test_dp_formula_trace_local_affine_all_direction)
         TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'C', 'A',
                                                scoringScheme, RecursionDirectionLowerDiagonal(), TDPProfileSingleTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::NONE);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::NONE));
         SEQAN_ASSERT_EQ(activeCell._score, 0);
         SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 1);
         SEQAN_ASSERT_EQ(prevVertical._score, 1);
 
+        prevDiagonal._score = 2;
+        prevVertical._score = 1;
+        prevVertical._verticalScore = 1;
         traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'C', 'A',
                                                scoringScheme, RecursionDirectionLowerDiagonal(), TDPProfileCompleteTrace());
 
-        SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::NONE);
+        SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL));
         SEQAN_ASSERT_EQ(activeCell._score, 0);
         SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
         SEQAN_ASSERT_EQ(prevHorizontal._score, 1);
@@ -2860,7 +3162,7 @@ SEQAN_DEFINE_TEST(test_dp_formula_notrace_diagonal_direction)
     TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                            scoringScheme, RecursionDirectionDiagonal(), TDPProfile());
 
-    SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::NONE);
+    SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::NONE));
     SEQAN_ASSERT_EQ(activeCell._score, 4);
     SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
     SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
@@ -2887,11 +3189,11 @@ SEQAN_DEFINE_TEST(test_dp_formula_notrace_horizontal_direction)
     TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                            scoringScheme, RecursionDirectionHorizontal(), TDPProfile());
 
-    SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::NONE);
+    SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::NONE));
     SEQAN_ASSERT_EQ(activeCell._score, 6);
-    SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
+    SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
     SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
-    SEQAN_ASSERT_EQ(prevVertical._score, 10);
+    SEQAN_ASSERT_EQ(prevVertical._score, 6);
 }
 
 SEQAN_DEFINE_TEST(test_dp_formula_notrace_vertical_direction)
@@ -2914,11 +3216,11 @@ SEQAN_DEFINE_TEST(test_dp_formula_notrace_vertical_direction)
     TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                            scoringScheme, RecursionDirectionVertical(), TDPProfile());
 
-    SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::NONE);
+    SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::NONE));
     SEQAN_ASSERT_EQ(activeCell._score, 6);
     SEQAN_ASSERT_EQ(prevDiagonal._score, 2);
     SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
-    SEQAN_ASSERT_EQ(prevVertical._score, 10);
+    SEQAN_ASSERT_EQ(prevVertical._score, 6);
 }
 
 SEQAN_DEFINE_TEST(test_dp_formula_notrace_upper_band_direction)
@@ -2941,11 +3243,11 @@ SEQAN_DEFINE_TEST(test_dp_formula_notrace_upper_band_direction)
     TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                            scoringScheme, RecursionDirectionUpperDiagonal(), TDPProfile());
 
-    SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::NONE);
+    SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::NONE));
     SEQAN_ASSERT_EQ(activeCell._score, 6);
-    SEQAN_ASSERT_EQ(prevDiagonal._score, 4);
+    SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
     SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
-    SEQAN_ASSERT_EQ(prevVertical._score, 10);
+    SEQAN_ASSERT_EQ(prevVertical._score, 6);
 }
 
 SEQAN_DEFINE_TEST(test_dp_formula_notrace_lower_band_direction)
@@ -2968,7 +3270,7 @@ SEQAN_DEFINE_TEST(test_dp_formula_notrace_lower_band_direction)
     TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                            scoringScheme, RecursionDirectionLowerDiagonal(), TDPProfile());
 
-    SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::NONE);
+    SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::NONE));
     SEQAN_ASSERT_EQ(activeCell._score, 6);
     SEQAN_ASSERT_EQ(prevDiagonal._score, 4);
     SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
@@ -2995,11 +3297,11 @@ SEQAN_DEFINE_TEST(test_dp_formula_notrace_all_direction)
     TTraceValue traceValue = _computeScore(activeCell, prevDiagonal, prevHorizontal, prevVertical, 'A', 'A',
                                            scoringScheme, RecursionDirectionAll(), TDPProfile());
 
-    SEQAN_ASSERT_EQ(traceValue, +TraceBitMap_<>::NONE);
+    SEQAN_ASSERT_EQ(static_cast<int>(traceValue), static_cast<int>(TraceBitMap_<>::NONE));
     SEQAN_ASSERT_EQ(activeCell._score, 6);
-    SEQAN_ASSERT_EQ(prevDiagonal._score, 4);
+    SEQAN_ASSERT_EQ(prevDiagonal._score, 10);
     SEQAN_ASSERT_EQ(prevHorizontal._score, 10);
-    SEQAN_ASSERT_EQ(prevVertical._score, 10);
+    SEQAN_ASSERT_EQ(prevVertical._score, 6);
 }
 
 
diff --git a/tests/align/test_alignment_dp_matrix.h b/tests/align/test_alignment_dp_matrix.h
index eddb95c..5f9cfb2 100644
--- a/tests/align/test_alignment_dp_matrix.h
+++ b/tests/align/test_alignment_dp_matrix.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                         test_alignment_dp_matrix.h
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -294,7 +294,7 @@ void testAlignmentDPMatrixGetValueMF(TSpec const &)
     typedef DPMatrix_<int, TSpec> TDPMatrix;
     typedef DPMatrix_<int, TSpec> const TDPMatrixConst;
 
-    bool result = IsSameType<typename GetValue<TDPMatrix>::Type, int &>::VALUE;
+    bool result = IsSameType<typename GetValue<TDPMatrix>::Type, int const &>::VALUE;
     bool result2 = IsSameType<typename GetValue<TDPMatrixConst>::Type, int const &>::VALUE;
 
     SEQAN_ASSERT_EQ(result, true);
diff --git a/tests/align/test_alignment_dp_matrix_navigator.h b/tests/align/test_alignment_dp_matrix_navigator.h
index e5919b3..36d4c25 100644
--- a/tests/align/test_alignment_dp_matrix_navigator.h
+++ b/tests/align/test_alignment_dp_matrix_navigator.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                    test_alignment_dp_matrix_navigator.h
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -35,50 +35,18 @@
 #ifndef SANDBOX_RMAERKER_TESTS_ALIGN2_TEST_ALIGNMENT_DP_MATRIX_NAVIGATOR_H_
 #define SANDBOX_RMAERKER_TESTS_ALIGN2_TEST_ALIGNMENT_DP_MATRIX_NAVIGATOR_H_
 
-#include <seqan/basic.h>
+#include <algorithm>
 
+#include <seqan/basic.h>
 #include <seqan/align.h>
 
 
 template <typename TSpec>
-void testAlignmentDPMatrixScoreNavigatorConstructorDefault(TSpec const &)
-{
-    using namespace seqan;
-
-    typedef DPMatrix_<int, TSpec> TDPMatrix;
-    typedef typename Value<TDPMatrix>::Type TDPCell;
-    typedef typename Iterator<TDPMatrix, Standard>::Type TIterator;
-
-    DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, NavigateColumnWise> dpScoreMatrixNavigator;
-
-    // Test if default constructor sets NULL pointer
-    bool resultPointer = true;
-    if (dpScoreMatrixNavigator._ptrDataContainer)
-        resultPointer = false;
-
-    bool resultPrevColIter = true;
-    if (dpScoreMatrixNavigator._prevColIterator != TIterator())
-        resultPrevColIter = false;
-
-    bool resultActiveColIter = true;
-    if (dpScoreMatrixNavigator._activeColIterator != TIterator())
-        resultActiveColIter = false;
-
-    SEQAN_ASSERT_EQ(resultPointer, true);
-    SEQAN_ASSERT_EQ(resultPrevColIter, true);
-    SEQAN_ASSERT_EQ(resultActiveColIter, true);
-    SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, 0);
-    SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, TDPCell());
-    SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, TDPCell());
-    SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, TDPCell());
-}
-
-template <typename TSpec>
 void testAlignmentDPMatrixTraceNavigatorConstructorDefault(TSpec const &)
 {
     using namespace seqan;
 
-    typedef DPMatrix_<int, FullDPMatrix> TDPMatrix;
+    typedef DPMatrix_<DPCell_<int, LinearGaps>, FullDPMatrix> TDPMatrix;
     typedef typename Iterator<TDPMatrix, Standard>::Type TIterator;
 
     DPMatrixNavigator_<TDPMatrix, DPTraceMatrix<TSpec>, NavigateColumnWise> dpTraceMatrixNavigator;
@@ -97,116 +65,70 @@ void testAlignmentDPMatrixTraceNavigatorConstructorDefault(TSpec const &)
     SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._laneLeap, 0);
 }
 
-void testAlignmentDPMatrixNavigatorScoreMarixSparseContructor()
-{
-    using namespace seqan;
-
-    typedef DPMatrix_<int, SparseDPMatrix> TDPMatrix;
-    typedef Value<TDPMatrix>::Type TDPCell;
-    typedef Iterator<TDPMatrix, Standard>::Type TIterator;
-
-    DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, NavigateColumnWise> dpScoreMatrixNavigator;
-
-    // Test if default constructor sets NULL pointer
-    bool resultPointer = true;
-    if (dpScoreMatrixNavigator._ptrDataContainer)
-        resultPointer = false;
-
-    bool resultActiveColIter = true;
-    if (dpScoreMatrixNavigator._activeColIterator != TIterator())
-        resultActiveColIter = false;
-
-    bool resultPrevColIter = true;
-    if (dpScoreMatrixNavigator._prevColIterator != TIterator())
-        resultPrevColIter = false;
-
-    SEQAN_ASSERT_EQ(resultPointer, true);
-    SEQAN_ASSERT_EQ(resultActiveColIter, true);
-    SEQAN_ASSERT_EQ(resultPrevColIter, true);
-    SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, 0);
-    SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, TDPCell());
-    SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, TDPCell());
-    SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, TDPCell());
-}
-
-
 void testAlignmentDPMatrixNavigatorScoreMarixInitUnbanded()
 {
     using namespace seqan;
 
-    typedef DPMatrix_<int, FullDPMatrix> TDPMatrix;
+    typedef DPMatrix_<DPCell_<int, LinearGaps>, FullDPMatrix> TDPMatrix;
     typedef Value<TDPMatrix>::Type TDPCell;
 
-    DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, NavigateColumnWise> dpScoreMatrixNavigator;
-
     TDPMatrix dpMatrix;
     setLength(dpMatrix, DPMatrixDimension_::HORIZONTAL, 10);
     setLength(dpMatrix, DPMatrixDimension_::VERTICAL, 10);
-    resize(dpMatrix, 0);
+    resize(dpMatrix, TDPCell{});
 
-    _init(dpScoreMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
+    DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, NavigateColumnWise>
+        dpScoreMatrixNavigator{dpMatrix, DPBandConfig<BandOff>{}};
 
     SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix);
     SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), -10);
     SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, 1);
-    SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, TDPCell());
-    SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, TDPCell());
-    SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, TDPCell());
 }
 
 void testAlignmentDPMatrixNavigatorScoreMarixSparseInitUnbanded()
 {
     using namespace seqan;
 
-    typedef DPMatrix_<int, SparseDPMatrix> TDPMatrix;
+    typedef DPMatrix_<DPCell_<int, LinearGaps>, SparseDPMatrix> TDPMatrix;
     typedef Value<TDPMatrix>::Type TDPCell;
     typedef DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, NavigateColumnWise> TDPMatrixNavigator;
 
-    TDPMatrixNavigator dpScoreMatrixNavigator;
-
     TDPMatrix dpMatrix;
     setLength(dpMatrix, DPMatrixDimension_::HORIZONTAL, 10);
     setLength(dpMatrix, DPMatrixDimension_::VERTICAL, 10);
-    resize(dpMatrix, 0);
+    resize(dpMatrix, TDPCell{});
 
-    _init(dpScoreMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
+    TDPMatrixNavigator dpScoreMatrixNavigator{dpMatrix, DPBandConfig<BandOff>{}};
 
     SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix);
     SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 0);
     SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 0);
-    SEQAN_ASSERT_EQ(value(dpScoreMatrixNavigator._activeColIterator), 0);
-    SEQAN_ASSERT_EQ(value(dpScoreMatrixNavigator._prevColIterator), 0);
+    SEQAN_ASSERT_EQ(value(dpScoreMatrixNavigator._activeColIterator), TDPCell{});
+    SEQAN_ASSERT_EQ(value(dpScoreMatrixNavigator._prevColIterator), TDPCell{});
     SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, -9);
-    SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, TDPCell());
-    SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, TDPCell());
-    SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, TDPCell());
 }
 
 void testAlignmentDPMatrixNavigatorScoreMarixInitBanded()
 {
     using namespace seqan;
 
-    typedef DPMatrix_<int, FullDPMatrix> TDPMatrix;
+    typedef DPMatrix_<DPCell_<int, LinearGaps>, FullDPMatrix> TDPMatrix;
     typedef Value<TDPMatrix>::Type TDPCell;
-    typedef DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, NavigateColumnWise> TDPMatrixNavigator;
+    typedef DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, NavigateColumnWiseBanded> TDPMatrixNavigator;
 
-    TDPMatrixNavigator dpScoreMatrixNavigator;
 
     { // Case1: Band intersects with poit of origin.
         TDPMatrix dpMatrix;
         setLength(dpMatrix, DPMatrixDimension_::HORIZONTAL, 10);
         setLength(dpMatrix, DPMatrixDimension_::VERTICAL, 8);
-        resize(dpMatrix, 0);
+        resize(dpMatrix, TDPCell{});
 
-        _init(dpScoreMatrixNavigator, dpMatrix, DPBandConfig<BandOn>(-4, 3));
+        TDPMatrixNavigator dpScoreMatrixNavigator{dpMatrix, DPBandConfig<BandOn>{-4, 3}};
 
         SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix);
         SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 3);
         SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), -5);
         SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, 4);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, TDPCell());
     }
 
     {
@@ -216,15 +138,13 @@ void testAlignmentDPMatrixNavigatorScoreMarixInitBanded()
         resize(dpMatrix2);
 
         value(host(dpMatrix2), 0) = 10;
-        _init(dpScoreMatrixNavigator, dpMatrix2, DPBandConfig<BandOn>(0, 7));
+
+        TDPMatrixNavigator dpScoreMatrixNavigator{dpMatrix2, DPBandConfig<BandOn>{0, 7}};
 
         SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix2);
         SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix2, Standard()), 7);
         SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix2, Standard()), -1);
         SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, 8);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, TDPCell());
     }
 
     {
@@ -233,45 +153,35 @@ void testAlignmentDPMatrixNavigatorScoreMarixInitBanded()
         setLength(dpMatrix3, DPMatrixDimension_::VERTICAL, 8);
         resize(dpMatrix3);
 
-
-        _init(dpScoreMatrixNavigator, dpMatrix3, DPBandConfig<BandOn>(-7, 0));
+        TDPMatrixNavigator dpScoreMatrixNavigator{dpMatrix3, DPBandConfig<BandOn>{-7, 0}};
 
         SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix3);
         SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix3, Standard()), 0);
         SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix3, Standard()), -8);
         SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, TDPCell());
     }
-
 }
 
 void testAlignmentDPMatrixNavigatorScoreMarixSparseInitBanded()
 {
     using namespace seqan;
 
-    typedef DPMatrix_<int, SparseDPMatrix> TDPMatrix;
+    typedef DPMatrix_<DPCell_<int, LinearGaps>, SparseDPMatrix> TDPMatrix;
     typedef Value<TDPMatrix>::Type TDPCell;
-    typedef DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, NavigateColumnWise> TDPMatrixNavigator;
-
-    TDPMatrixNavigator dpScoreMatrixNavigator;
+    typedef DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, NavigateColumnWiseBanded> TDPMatrixNavigator;
 
     {
         TDPMatrix dpMatrix;
         setLength(dpMatrix, DPMatrixDimension_::HORIZONTAL, 10);
         setLength(dpMatrix, DPMatrixDimension_::VERTICAL, 8);
-        resize(dpMatrix, 0);
+        resize(dpMatrix, TDPCell{});
 
-        _init(dpScoreMatrixNavigator, dpMatrix, DPBandConfig<BandOn>(-4, 3));
+        TDPMatrixNavigator dpScoreMatrixNavigator{dpMatrix, DPBandConfig<BandOn>{-4, 3}};
 
         SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix);
         SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 3);
         SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 3);
         SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, -4);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, TDPCell());
     }
 
     {
@@ -280,15 +190,12 @@ void testAlignmentDPMatrixNavigatorScoreMarixSparseInitBanded()
         setLength(dpMatrix2, DPMatrixDimension_::VERTICAL, 8);
         resize(dpMatrix2);
 
-        _init(dpScoreMatrixNavigator, dpMatrix2, DPBandConfig<BandOn>(0, 7));
+        TDPMatrixNavigator dpScoreMatrixNavigator{dpMatrix2, DPBandConfig<BandOn>{0, 7}};
 
         SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix2);
         SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix2, Standard()), 7);
         SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix2, Standard()), 7);  // Behind the last cell.
         SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, TDPCell());
     }
 
     {
@@ -297,15 +204,12 @@ void testAlignmentDPMatrixNavigatorScoreMarixSparseInitBanded()
         setLength(dpMatrix3, DPMatrixDimension_::VERTICAL, 8);
         resize(dpMatrix3);
 
-        _init(dpScoreMatrixNavigator, dpMatrix3, DPBandConfig<BandOn>(-7, 0));
+        TDPMatrixNavigator dpScoreMatrixNavigator{dpMatrix3, DPBandConfig<BandOn>{-7, 0}};
 
         SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix3);
         SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix3, Standard()), 0);
         SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix3, Standard()), 0);
         SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, -7);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, TDPCell());
     }
 }
 
@@ -313,846 +217,140 @@ void testAlignmentDPMatrixNavigatorScoreMarixGoNextCell()
 {
     using namespace seqan;
 
-    typedef DPMatrix_<int, FullDPMatrix> TDPMatrix;
+    typedef DPMatrix_<DPCell_<int, LinearGaps>, FullDPMatrix> TDPMatrix;
     typedef Value<TDPMatrix>::Type TDPCell;
 
-    DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, NavigateColumnWise> dpScoreMatrixNavigator;
-
     TDPMatrix dpMatrix;
-    setLength(dpMatrix, DPMatrixDimension_::HORIZONTAL, 10);
-    setLength(dpMatrix, DPMatrixDimension_::VERTICAL, 3);
-    resize(dpMatrix, 0);
-    host(dpMatrix)[0] = 0;
-    host(dpMatrix)[1] = 1;
-    host(dpMatrix)[2] = 2;
-    host(dpMatrix)[3] = 3;
-    host(dpMatrix)[4] = 4;
-    host(dpMatrix)[5] = 5;
+    setLength(dpMatrix, DPMatrixDimension_::HORIZONTAL, 4);
+    setLength(dpMatrix, DPMatrixDimension_::VERTICAL, 4);
+    resize(dpMatrix, TDPCell{});
 
+    int score = 0;
+    auto generator = [&score]()
     {
-        _init(dpScoreMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnTop>(), FirstCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), -3);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, 1);
+        TDPCell cell;
+        cell = score++;
+        return cell;
+    };
 
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnTop>(), InnerCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), -2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, 1);
+    std::generate(begin(host(dpMatrix), Standard()), end(host(dpMatrix), Standard()), generator);
 
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnTop>(), LastCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), -1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, 1);
-    }
+    DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, NavigateColumnWise>
+        navi{dpMatrix, DPBandConfig<BandOff>{}};
 
+    // Initialize with 0.
+    _setScoreOfCell(value(navi), 0);
+    // Move along initial column.
+    _goNextCell(navi, MetaColumnDescriptor<DPInitialColumn, FullColumn>{}, FirstCell{});
+    SEQAN_ASSERT_EQ(_scoreOfCell(value(navi)), 0);
+    for (int v_pos = 1; v_pos < 3; ++v_pos)
     {
-        _init(dpScoreMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnMiddle>(), FirstCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), -3);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnMiddle>(), InnerCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), -2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnMiddle>(), LastCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), -1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, 1);
+        _goNextCell(navi, MetaColumnDescriptor<DPInitialColumn, FullColumn>{}, InnerCell{});
+        SEQAN_ASSERT_EQ(_scoreOfCell(value(navi)), v_pos);
     }
+    _goNextCell(navi, MetaColumnDescriptor<DPInitialColumn, FullColumn>{}, LastCell{});
+    SEQAN_ASSERT_EQ(_scoreOfCell(value(navi)), 3);
 
+    // Move along inner columns.
+    for (int h_pos = 1; h_pos < 3; ++h_pos)
     {
-        _init(dpScoreMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnBottom>(), FirstCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), -3);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnBottom>(), InnerCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), -2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnBottom>(), LastCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), -1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, 1);
+        _goNextCell(navi, MetaColumnDescriptor<DPInnerColumn, FullColumn>{}, FirstCell{});
+        SEQAN_ASSERT_EQ(_scoreOfCell(value(navi)), h_pos * 4);
+        SEQAN_ASSERT_EQ(_scoreOfCell(previousCellHorizontal(navi)), (h_pos - 1) * 4);
+        for (int v_pos = 1; v_pos < 3; ++v_pos)
+        {
+            _goNextCell(navi, MetaColumnDescriptor<DPInnerColumn, FullColumn>{}, InnerCell{});
+            SEQAN_ASSERT_EQ(_scoreOfCell(value(navi)), h_pos * 4 + v_pos);
+            SEQAN_ASSERT_EQ(_scoreOfCell(previousCellHorizontal(navi)), (h_pos - 1) * 4 + v_pos);
+        }
+        _goNextCell(navi, MetaColumnDescriptor<DPInnerColumn, FullColumn>{}, LastCell{});
+        SEQAN_ASSERT_EQ(_scoreOfCell(value(navi)), h_pos * 4 + 3);
+        SEQAN_ASSERT_EQ(_scoreOfCell(previousCellHorizontal(navi)), (h_pos - 1) * 4 + 3);
     }
 
+    // Move along last column.
+    _goNextCell(navi, MetaColumnDescriptor<DPFinalColumn, FullColumn>{}, FirstCell{});
+    SEQAN_ASSERT_EQ(_scoreOfCell(value(navi)), 12);
+    SEQAN_ASSERT_EQ(_scoreOfCell(previousCellHorizontal(navi)), 8);
+    for (int v_pos = 1; v_pos < 3; ++v_pos)
     {
-        _init(dpScoreMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, FullColumn>(), FirstCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), -3);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, FullColumn>(), InnerCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), -2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, FullColumn>(), LastCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), -1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, 1);
-    }
-
-    {
-        _init(dpScoreMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-        dpScoreMatrixNavigator._activeColIterator += 2;
-        dpScoreMatrixNavigator._prevColIterator += 2;
-        ++dpScoreMatrixNavigator._laneLeap;  // For the test we simulate as if we were in a band.
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, PartialColumnTop>(), FirstCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 3);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, PartialColumnTop>(), InnerCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 4);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 3);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, PartialColumnTop>(), LastCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 5);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 4);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, 1);
-    }
-
-    {
-        _init(dpScoreMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-        dpScoreMatrixNavigator._activeColIterator += 2;
-        dpScoreMatrixNavigator._prevColIterator += 2;
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, PartialColumnMiddle>(), FirstCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 3);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 4);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, PartialColumnMiddle>(), InnerCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 4);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 3);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, PartialColumnMiddle>(), LastCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 5);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 4);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, 1);
-    }
-
-    {
-        _init(dpScoreMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-        dpScoreMatrixNavigator._activeColIterator += 2;
-        dpScoreMatrixNavigator._prevColIterator += 2;
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, PartialColumnBottom>(), FirstCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 3);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 4);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, PartialColumnBottom>(), InnerCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 4);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 3);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, PartialColumnBottom>(), LastCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 5);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 3);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 3);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 4);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, 2);
-    }
-
-    {
-        _init(dpScoreMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-        dpScoreMatrixNavigator._activeColIterator += 2;
-        dpScoreMatrixNavigator._prevColIterator += 2;
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, FullColumn>(), FirstCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 3);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 4);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, FullColumn>(), InnerCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 4);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 3);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, FullColumn>(), LastCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 5);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 4);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, 1);
-    }
-
-    {
-        _init(dpScoreMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-        dpScoreMatrixNavigator._activeColIterator += 2;
-        dpScoreMatrixNavigator._prevColIterator += 2;
-        ++dpScoreMatrixNavigator._laneLeap;
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, PartialColumnTop>(), FirstCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 3);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 4);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, PartialColumnTop>(), InnerCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 4);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 3);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, PartialColumnTop>(), LastCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 5);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 4);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, 1);
-    }
-
-    {
-        _init(dpScoreMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-        dpScoreMatrixNavigator._activeColIterator += 2;
-        dpScoreMatrixNavigator._prevColIterator += 2;
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, PartialColumnMiddle>(), FirstCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 3);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 4);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, PartialColumnMiddle>(), InnerCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 4);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 3);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, PartialColumnMiddle>(), LastCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 5);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 4);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, 1);
-    }
-
-    {
-        _init(dpScoreMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-        dpScoreMatrixNavigator._activeColIterator += 2;
-        dpScoreMatrixNavigator._prevColIterator += 2;
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, PartialColumnBottom>(), FirstCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 3);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 4);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, PartialColumnBottom>(), InnerCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 4);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 3);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, PartialColumnBottom>(), LastCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 5);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 3);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 3);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 4);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, 2);
-    }
-
-    {
-        _init(dpScoreMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-        dpScoreMatrixNavigator._activeColIterator += 2;
-        dpScoreMatrixNavigator._prevColIterator += 2;
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, FullColumn>(), FirstCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 3);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 4);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, FullColumn>(), InnerCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 4);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 3);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, FullColumn>(), LastCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 5);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 4);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, 1);
+        _goNextCell(navi, MetaColumnDescriptor<DPFinalColumn, FullColumn>{}, InnerCell{});
+        SEQAN_ASSERT_EQ(_scoreOfCell(value(navi)), 12 + v_pos);
+        SEQAN_ASSERT_EQ(_scoreOfCell(previousCellHorizontal(navi)), 8 + v_pos);
     }
+    _goNextCell(navi, MetaColumnDescriptor<DPFinalColumn, FullColumn>{}, LastCell{});
+    SEQAN_ASSERT_EQ(_scoreOfCell(value(navi)), 15);
+    SEQAN_ASSERT_EQ(_scoreOfCell(previousCellHorizontal(navi)), 11);
 }
 
-void testAlignmentDPMatrixNavigatorScoreMarixSparseGoNext()
+void testAlignmentDPMatrixNavigatorScoreMarixSparseGoNextCell()
 {
     using namespace seqan;
 
-    typedef DPMatrix_<int, SparseDPMatrix> TDPMatrix;
+    typedef DPMatrix_<DPCell_<int, LinearGaps>, SparseDPMatrix> TDPMatrix;
     typedef Value<TDPMatrix>::Type TDPCell;
 
-    DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, NavigateColumnWise> dpScoreMatrixNavigator;
-
     TDPMatrix dpMatrix;
-    setLength(dpMatrix, DPMatrixDimension_::HORIZONTAL, 3);
-    setLength(dpMatrix, DPMatrixDimension_::VERTICAL, 3);
-    resize(dpMatrix, 3);
-
-    host(dpMatrix)[1] = 1;
-    host(dpMatrix)[2] = 2;
+    setLength(dpMatrix, DPMatrixDimension_::HORIZONTAL, 4);
+    setLength(dpMatrix, DPMatrixDimension_::VERTICAL, 4);
+    resize(dpMatrix, TDPCell{});
 
+    int score = 0;
+    auto generator = [&score]()
     {
-        _init(dpScoreMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-        assignValue(dpScoreMatrixNavigator._activeColIterator, 0);
+        TDPCell cell;
+        cell = score++;
+        return cell;
+    };
 
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, -2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, TDPCell());
+    std::generate(begin(host(dpMatrix), Standard()), end(host(dpMatrix), Standard()), generator);
 
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnTop>(), FirstCell());
-
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, -2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, TDPCell());
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnTop>(), InnerCell());
-
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, -2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 0);     // Was never set to 0.
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnTop>(), LastCell());
-
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, -2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 1);
-    }
+    DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, NavigateColumnWise>
+        navi{dpMatrix, DPBandConfig<BandOff>()};
 
+    // Initialize with 0.
+    _setScoreOfCell(value(navi), 0);
+    // Move along initial column.
+    _goNextCell(navi, MetaColumnDescriptor<DPInitialColumn, FullColumn>{}, FirstCell{});
+    SEQAN_ASSERT_EQ(_scoreOfCell(value(navi)), 0);
+    for (int v_pos = 1; v_pos < 3; ++v_pos)
     {
-        _init(dpScoreMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-        assignValue(dpScoreMatrixNavigator._activeColIterator, 0);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnMiddle>(), FirstCell());
-
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, -2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 1);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnMiddle>(), InnerCell());
-
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, -2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 0);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnMiddle>(), LastCell());
-
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, -2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 1);
-    }
-
-    {
-        _init(dpScoreMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-        assignValue(dpScoreMatrixNavigator._activeColIterator, 0);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnBottom>(), FirstCell());
-
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, -2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 1);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnBottom>(), InnerCell());
-
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, -2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 0);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnBottom>(), LastCell());
-
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, -2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 1);
-    }
-
-    {
-        _init(dpScoreMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-        assignValue(dpScoreMatrixNavigator._activeColIterator, 0);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, FullColumn>(), FirstCell());
-
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, -2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 1);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, FullColumn>(), InnerCell());
-
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, -2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 0);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, FullColumn>(), LastCell());
-
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, -2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 1);
-    }
-
-    {
-
-        _init(dpScoreMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-        assignValue(dpScoreMatrixNavigator._activeColIterator, 0);
-
-        // Need to update iterator just for the test.
-        dpScoreMatrixNavigator._activeColIterator += 3;
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, PartialColumnTop>(), FirstCell());
-
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, -3);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, TDPCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 1);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, PartialColumnTop>(), InnerCell());
-
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, -3);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 0);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, PartialColumnTop>(), LastCell());
-
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, -3);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 1);
-    }
-
-    {
-        _init(dpScoreMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-        assignValue(dpScoreMatrixNavigator._activeColIterator, 0);
-
-        // Need to update Iterator just for the test.
-        dpScoreMatrixNavigator._activeColIterator += 2;
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, PartialColumnMiddle>(), FirstCell());
-
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, -2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 1);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, PartialColumnMiddle>(), InnerCell());
-
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, -2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 0);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, PartialColumnMiddle>(), LastCell());
-
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, -2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 1);
-    }
-
-    {
-        _init(dpScoreMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-        assignValue(dpScoreMatrixNavigator._activeColIterator, 0);
-
-        // Need to update Iterator just for the test.
-        dpScoreMatrixNavigator._activeColIterator += 2;
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, PartialColumnBottom>(), FirstCell());
-
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, -2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 1);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, PartialColumnBottom>(), InnerCell());
-
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, -2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 0);
-
-        // Need to set iterator to correct position just for the test.
-        --dpScoreMatrixNavigator._prevColIterator;
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, PartialColumnBottom>(), LastCell());
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, -1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 1);
-    }
-
-    {
-        _init(dpScoreMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-        assignValue(dpScoreMatrixNavigator._activeColIterator, 0);
-
-        dpScoreMatrixNavigator._activeColIterator += 2;
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, FullColumn>(), FirstCell());
-
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, -2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 1);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, FullColumn>(), InnerCell());
-
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, -2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 0);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, FullColumn>(), LastCell());
-
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, -2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 1);
-    }
-
-    {
-        _init(dpScoreMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-        assignValue(dpScoreMatrixNavigator._activeColIterator, 0);
-
-        dpScoreMatrixNavigator._activeColIterator += 3;
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, PartialColumnTop>(), FirstCell());
-
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, -3);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 1);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, PartialColumnTop>(), InnerCell());
-
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, -3);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 0);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, PartialColumnTop>(), LastCell());
-
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, -3);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 1);
+        _goNextCell(navi, MetaColumnDescriptor<DPInitialColumn, FullColumn>{}, InnerCell{});
+        SEQAN_ASSERT_EQ(_scoreOfCell(value(navi)), v_pos);
     }
+    _goNextCell(navi, MetaColumnDescriptor<DPInitialColumn, FullColumn>{}, LastCell{});
+    SEQAN_ASSERT_EQ(_scoreOfCell(value(navi)), 3);
 
+    // Move along inner columns.
+    for (int h_pos = 1; h_pos < 3; ++h_pos)
     {
-        _init(dpScoreMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-        assignValue(dpScoreMatrixNavigator._activeColIterator, 0);
-
-        dpScoreMatrixNavigator._activeColIterator += 2;
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, PartialColumnMiddle>(), FirstCell());
-
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, -2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 1);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, PartialColumnMiddle>(), InnerCell());
-
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, -2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 0);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, PartialColumnMiddle>(), LastCell());
-
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, -2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 1);
-
+        _goNextCell(navi, MetaColumnDescriptor<DPInnerColumn, FullColumn>{}, FirstCell{});
+        SEQAN_ASSERT_EQ(_scoreOfCell(value(navi)), 0);
+        SEQAN_ASSERT_EQ(_scoreOfCell(previousCellHorizontal(navi)), 0);
+        for (int v_pos = 1; v_pos < 3; ++v_pos)
+        {
+            _goNextCell(navi, MetaColumnDescriptor<DPInnerColumn, FullColumn>{}, InnerCell{});
+            SEQAN_ASSERT_EQ(_scoreOfCell(value(navi)), v_pos);
+            SEQAN_ASSERT_EQ(_scoreOfCell(previousCellHorizontal(navi)), v_pos);
+        }
+        _goNextCell(navi, MetaColumnDescriptor<DPInnerColumn, FullColumn>{}, LastCell{});
+        SEQAN_ASSERT_EQ(_scoreOfCell(value(navi)), 3);
+        SEQAN_ASSERT_EQ(_scoreOfCell(previousCellHorizontal(navi)), 3);
     }
 
+    // Move along last column.
+    _goNextCell(navi, MetaColumnDescriptor<DPFinalColumn, FullColumn>{}, FirstCell{});
+    SEQAN_ASSERT_EQ(_scoreOfCell(value(navi)), 0);
+    SEQAN_ASSERT_EQ(_scoreOfCell(previousCellHorizontal(navi)), 0);
+    for (int v_pos = 1; v_pos < 3; ++v_pos)
     {
-        _init(dpScoreMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-        assignValue(dpScoreMatrixNavigator._activeColIterator, 0);
-
-        dpScoreMatrixNavigator._activeColIterator += 2;
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, PartialColumnBottom>(), FirstCell());
-
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, -2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 1);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, PartialColumnBottom>(), InnerCell());
-
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, -2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 0);
-
-        --dpScoreMatrixNavigator._prevColIterator;
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, PartialColumnBottom>(), LastCell());
-
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, -1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 1);
-    }
-
-    {
-        _init(dpScoreMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-        assignValue(dpScoreMatrixNavigator._activeColIterator, 0);
-
-        dpScoreMatrixNavigator._activeColIterator += 2;
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, FullColumn>(), FirstCell());
-
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, -2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 1);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, FullColumn>(), InnerCell());
-
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, -2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 0);
-
-        _goNextCell(dpScoreMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, FullColumn>(), LastCell());
-
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._ptrDataContainer, &dpMatrix);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevColIterator - begin(dpMatrix, Standard()), 0);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._laneLeap, -2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, 1);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, 2);
-        SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, 1);
+        _goNextCell(navi, MetaColumnDescriptor<DPFinalColumn, FullColumn>{}, InnerCell{});
+        SEQAN_ASSERT_EQ(_scoreOfCell(value(navi)), v_pos);
+        SEQAN_ASSERT_EQ(_scoreOfCell(previousCellHorizontal(navi)), v_pos);
     }
+    _goNextCell(navi, MetaColumnDescriptor<DPFinalColumn, FullColumn>{}, LastCell{});
+    SEQAN_ASSERT_EQ(_scoreOfCell(value(navi)), 3);
+    SEQAN_ASSERT_EQ(_scoreOfCell(previousCellHorizontal(navi)), 3);
 }
 
 template <typename TDPMatrixSpec>
@@ -1160,19 +358,21 @@ void testAlignmentDPScoreMatrixNavigatorAssignValue(TDPMatrixSpec const)
 {
     using namespace seqan;
 
-    typedef DPMatrix_<int, TDPMatrixSpec> TDPMatrix;
-
-    DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, NavigateColumnWise> dpScoreMatrixNavigator;
+    typedef DPMatrix_<DPCell_<int, LinearGaps>, TDPMatrixSpec> TDPMatrix;
+    typedef typename Value<TDPMatrix>::Type TDPCell;
 
     TDPMatrix dpMatrix;
     setLength(dpMatrix, DPMatrixDimension_::HORIZONTAL, 10);
     setLength(dpMatrix, DPMatrixDimension_::VERTICAL, 10);
-    resize(dpMatrix, 3);
+    resize(dpMatrix, TDPCell{});
 
-    _init(dpScoreMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
+    DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, NavigateColumnWise>
+        dpScoreMatrixNavigator{dpMatrix, DPBandConfig<BandOff>{}};
+    TDPCell tmp;
+    tmp = 20;
 
-    assignValue(dpScoreMatrixNavigator, 20);
-    SEQAN_ASSERT_EQ(value(dpScoreMatrixNavigator._activeColIterator), 20);
+    assignValue(dpScoreMatrixNavigator, tmp);
+    SEQAN_ASSERT_EQ(_scoreOfCell(value(dpScoreMatrixNavigator._activeColIterator)), 20);
 }
 
 template <typename TDPMatrixSpec>
@@ -1180,97 +380,52 @@ void testAlignmentDPScoreMatrixNavigatorValue(TDPMatrixSpec const)
 {
     using namespace seqan;
 
-    typedef DPMatrix_<int, TDPMatrixSpec> TDPMatrix;
-
-    DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, NavigateColumnWise> dpScoreMatrixNavigator;
-
-    TDPMatrix dpMatrix;
-    setLength(dpMatrix, DPMatrixDimension_::HORIZONTAL, 10);
-    setLength(dpMatrix, DPMatrixDimension_::VERTICAL, 10);
-    resize(dpMatrix, 3);
-
-    _init(dpScoreMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-
-    assignValue(dpScoreMatrixNavigator, 20);
-    SEQAN_ASSERT_EQ(value(dpScoreMatrixNavigator), 20);
-
-    const DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, NavigateColumnWise> dpScoreMatrixNavigatorConst(dpScoreMatrixNavigator);
-    SEQAN_ASSERT_EQ(value(dpScoreMatrixNavigatorConst), 20);
-}
-
-template <typename TDPMatrixSpec>
-void testAlignmentDPScoreMatrixNavigatorPreviousCellDiagonal(TDPMatrixSpec const)
-{
-    using namespace seqan;
-
-    typedef DPMatrix_<int, TDPMatrixSpec> TDPMatrix;
+    typedef DPMatrix_<DPCell_<int, LinearGaps>, TDPMatrixSpec> TDPMatrix;
     typedef typename Value<TDPMatrix>::Type TDPCell;
 
-    DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, NavigateColumnWise> dpScoreMatrixNavigator;
-
     TDPMatrix dpMatrix;
     setLength(dpMatrix, DPMatrixDimension_::HORIZONTAL, 10);
     setLength(dpMatrix, DPMatrixDimension_::VERTICAL, 10);
-    resize(dpMatrix, 3);
+    resize(dpMatrix, TDPCell{});
 
-    _init(dpScoreMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-    SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellDiagonal, TDPCell());
+    DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, NavigateColumnWise>
+        dpScoreMatrixNavigator{dpMatrix, DPBandConfig<BandOff>{}};
 
-    dpScoreMatrixNavigator._prevCellDiagonal = 20;
-    SEQAN_ASSERT_EQ(previousCellDiagonal(dpScoreMatrixNavigator), 20);
+    TDPCell tmp;
+    tmp = 20;
 
-    const DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, NavigateColumnWise> dpScoreMatrixNavigatorConst(dpScoreMatrixNavigator);
-    SEQAN_ASSERT_EQ(previousCellDiagonal(dpScoreMatrixNavigatorConst), 20);
-}
+    assignValue(dpScoreMatrixNavigator, tmp);
+    SEQAN_ASSERT_EQ(_scoreOfCell(value(dpScoreMatrixNavigator)), 20);
 
-template <typename TDPMatrixSpec>
-void testAlignmentDPScoreMatrixNavigatorPreviousCellHorizontal(TDPMatrixSpec const)
-{
-    using namespace seqan;
-
-    typedef DPMatrix_<int, TDPMatrixSpec> TDPMatrix;
-    typedef typename Value<TDPMatrix>::Type TDPCell;
-
-    DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, NavigateColumnWise> dpScoreMatrixNavigator;
-
-    TDPMatrix dpMatrix;
-    setLength(dpMatrix, DPMatrixDimension_::HORIZONTAL, 10);
-    setLength(dpMatrix, DPMatrixDimension_::VERTICAL, 10);
-    resize(dpMatrix, 3);
-
-    _init(dpScoreMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-    SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellHorizontal, TDPCell());
-
-    dpScoreMatrixNavigator._prevCellHorizontal = 20;
-    SEQAN_ASSERT_EQ(previousCellHorizontal(dpScoreMatrixNavigator), 20);
-
-    const DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, NavigateColumnWise> dpScoreMatrixNavigatorConst(dpScoreMatrixNavigator);
-    SEQAN_ASSERT_EQ(previousCellHorizontal(dpScoreMatrixNavigatorConst), 20);
+    const DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, NavigateColumnWise>
+        dpScoreMatrixNavigatorConst(dpScoreMatrixNavigator);
+    SEQAN_ASSERT_EQ(_scoreOfCell(value(dpScoreMatrixNavigatorConst)), 20);
 }
 
 template <typename TDPMatrixSpec>
-void testAlignmentDPScoreMatrixNavigatorPreviousCellVertical(TDPMatrixSpec const)
+void testAlignmentDPScoreMatrixNavigatorPreviousCellHorizontal(TDPMatrixSpec const)
 {
     using namespace seqan;
 
-    typedef DPMatrix_<int, TDPMatrixSpec> TDPMatrix;
+    typedef DPMatrix_<DPCell_<int, LinearGaps>, TDPMatrixSpec> TDPMatrix;
     typedef typename Value<TDPMatrix>::Type TDPCell;
 
-    DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, NavigateColumnWise> dpScoreMatrixNavigator;
-
     TDPMatrix dpMatrix;
     setLength(dpMatrix, DPMatrixDimension_::HORIZONTAL, 10);
     setLength(dpMatrix, DPMatrixDimension_::VERTICAL, 10);
-    resize(dpMatrix, 3);
+    resize(dpMatrix, TDPCell{});
 
-    _init(dpScoreMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-    SEQAN_ASSERT_EQ(dpScoreMatrixNavigator._prevCellVertical, TDPCell());
+    DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, NavigateColumnWise>
+        dpScoreMatrixNavigator{dpMatrix, DPBandConfig<BandOff>{}};
 
-    dpScoreMatrixNavigator._prevCellVertical = 20;
-    SEQAN_ASSERT_EQ(previousCellVertical(dpScoreMatrixNavigator), 20);
+    // A hacky way to test the previous cell function.
+    dpScoreMatrixNavigator._prevColIterator = dpScoreMatrixNavigator._activeColIterator;
+    *dpScoreMatrixNavigator._activeColIterator = 20;
+    SEQAN_ASSERT_EQ(_scoreOfCell(previousCellHorizontal(dpScoreMatrixNavigator)), 20);
 
-    const DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, NavigateColumnWise> dpScoreMatrixNavigatorConst(dpScoreMatrixNavigator);
-    SEQAN_ASSERT_EQ(previousCellVertical(dpScoreMatrixNavigatorConst), 20);
+    const DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, NavigateColumnWise>
+        dpScoreMatrixNavigatorConst(dpScoreMatrixNavigator);
+    SEQAN_ASSERT_EQ(_scoreOfCell(previousCellHorizontal(dpScoreMatrixNavigatorConst)), 20);
 }
 
 template <typename TDPMatrixSpec>
@@ -1278,16 +433,16 @@ void testAlignmentDPScoreMatrixNavigatorCoordinate(TDPMatrixSpec const)
 {
     using namespace seqan;
 
-    typedef DPMatrix_<int, TDPMatrixSpec> TDPMatrix;
-
-    DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, NavigateColumnWise> dpScoreMatrixNavigator;
+    typedef DPMatrix_<DPCell_<int, LinearGaps>, TDPMatrixSpec> TDPMatrix;
+    typedef typename Value<TDPMatrix>::Type TDPCell;
 
     TDPMatrix dpMatrix;
     setLength(dpMatrix, DPMatrixDimension_::HORIZONTAL, 10);
     setLength(dpMatrix, DPMatrixDimension_::VERTICAL, 10);
-    resize(dpMatrix, 3);
+    resize(dpMatrix, TDPCell{});
 
-    _init(dpScoreMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
+    DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, NavigateColumnWise>
+        dpScoreMatrixNavigator{dpMatrix, DPBandConfig<BandOff>{}};
 
     dpScoreMatrixNavigator._activeColIterator += 7;
     dpScoreMatrixNavigator._prevColIterator += 7;
@@ -1301,20 +456,21 @@ void testAlignmentDPScoreMatrixNavigatorContainer(TDPMatrixSpec const)
 {
     using namespace seqan;
 
-    typedef DPMatrix_<int, TDPMatrixSpec> TDPMatrix;
-
-    DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, NavigateColumnWise> dpScoreMatrixNavigator;
+    typedef DPMatrix_<DPCell_<int, LinearGaps>, TDPMatrixSpec> TDPMatrix;
+    typedef typename Value<TDPMatrix>::Type TDPCell;
 
     TDPMatrix dpMatrix;
     setLength(dpMatrix, DPMatrixDimension_::HORIZONTAL, 10);
     setLength(dpMatrix, DPMatrixDimension_::VERTICAL, 10);
-    resize(dpMatrix, 3);
+    resize(dpMatrix, TDPCell{});
 
-    _init(dpScoreMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
+    DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, NavigateColumnWise>
+        dpScoreMatrixNavigator{dpMatrix, DPBandConfig<BandOff>{}};
 
     SEQAN_ASSERT_EQ(&container(dpScoreMatrixNavigator), &dpMatrix);
 
-    const DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, NavigateColumnWise> dpScoreMatrixNavigatorConst(dpScoreMatrixNavigator);
+    const DPMatrixNavigator_<TDPMatrix, DPScoreMatrix, NavigateColumnWise>
+        dpScoreMatrixNavigatorConst(dpScoreMatrixNavigator);
     SEQAN_ASSERT_EQ(&container(dpScoreMatrixNavigatorConst), &dpMatrix);
 }
 
@@ -1323,15 +479,6 @@ void testAlignmentDPScoreMatrixNavigatorContainer(TDPMatrixSpec const)
 // Test constructor                                  [DPScoreMatrix, FullDPMatrix]
 // ----------------------------------------------------------------------------
 
-SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_score_matrix_full_constructor)
-{
-    testAlignmentDPMatrixScoreNavigatorConstructorDefault(seqan::FullDPMatrix());
-}
-
-// ----------------------------------------------------------------------------
-// Test functions                                  [DPScoreMatrix, FullDPMatrix]
-// ----------------------------------------------------------------------------
-
 SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_score_matrix_full_init_unbanded)
 {
     testAlignmentDPMatrixNavigatorScoreMarixInitUnbanded();
@@ -1342,34 +489,28 @@ SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_score_matrix_full_init_band
     testAlignmentDPMatrixNavigatorScoreMarixInitBanded();
 }
 
-SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_score_matrix_full_go_next_cell)
-{
-    testAlignmentDPMatrixNavigatorScoreMarixGoNextCell();
-}
-
-SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_score_matrix_full_assign_value)
-{
-    testAlignmentDPScoreMatrixNavigatorAssignValue(seqan::FullDPMatrix());
-}
+// ----------------------------------------------------------------------------
+// Test functions                                  [DPScoreMatrix, FullDPMatrix]
+// ----------------------------------------------------------------------------
 
 SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_score_matrix_full_value)
 {
     testAlignmentDPScoreMatrixNavigatorValue(seqan::FullDPMatrix());
 }
 
-SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_score_matrix_full_previous_cell_diagonal)
+SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_score_matrix_full_previous_cell_horizontal)
 {
-    testAlignmentDPScoreMatrixNavigatorPreviousCellDiagonal(seqan::FullDPMatrix());
+    testAlignmentDPScoreMatrixNavigatorPreviousCellHorizontal(seqan::FullDPMatrix());
 }
 
-SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_score_matrix_full_previous_cell_horizontal)
+SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_score_matrix_full_go_next_cell)
 {
-    testAlignmentDPScoreMatrixNavigatorPreviousCellHorizontal(seqan::FullDPMatrix());
+    testAlignmentDPMatrixNavigatorScoreMarixGoNextCell();
 }
 
-SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_score_matrix_full_previous_cell_vertical)
+SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_score_matrix_full_assign_value)
 {
-    testAlignmentDPScoreMatrixNavigatorPreviousCellVertical(seqan::FullDPMatrix());
+    testAlignmentDPScoreMatrixNavigatorAssignValue(seqan::FullDPMatrix());
 }
 
 SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_score_matrix_full_coordinate)
@@ -1386,15 +527,6 @@ SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_score_matrix_full_container
 // Test constructor                                [DPScoreMatrix, SparseDPMatrix]
 // ----------------------------------------------------------------------------
 
-SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_score_matrix_sparse_constructor)
-{
-    testAlignmentDPMatrixScoreNavigatorConstructorDefault(seqan::SparseDPMatrix());
-}
-
-// ----------------------------------------------------------------------------
-// Test functions                                [DPScoreMatrix, SparseDPMatrix]
-// ----------------------------------------------------------------------------
-
 SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_score_matrix_sparse_init_unbanded)
 {
     testAlignmentDPMatrixNavigatorScoreMarixSparseInitUnbanded();
@@ -1405,34 +537,28 @@ SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_score_matrix_sparse_init_ba
     testAlignmentDPMatrixNavigatorScoreMarixSparseInitBanded();
 }
 
-SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_score_matrix_sparse_go_next)
-{
-    testAlignmentDPMatrixNavigatorScoreMarixSparseGoNext();
-}
-
-SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_score_matrix_sparse_assign_value)
-{
-    testAlignmentDPScoreMatrixNavigatorAssignValue(seqan::SparseDPMatrix());
-}
+// ----------------------------------------------------------------------------
+// Test functions                                [DPScoreMatrix, SparseDPMatrix]
+// ----------------------------------------------------------------------------
 
 SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_score_matrix_sparse_value)
 {
     testAlignmentDPScoreMatrixNavigatorValue(seqan::SparseDPMatrix());
 }
 
-SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_score_matrix_sparse_previous_cell_diagonal)
+SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_score_matrix_sparse_previous_cell_horizontal)
 {
-    testAlignmentDPScoreMatrixNavigatorPreviousCellDiagonal(seqan::SparseDPMatrix());
+    testAlignmentDPScoreMatrixNavigatorPreviousCellHorizontal(seqan::SparseDPMatrix());
 }
 
-SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_score_matrix_sparse_previous_cell_horizontal)
+SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_score_matrix_sparse_go_next)
 {
-    testAlignmentDPScoreMatrixNavigatorPreviousCellHorizontal(seqan::SparseDPMatrix());
+    testAlignmentDPMatrixNavigatorScoreMarixSparseGoNextCell();
 }
 
-SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_score_matrix_sparse_previous_cell_vertical)
+SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_score_matrix_sparse_assign_value)
 {
-    testAlignmentDPScoreMatrixNavigatorPreviousCellVertical(seqan::SparseDPMatrix());
+    testAlignmentDPScoreMatrixNavigatorAssignValue(seqan::SparseDPMatrix());
 }
 
 SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_score_matrix_sparse_coordinate)
@@ -1446,16 +572,6 @@ SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_score_matrix_sparse_contain
 }
 
 // ----------------------------------------------------------------------------
-// Test constructor                                  [DPTraceMatrix, FullDPMatrix]
-// ----------------------------------------------------------------------------
-
-SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_trace_matrix_constructor)
-{
-    testAlignmentDPMatrixTraceNavigatorConstructorDefault(seqan::TracebackOn<seqan::GapsLeft>());
-    testAlignmentDPMatrixTraceNavigatorConstructorDefault(seqan::TracebackOff());
-}
-
-// ----------------------------------------------------------------------------
 // Test functions                                  [DPTraceMatrix, FullDPMatrix]
 // ----------------------------------------------------------------------------
 
@@ -1465,14 +581,13 @@ SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_trace_matrix_enabled_init_u
 
     typedef DPMatrix_<int, FullDPMatrix> TDPMatrix;
 
-    DPMatrixNavigator_<TDPMatrix, DPTraceMatrix<TracebackOn<> >, NavigateColumnWise> dpTraceMatrixNavigator;
-
     TDPMatrix dpMatrix;
     setLength(dpMatrix, DPMatrixDimension_::HORIZONTAL, 10);
     setLength(dpMatrix, DPMatrixDimension_::VERTICAL, 10);
     resize(dpMatrix);
 
-    _init(dpTraceMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
+    DPMatrixNavigator_<TDPMatrix, DPTraceMatrix<TracebackOn<> >, NavigateColumnWise>
+        dpTraceMatrixNavigator{dpMatrix, DPBandConfig<BandOff>{}};
 
     SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._ptrDataContainer, &dpMatrix);
     SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 0);
@@ -1485,14 +600,13 @@ SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_trace_matrix_disabled_init_
 
     typedef DPMatrix_<int, FullDPMatrix> TDPMatrix;
 
-    DPMatrixNavigator_<TDPMatrix, DPTraceMatrix<TracebackOff>, NavigateColumnWise> dpTraceMatrixNavigator;
-
     TDPMatrix dpMatrix;
     setLength(dpMatrix, DPMatrixDimension_::HORIZONTAL, 10);
     setLength(dpMatrix, DPMatrixDimension_::VERTICAL, 10);
     resize(dpMatrix);
 
-    _init(dpTraceMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
+    DPMatrixNavigator_<TDPMatrix, DPTraceMatrix<TracebackOff>, NavigateColumnWise>
+        dpTraceMatrixNavigator{dpMatrix, DPBandConfig<BandOff>{}};
 
     SEQAN_ASSERT_NEQ(dpTraceMatrixNavigator._ptrDataContainer, &dpMatrix);
     SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._laneLeap, 0);
@@ -1504,15 +618,14 @@ SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_trace_matrix_enabled_init_b
 
     typedef DPMatrix_<int, FullDPMatrix> TDPMatrix;
 
-    DPMatrixNavigator_<TDPMatrix, DPTraceMatrix<TracebackOn<> >, NavigateColumnWise> dpTraceMatrixNavigator;
-
     { // Case1: Band intersects with poit of origin.
         TDPMatrix dpMatrix;
         setLength(dpMatrix, DPMatrixDimension_::HORIZONTAL, 10);
         setLength(dpMatrix, DPMatrixDimension_::VERTICAL, 8);
         resize(dpMatrix);
 
-        _init(dpTraceMatrixNavigator, dpMatrix, DPBandConfig<BandOn>(-4, 3));
+        DPMatrixNavigator_<TDPMatrix, DPTraceMatrix<TracebackOn<> >, NavigateColumnWiseBanded>
+            dpTraceMatrixNavigator{dpMatrix, DPBandConfig<BandOn>{-4, 3}};
 
         SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._ptrDataContainer, &dpMatrix);
         SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 3);
@@ -1526,7 +639,8 @@ SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_trace_matrix_enabled_init_b
         resize(dpMatrix2);
 
         value(host(dpMatrix2), 0) = 10;
-        _init(dpTraceMatrixNavigator, dpMatrix2, DPBandConfig<BandOn>(0, 7));
+        DPMatrixNavigator_<TDPMatrix, DPTraceMatrix<TracebackOn<> >, NavigateColumnWiseBanded>
+            dpTraceMatrixNavigator{dpMatrix2, DPBandConfig<BandOn>{0, 7}};
 
         SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._ptrDataContainer, &dpMatrix2);
         SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._activeColIterator - begin(dpMatrix2, Standard()), 7);
@@ -1540,7 +654,8 @@ SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_trace_matrix_enabled_init_b
         resize(dpMatrix3);
 
 
-        _init(dpTraceMatrixNavigator, dpMatrix3, DPBandConfig<BandOn>(-7, 0));
+        DPMatrixNavigator_<TDPMatrix, DPTraceMatrix<TracebackOn<> >, NavigateColumnWiseBanded>
+            dpTraceMatrixNavigator{dpMatrix3, DPBandConfig<BandOn>{-7, 0}};
 
         SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._ptrDataContainer, &dpMatrix3);
         SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._activeColIterator - begin(dpMatrix3, Standard()), 0);
@@ -1554,15 +669,14 @@ SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_trace_matrix_disabled_init_
 
     typedef DPMatrix_<int, FullDPMatrix> TDPMatrix;
 
-    DPMatrixNavigator_<TDPMatrix, DPTraceMatrix<TracebackOff>, NavigateColumnWise> dpTraceMatrixNavigator;
-
     { // Case1: Band intersects with poit of origin.
         TDPMatrix dpMatrix;
         setLength(dpMatrix, DPMatrixDimension_::HORIZONTAL, 10);
         setLength(dpMatrix, DPMatrixDimension_::VERTICAL, 8);
         resize(dpMatrix);
 
-        _init(dpTraceMatrixNavigator, dpMatrix, DPBandConfig<BandOn>(-4, 3));
+        DPMatrixNavigator_<TDPMatrix, DPTraceMatrix<TracebackOff>, NavigateColumnWiseBanded>
+            dpTraceMatrixNavigator{dpMatrix, DPBandConfig<BandOn>{-4, 3}};
 
         SEQAN_ASSERT_NEQ(dpTraceMatrixNavigator._ptrDataContainer, &dpMatrix);
         SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._laneLeap, 0);
@@ -1575,7 +689,8 @@ SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_trace_matrix_disabled_init_
         resize(dpMatrix2);
 
         value(host(dpMatrix2), 0) = 10;
-        _init(dpTraceMatrixNavigator, dpMatrix2, DPBandConfig<BandOn>(0, 7));
+        DPMatrixNavigator_<TDPMatrix, DPTraceMatrix<TracebackOff>, NavigateColumnWiseBanded>
+            dpTraceMatrixNavigator{dpMatrix2, DPBandConfig<BandOn>{0, 7}};
 
         SEQAN_ASSERT_NEQ(dpTraceMatrixNavigator._ptrDataContainer, &dpMatrix2);
         SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._laneLeap, 0);
@@ -1588,7 +703,8 @@ SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_trace_matrix_disabled_init_
         resize(dpMatrix3);
 
 
-        _init(dpTraceMatrixNavigator, dpMatrix3, DPBandConfig<BandOn>(-7, 0));
+        DPMatrixNavigator_<TDPMatrix, DPTraceMatrix<TracebackOff>, NavigateColumnWiseBanded>
+            dpTraceMatrixNavigator{dpMatrix3, DPBandConfig<BandOn>{-7, 0}};
 
         SEQAN_ASSERT_NEQ(dpTraceMatrixNavigator._ptrDataContainer, &dpMatrix3);
         SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._laneLeap, 0);
@@ -1601,345 +717,51 @@ SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_trace_matrix_enabled_go_nex
 
     typedef DPMatrix_<int, FullDPMatrix> TDPMatrix;
 
-    DPMatrixNavigator_<TDPMatrix, DPTraceMatrix<TracebackOn<> >, NavigateColumnWise> dpTraceMatrixNavigator;
-
-    TDPMatrix dpMatrix;
-    setLength(dpMatrix, DPMatrixDimension_::HORIZONTAL, 10);
-    setLength(dpMatrix, DPMatrixDimension_::VERTICAL, 3);
-    resize(dpMatrix, 0);
-    host(dpMatrix)[0] = 0;
-    host(dpMatrix)[1] = 1;
-    host(dpMatrix)[2] = 2;
-    host(dpMatrix)[3] = 3;
-    host(dpMatrix)[4] = 4;
-    host(dpMatrix)[5] = 5;
-
-    {
-        _init(dpTraceMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-
-        _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnTop>(), FirstCell());
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 0);
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnTop>(), InnerCell());
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 1);
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnTop>(), LastCell());
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 2);
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._laneLeap, 1);
-
-    }
-
-    {
-        _init(dpTraceMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-
-        _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnMiddle>(), FirstCell());
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 0);
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnMiddle>(), InnerCell());
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 1);
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnMiddle>(), LastCell());
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 2);
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._laneLeap, 1);
-    }
-
-    {
-        _init(dpTraceMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-
-        _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnBottom>(), FirstCell());
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 0);
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnBottom>(), InnerCell());
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 1);
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnBottom>(), LastCell());
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 2);
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._laneLeap, 1);
-    }
-
-    {
-        _init(dpTraceMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-
-        _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, FullColumn>(), FirstCell());
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 0);
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, FullColumn>(), InnerCell());
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 1);
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, FullColumn>(), LastCell());
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 2);
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._laneLeap, 1);
-    }
-
-    {
-        _init(dpTraceMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-        dpTraceMatrixNavigator._activeColIterator += 2;
-        ++dpTraceMatrixNavigator._laneLeap;  // For the test we simulate as if we were in a band.
-
-        _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, PartialColumnTop>(), FirstCell());
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 3);
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, PartialColumnTop>(), InnerCell());
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 4);
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, PartialColumnTop>(), LastCell());
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 5);
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._laneLeap, 1);
-    }
-
-    {
-        _init(dpTraceMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-        dpTraceMatrixNavigator._activeColIterator += 2;
-
-        _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, PartialColumnMiddle>(), FirstCell());
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 3);
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, PartialColumnMiddle>(), InnerCell());
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 4);
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, PartialColumnMiddle>(), LastCell());
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 5);
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._laneLeap, 1);
-    }
-
-    {
-        _init(dpTraceMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-        dpTraceMatrixNavigator._activeColIterator += 2;
-
-        _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, PartialColumnBottom>(), FirstCell());
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 3);
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, PartialColumnBottom>(), InnerCell());
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 4);
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, PartialColumnBottom>(), LastCell());
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 5);
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._laneLeap, 2);
-    }
-
-    {
-        _init(dpTraceMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-        dpTraceMatrixNavigator._activeColIterator += 2;
-
-        _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, FullColumn>(), FirstCell());
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 3);
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, FullColumn>(), InnerCell());
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 4);
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, FullColumn>(), LastCell());
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 5);
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._laneLeap, 1);
-    }
-
-    {
-        _init(dpTraceMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-        dpTraceMatrixNavigator._activeColIterator += 2;
-        ++dpTraceMatrixNavigator._laneLeap;
-
-        _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, PartialColumnTop>(), FirstCell());
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 3);
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, PartialColumnTop>(), InnerCell());
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 4);
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, PartialColumnTop>(), LastCell());
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 5);
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._laneLeap, 1);
-    }
-
-    {
-        _init(dpTraceMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-        dpTraceMatrixNavigator._activeColIterator += 2;
-
-        _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, PartialColumnMiddle>(), FirstCell());
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 3);
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, PartialColumnMiddle>(), InnerCell());
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 4);
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, PartialColumnMiddle>(), LastCell());
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 5);
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._laneLeap, 1);
-    }
-
-    {
-        _init(dpTraceMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-        dpTraceMatrixNavigator._activeColIterator += 2;
-
-        _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, PartialColumnBottom>(), FirstCell());
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 3);
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, PartialColumnBottom>(), InnerCell());
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 4);
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, PartialColumnBottom>(), LastCell());
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 5);
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._laneLeap, 2);
-    }
-
-    {
-        _init(dpTraceMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-        dpTraceMatrixNavigator._activeColIterator += 2;
-
-        _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, FullColumn>(), FirstCell());
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 3);
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, FullColumn>(), InnerCell());
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 4);
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._laneLeap, 1);
-
-        _goNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, FullColumn>(), LastCell());
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._activeColIterator - begin(dpMatrix, Standard()), 5);
-        SEQAN_ASSERT_EQ(dpTraceMatrixNavigator._laneLeap, 1);
-    }
-}
-
-template <typename TNavigator, typename TMetaDescriptor, typename TCell>
-void _testGoNextCell(TNavigator & navi, TMetaDescriptor const &, TCell const &)
-{
-    using namespace seqan;
-
-    _goNextCell(navi, TMetaDescriptor(), TCell());
-    SEQAN_ASSERT_EQ(navi._laneLeap, 0);
-}
-
-SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_trace_matrix_disabled_go_next)
-{
-    using namespace seqan;
-
-    typedef DPMatrix_<int, FullDPMatrix> TDPMatrix;
-
-    DPMatrixNavigator_<TDPMatrix, DPTraceMatrix<TracebackOff>, NavigateColumnWise> dpTraceMatrixNavigator;
-
     TDPMatrix dpMatrix;
-    setLength(dpMatrix, DPMatrixDimension_::HORIZONTAL, 10);
-    setLength(dpMatrix, DPMatrixDimension_::VERTICAL, 3);
-    resize(dpMatrix, 0);
-    host(dpMatrix)[0] = 0;
-    host(dpMatrix)[1] = 1;
-    host(dpMatrix)[2] = 2;
-    host(dpMatrix)[3] = 3;
-    host(dpMatrix)[4] = 4;
-    host(dpMatrix)[5] = 5;
-
-    {
-        _init(dpTraceMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-
-        _testGoNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnTop>(), FirstCell());
-        _testGoNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnTop>(), InnerCell());
-        _testGoNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnTop>(), LastCell());
-    }
-
-    {
-        _init(dpTraceMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-
-        _testGoNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnMiddle>(), FirstCell());
-        _testGoNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnMiddle>(), InnerCell());
-        _testGoNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnMiddle>(), LastCell());
-    }
-
-    {
-        _init(dpTraceMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-
-        _testGoNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnBottom>(), FirstCell());
-        _testGoNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnBottom>(), InnerCell());
-        _testGoNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, PartialColumnBottom>(), LastCell());
-    }
-
-    {
-        _init(dpTraceMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-
-        _testGoNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, FullColumn>(), FirstCell());
-        _testGoNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, FullColumn>(), InnerCell());
-        _testGoNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInitialColumn, FullColumn>(), LastCell());
-    }
-
-    {
-        _init(dpTraceMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-        dpTraceMatrixNavigator._activeColIterator += 2;
-
-        _testGoNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, PartialColumnTop>(), FirstCell());
-        _testGoNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, PartialColumnTop>(), InnerCell());
-        _testGoNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, PartialColumnTop>(), LastCell());
-    }
-
-    {
-        _init(dpTraceMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-        _testGoNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, PartialColumnMiddle>(), FirstCell());
-        _testGoNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, PartialColumnMiddle>(), InnerCell());
-        _testGoNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, PartialColumnMiddle>(), LastCell());
-    }
-
-    {
-        _init(dpTraceMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-
-        _testGoNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, PartialColumnBottom>(), FirstCell());
-        _testGoNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, PartialColumnBottom>(), InnerCell());
-        _testGoNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, PartialColumnBottom>(), LastCell());
-    }
-
-    {
-        _init(dpTraceMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-
-        _testGoNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, FullColumn>(), FirstCell());
-        _testGoNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, FullColumn>(), InnerCell());
-        _testGoNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPInnerColumn, FullColumn>(), LastCell());
-    }
+    setLength(dpMatrix, DPMatrixDimension_::HORIZONTAL, 4);
+    setLength(dpMatrix, DPMatrixDimension_::VERTICAL, 4);
+    resize(dpMatrix);
 
-    {
-        _init(dpTraceMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
+    std::iota(begin(host(dpMatrix), Standard()), end(host(dpMatrix), Standard()), 0);
 
-        _testGoNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, PartialColumnTop>(), FirstCell());
-        _testGoNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, PartialColumnTop>(), InnerCell());
-        _testGoNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, PartialColumnTop>(), LastCell());
-    }
+    DPMatrixNavigator_<TDPMatrix, DPTraceMatrix<TracebackOn<> >, NavigateColumnWise>
+        navi{dpMatrix, DPBandConfig<BandOff>()};
 
+    // Move along initial column.
+    _goNextCell(navi, MetaColumnDescriptor<DPInitialColumn, FullColumn>{}, FirstCell{});
+    SEQAN_ASSERT_EQ(value(navi), 0);
+    for (int v_pos = 1; v_pos < 3; ++v_pos)
     {
-        _init(dpTraceMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-
-        _testGoNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, PartialColumnMiddle>(), FirstCell());
-        _testGoNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, PartialColumnMiddle>(), InnerCell());
-        _testGoNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, PartialColumnMiddle>(), LastCell());
+        _goNextCell(navi, MetaColumnDescriptor<DPInitialColumn, FullColumn>{}, InnerCell{});
+        SEQAN_ASSERT_EQ(value(navi), v_pos);
     }
+    _goNextCell(navi, MetaColumnDescriptor<DPInitialColumn, FullColumn>{}, LastCell{});
+    SEQAN_ASSERT_EQ(value(navi), 3);
 
+    // Move along inner columns.
+    for (int h_pos = 1; h_pos < 3; ++h_pos)
     {
-        _init(dpTraceMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-
-        _testGoNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, PartialColumnBottom>(), FirstCell());
-        _testGoNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, PartialColumnBottom>(), InnerCell());
-        _testGoNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, PartialColumnBottom>(), LastCell());
+        _goNextCell(navi, MetaColumnDescriptor<DPInnerColumn, FullColumn>{}, FirstCell{});
+        SEQAN_ASSERT_EQ(value(navi), h_pos * 4);
+        for (int v_pos = 1; v_pos < 3; ++v_pos)
+        {
+            _goNextCell(navi, MetaColumnDescriptor<DPInnerColumn, FullColumn>{}, InnerCell{});
+            SEQAN_ASSERT_EQ(value(navi), h_pos * 4 + v_pos);
+        }
+        _goNextCell(navi, MetaColumnDescriptor<DPInnerColumn, FullColumn>{}, LastCell{});
+        SEQAN_ASSERT_EQ(value(navi), h_pos * 4 + 3);
     }
 
+    // Move along last column.
+    _goNextCell(navi, MetaColumnDescriptor<DPFinalColumn, FullColumn>{}, FirstCell{});
+    SEQAN_ASSERT_EQ(value(navi), 12);
+    for (int v_pos = 1; v_pos < 3; ++v_pos)
     {
-        _init(dpTraceMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
-        _testGoNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, FullColumn>(), FirstCell());
-        _testGoNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, FullColumn>(), InnerCell());
-        _testGoNextCell(dpTraceMatrixNavigator, MetaColumnDescriptor<DPFinalColumn, FullColumn>(), LastCell());
+        _goNextCell(navi, MetaColumnDescriptor<DPFinalColumn, FullColumn>{}, InnerCell{});
+        SEQAN_ASSERT_EQ(value(navi), 12 + v_pos);
     }
+    _goNextCell(navi, MetaColumnDescriptor<DPFinalColumn, FullColumn>{}, LastCell{});
+    SEQAN_ASSERT_EQ(value(navi), 15);
 }
 
 SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_trace_matrix_enabled_assign_value)
@@ -1948,17 +770,16 @@ SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_trace_matrix_enabled_assign
 
     typedef DPMatrix_<int, FullDPMatrix> TDPMatrix;
 
-    DPMatrixNavigator_<TDPMatrix, DPTraceMatrix<TracebackOn<> >, NavigateColumnWise> dpScoreMatrixNavigator;
-
     TDPMatrix dpMatrix;
     setLength(dpMatrix, DPMatrixDimension_::HORIZONTAL, 10);
     setLength(dpMatrix, DPMatrixDimension_::VERTICAL, 10);
     resize(dpMatrix, 3);
 
-    _init(dpScoreMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
+    DPMatrixNavigator_<TDPMatrix, DPTraceMatrix<TracebackOn<> >, NavigateColumnWise>
+        dpTraceMatrixNavigator{dpMatrix, DPBandConfig<BandOff>{}};
 
-    assignValue(dpScoreMatrixNavigator, 20);
-    SEQAN_ASSERT_EQ(value(dpScoreMatrixNavigator._activeColIterator), 20);
+    assignValue(dpTraceMatrixNavigator, 20);
+    SEQAN_ASSERT_EQ(value(dpTraceMatrixNavigator._activeColIterator), 20);
 }
 
 
@@ -1968,19 +789,18 @@ SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_trace_matrix_enabled_value)
 
     typedef DPMatrix_<int, FullDPMatrix> TDPMatrix;
 
-    DPMatrixNavigator_<TDPMatrix, DPTraceMatrix<TracebackOn<> >, NavigateColumnWise> dpTraceMatrixNavigator;
-
     TDPMatrix dpMatrix;
     setLength(dpMatrix, DPMatrixDimension_::HORIZONTAL, 10);
     setLength(dpMatrix, DPMatrixDimension_::VERTICAL, 10);
     resize(dpMatrix, 3);
 
-    _init(dpTraceMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
+    DPMatrixNavigator_<TDPMatrix, DPTraceMatrix<TracebackOn<> >, NavigateColumnWise>
+        dpTraceMatrixNavigator{dpMatrix, DPBandConfig<BandOff>{}};
 
     assignValue(dpTraceMatrixNavigator, 20);
     SEQAN_ASSERT_EQ(value(dpTraceMatrixNavigator), 20);
-
-    const DPMatrixNavigator_<TDPMatrix, DPTraceMatrix<TracebackOn<> >, NavigateColumnWise> dpTraceMatrixNavigatorConst(dpTraceMatrixNavigator);
+    DPMatrixNavigator_<TDPMatrix, DPTraceMatrix<TracebackOn<> >, NavigateColumnWise> const
+        dpTraceMatrixNavigatorConst(dpTraceMatrixNavigator);
     SEQAN_ASSERT_EQ(value(dpTraceMatrixNavigatorConst), 20);
 }
 
@@ -1991,19 +811,18 @@ SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_trace_matrix_enabled_coordi
 
     typedef DPMatrix_<int, FullDPMatrix> TDPMatrix;
 
-    DPMatrixNavigator_<TDPMatrix, DPTraceMatrix<TracebackOn<> >, NavigateColumnWise> dpScoreMatrixNavigator;
-
     TDPMatrix dpMatrix;
     setLength(dpMatrix, DPMatrixDimension_::HORIZONTAL, 10);
     setLength(dpMatrix, DPMatrixDimension_::VERTICAL, 10);
     resize(dpMatrix, 3);
 
-    _init(dpScoreMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
+    DPMatrixNavigator_<TDPMatrix, DPTraceMatrix<TracebackOn<> >, NavigateColumnWise>
+        dpTraceMatrixNavigator{dpMatrix, DPBandConfig<BandOff>{}};
 
-    dpScoreMatrixNavigator._activeColIterator += 7;
+    dpTraceMatrixNavigator._activeColIterator += 7;
 
-    SEQAN_ASSERT_EQ(coordinate(dpScoreMatrixNavigator, +DPMatrixDimension_::HORIZONTAL), 0u);
-    SEQAN_ASSERT_EQ(coordinate(dpScoreMatrixNavigator, +DPMatrixDimension_::VERTICAL), 7u);
+    SEQAN_ASSERT_EQ(coordinate(dpTraceMatrixNavigator, +DPMatrixDimension_::HORIZONTAL), 0u);
+    SEQAN_ASSERT_EQ(coordinate(dpTraceMatrixNavigator, +DPMatrixDimension_::VERTICAL), 7u);
 }
 
 SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_trace_matrix_enabled_container)
@@ -2012,14 +831,13 @@ SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_trace_matrix_enabled_contai
 
     typedef DPMatrix_<int, FullDPMatrix> TDPMatrix;
 
-    DPMatrixNavigator_<TDPMatrix, DPTraceMatrix<TracebackOn<> >, NavigateColumnWise> dpTraceMatrixNavigator;
-
     TDPMatrix dpMatrix;
     setLength(dpMatrix, DPMatrixDimension_::HORIZONTAL, 10);
     setLength(dpMatrix, DPMatrixDimension_::VERTICAL, 10);
     resize(dpMatrix, 3);
 
-    _init(dpTraceMatrixNavigator, dpMatrix, DPBandConfig<BandOff>());
+    DPMatrixNavigator_<TDPMatrix, DPTraceMatrix<TracebackOn<> >, NavigateColumnWise>
+        dpTraceMatrixNavigator{dpMatrix, DPBandConfig<BandOff>{}};
 
     SEQAN_ASSERT_EQ(&container(dpTraceMatrixNavigator), &dpMatrix);
 
@@ -2027,4 +845,30 @@ SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_trace_matrix_enabled_contai
     SEQAN_ASSERT_EQ(&container(dpTraceMatrixNavigatorConst), &dpMatrix);
 }
 
+SEQAN_DEFINE_TEST(test_alignment_dp_matrix_navigator_trace_matrix_enabled_to_global_position)
+{
+    using namespace seqan;
+
+    typedef DPMatrix_<int, FullDPMatrix> TDPMatrix;
+
+    TDPMatrix dpMatrix;
+    setLength(dpMatrix, DPMatrixDimension_::HORIZONTAL, 10);
+    setLength(dpMatrix, DPMatrixDimension_::VERTICAL, 10);
+    resize(dpMatrix);
+
+    DPMatrixNavigator_<TDPMatrix,
+                       DPTraceMatrix<TracebackOn<> >,
+                       NavigateColumnWise> navi{dpMatrix, DPBandConfig<BandOff>{}};
+
+    for (unsigned i = 0; i < length(dpMatrix, +DPMatrixDimension_::HORIZONTAL); ++i)
+    {
+        for (unsigned j = 0; j < length(dpMatrix, +DPMatrixDimension_::VERTICAL); ++j)
+        {
+            _setToPosition(navi, toGlobalPosition(navi, i, j));
+            SEQAN_ASSERT_EQ(i, coordinate(navi, +DPMatrixDimension_::HORIZONTAL));
+            SEQAN_ASSERT_EQ(j, coordinate(navi, +DPMatrixDimension_::VERTICAL));
+        }
+    }
+}
+
 #endif  // #ifndef SANDBOX_RMAERKER_TESTS_ALIGN2_TEST_ALIGNMENT_DP_MATRIX_NAVIGATOR_H_
diff --git a/tests/align/test_alignment_dp_profile.h b/tests/align/test_alignment_dp_profile.h
index 2648538..7bded16 100644
--- a/tests/align/test_alignment_dp_profile.h
+++ b/tests/align/test_alignment_dp_profile.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                        test_alignment_dp_profile.h
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/align/test_alignment_dp_trace_segment.h b/tests/align/test_alignment_dp_trace_segment.h
index b15bf46..05f846b 100644
--- a/tests/align/test_alignment_dp_trace_segment.h
+++ b/tests/align/test_alignment_dp_trace_segment.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                     test_alignment_dp_trace_segment.h
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -53,7 +53,7 @@ testAlignmentTracebackTraceSegmentsConstructor()
         SEQAN_ASSERT_EQ(traceSegment._horizontalBeginPos, (TPosition) 0);
         SEQAN_ASSERT_EQ(traceSegment._verticalBeginPos, (TPosition) 0);
         SEQAN_ASSERT_EQ(traceSegment._length, (TSize) 0);
-        SEQAN_ASSERT_EQ(traceSegment._traceValue, +TraceBitMap_<>::NONE);
+        SEQAN_ASSERT_EQ(traceSegment._traceValue, TraceBitMap_<>::NONE);
     }
 
     { // test copy ctor
@@ -61,30 +61,30 @@ testAlignmentTracebackTraceSegmentsConstructor()
         traceSegment._horizontalBeginPos = 10;
         traceSegment._verticalBeginPos = 3;
         traceSegment._length = 5;
-        traceSegment._traceValue = +TraceBitMap_<>::DIAGONAL;
+        traceSegment._traceValue = TraceBitMap_<>::DIAGONAL;
 
         TTraceSegment traceSegment2(traceSegment);
 
         SEQAN_ASSERT_EQ(traceSegment2._horizontalBeginPos, (TPosition) 10);
         SEQAN_ASSERT_EQ(traceSegment2._verticalBeginPos, (TPosition) 3);
         SEQAN_ASSERT_EQ(traceSegment2._length, (TSize) 5);
-        SEQAN_ASSERT_EQ(traceSegment2._traceValue, +TraceBitMap_<>::DIAGONAL);
+        SEQAN_ASSERT_EQ(traceSegment2._traceValue, TraceBitMap_<>::DIAGONAL);
 
         TTraceSegment traceSegment3 = traceSegment;
 
         SEQAN_ASSERT_EQ(traceSegment3._horizontalBeginPos, (TPosition) 10);
         SEQAN_ASSERT_EQ(traceSegment3._verticalBeginPos, (TPosition) 3);
         SEQAN_ASSERT_EQ(traceSegment3._length, (TSize) 5);
-        SEQAN_ASSERT_EQ(traceSegment3._traceValue, +TraceBitMap_<>::DIAGONAL);
+        SEQAN_ASSERT_EQ(traceSegment3._traceValue, TraceBitMap_<>::DIAGONAL);
     }
 
     { // test additional ctor
-        TTraceSegment traceSegment(12, 13, 8, +TraceBitMap_<>::VERTICAL);
+        TTraceSegment traceSegment(12, 13, 8, TraceBitMap_<>::VERTICAL);
 
         SEQAN_ASSERT_EQ(traceSegment._horizontalBeginPos, (TPosition) 12);
         SEQAN_ASSERT_EQ(traceSegment._verticalBeginPos, (TPosition) 13);
         SEQAN_ASSERT_EQ(traceSegment._length, (TSize) 8);
-        SEQAN_ASSERT_EQ(traceSegment._traceValue, +TraceBitMap_<>::VERTICAL);
+        SEQAN_ASSERT_EQ(traceSegment._traceValue, TraceBitMap_<>::VERTICAL);
     }
 }
 
@@ -101,21 +101,21 @@ testAlignmentTracebackTraceSegmentsAssignment()
         traceSegment._horizontalBeginPos = 10;
         traceSegment._verticalBeginPos = 3;
         traceSegment._length = 5;
-        traceSegment._traceValue = +TraceBitMap_<>::DIAGONAL;
+        traceSegment._traceValue = TraceBitMap_<>::DIAGONAL;
 
         TTraceSegment traceSegment2;
 
         SEQAN_ASSERT_EQ(traceSegment2._horizontalBeginPos, (TPosition) 0);
         SEQAN_ASSERT_EQ(traceSegment2._verticalBeginPos, (TPosition) 0);
         SEQAN_ASSERT_EQ(traceSegment2._length, (TSize) 0);
-        SEQAN_ASSERT_EQ(traceSegment2._traceValue, +TraceBitMap_<>::NONE);
+        SEQAN_ASSERT_EQ(traceSegment2._traceValue, TraceBitMap_<>::NONE);
 
         traceSegment2 = traceSegment;
 
         SEQAN_ASSERT_EQ(traceSegment2._horizontalBeginPos, (TPosition) 10);
         SEQAN_ASSERT_EQ(traceSegment2._verticalBeginPos, (TPosition) 3);
         SEQAN_ASSERT_EQ(traceSegment2._length, (TSize) 5);
-        SEQAN_ASSERT_EQ(traceSegment2._traceValue, +TraceBitMap_<>::DIAGONAL);
+        SEQAN_ASSERT_EQ(traceSegment2._traceValue, TraceBitMap_<>::DIAGONAL);
     }
 }
 
@@ -131,12 +131,12 @@ testAlignmentTracebackTraceSegmentsCompare()
     traceSegment._horizontalBeginPos = 10;
     traceSegment._verticalBeginPos = 3;
     traceSegment._length = 5;
-    traceSegment._traceValue = +TraceBitMap_<>::DIAGONAL;
+    traceSegment._traceValue = TraceBitMap_<>::DIAGONAL;
 
     TTraceSegment traceSegment2(traceSegment);
 
     SEQAN_ASSERT(traceSegment2 == traceSegment);
-    traceSegment._traceValue = +TraceBitMap_<>::HORIZONTAL;
+    traceSegment._traceValue = TraceBitMap_<>::HORIZONTAL;
     SEQAN_ASSERT(traceSegment2 !=  traceSegment);
 }
 
@@ -178,22 +178,22 @@ void testAlignmentTracebackRecordTrace(TTarget & target)
     _recordSegment(target, 0, 0, 3, tv1);
     _recordSegment(target, 0, 3, 5, tv2);
     _recordSegment(target, 5, 8, 3, tv3);
-    _recordSegment(target, 8, 8, 0, +TraceBitMap_<>::DIAGONAL);
+    _recordSegment(target, 8, 8, 0, TraceBitMap_<>::DIAGONAL);
 
 
 
     SEQAN_ASSERT_EQ(target[0]._horizontalBeginPos, 0);
     SEQAN_ASSERT_EQ(target[0]._verticalBeginPos, 0);
     SEQAN_ASSERT_EQ(target[0]._length, 3);
-    SEQAN_ASSERT_EQ(target[0]._traceValue, +TraceBitMap_<>::DIAGONAL);
+    SEQAN_ASSERT_EQ(target[0]._traceValue, TraceBitMap_<>::DIAGONAL);
     SEQAN_ASSERT_EQ(target[1]._horizontalBeginPos, 0);
     SEQAN_ASSERT_EQ(target[1]._verticalBeginPos, 3);
     SEQAN_ASSERT_EQ(target[1]._length, 5);
-    SEQAN_ASSERT_EQ(target[1]._traceValue, +TraceBitMap_<>::VERTICAL);
+    SEQAN_ASSERT_EQ(target[1]._traceValue, TraceBitMap_<>::VERTICAL);
     SEQAN_ASSERT_EQ(target[2]._horizontalBeginPos, 5);
     SEQAN_ASSERT_EQ(target[2]._verticalBeginPos, 8);
     SEQAN_ASSERT_EQ(target[2]._length, 3);
-    SEQAN_ASSERT_EQ(target[2]._traceValue, +TraceBitMap_<>::HORIZONTAL);
+    SEQAN_ASSERT_EQ(target[2]._traceValue, TraceBitMap_<>::HORIZONTAL);
 
     SEQAN_ASSERT_EQ(length(target), 3u);
 }
@@ -245,11 +245,11 @@ void testAlignmentTracebackTraceSegmentGetEndHorizontal()
     traceSegm._horizontalBeginPos = 5;
     traceSegm._verticalBeginPos = 12;
     traceSegm._length = 7;
-    traceSegm._traceValue = +TraceBitMap_<>::HORIZONTAL;
+    traceSegm._traceValue = TraceBitMap_<>::HORIZONTAL;
 
     SEQAN_ASSERT_EQ(_getEndHorizontal(traceSegm), 12);
 
-    traceSegm._traceValue = +TraceBitMap_<>::VERTICAL;
+    traceSegm._traceValue = TraceBitMap_<>::VERTICAL;
     SEQAN_ASSERT_EQ(_getEndHorizontal(traceSegm), 5);
 }
 
@@ -264,11 +264,11 @@ void testAlignmentTracebackTraceSegmentGetEndVertical()
     traceSegm._horizontalBeginPos = 5;
     traceSegm._verticalBeginPos = 12;
     traceSegm._length = 7;
-    traceSegm._traceValue = +TraceBitMap_<>::VERTICAL;
+    traceSegm._traceValue = TraceBitMap_<>::VERTICAL;
 
     SEQAN_ASSERT_EQ(_getEndVertical(traceSegm), 19);
 
-    traceSegm._traceValue = +TraceBitMap_<>::HORIZONTAL;
+    traceSegm._traceValue = TraceBitMap_<>::HORIZONTAL;
     SEQAN_ASSERT_EQ(_getEndVertical(traceSegm), 12);
 }
 
@@ -276,12 +276,12 @@ void testAlignmentTracebackTraceSegmentTranslateTraceValue()
 {
     using namespace seqan;
 
-    SEQAN_ASSERT_EQ(_translateTraceValue(+TraceBitMap_<>::DIAGONAL), "D");
-    SEQAN_ASSERT_EQ(_translateTraceValue(+TraceBitMap_<>::VERTICAL), "V");
-    SEQAN_ASSERT_EQ(_translateTraceValue(+TraceBitMap_<>::HORIZONTAL), "H");
-    SEQAN_ASSERT_EQ(_translateTraceValue(+TraceBitMap_<>::VERTICAL_OPEN), "v");
-    SEQAN_ASSERT_EQ(_translateTraceValue(+TraceBitMap_<>::HORIZONTAL_OPEN), "h");
-    SEQAN_ASSERT_EQ(_translateTraceValue(+TraceBitMap_<>::NONE), "0");
+    SEQAN_ASSERT_EQ(_translateTraceValue(TraceBitMap_<>::DIAGONAL), "D");
+    SEQAN_ASSERT_EQ(_translateTraceValue(TraceBitMap_<>::VERTICAL), "V");
+    SEQAN_ASSERT_EQ(_translateTraceValue(TraceBitMap_<>::HORIZONTAL), "H");
+    SEQAN_ASSERT_EQ(_translateTraceValue(TraceBitMap_<>::VERTICAL_OPEN), "v");
+    SEQAN_ASSERT_EQ(_translateTraceValue(TraceBitMap_<>::HORIZONTAL_OPEN), "h");
+    SEQAN_ASSERT_EQ(_translateTraceValue(TraceBitMap_<>::NONE), "0");
 }
 
 void testAlignmentTracebackTraceSegmentStreamOperator()
@@ -295,7 +295,7 @@ void testAlignmentTracebackTraceSegmentStreamOperator()
     traceSegm._horizontalBeginPos = 5;
     traceSegm._verticalBeginPos = 12;
     traceSegm._length = 7;
-    traceSegm._traceValue = +TraceBitMap_<>::DIAGONAL;
+    traceSegm._traceValue = TraceBitMap_<>::DIAGONAL;
 
     std::stringstream ss;
     ss << traceSegm;
diff --git a/tests/align/test_alignment_dp_traceback.h b/tests/align/test_alignment_dp_traceback.h
index c396043..2856923 100644
--- a/tests/align/test_alignment_dp_traceback.h
+++ b/tests/align/test_alignment_dp_traceback.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                       test_alignment_dp_traceback.h
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -57,28 +57,27 @@ SEQAN_DEFINE_TEST(test_align2_traceback_affine)
 
     resize(traceMatrix);
 
-    value(traceMatrix, 0, 0) = +TraceBitMap_<>::NONE;
-    value(traceMatrix, 1, 0) = +TraceBitMap_<>::VERTICAL_OPEN | +TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
-    value(traceMatrix, 2, 0) = +TraceBitMap_<>::VERTICAL | +TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
-    value(traceMatrix, 3, 0) = +TraceBitMap_<>::VERTICAL | +TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
+    value(traceMatrix, 0, 0) = TraceBitMap_<>::NONE;
+    value(traceMatrix, 1, 0) = TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
+    value(traceMatrix, 2, 0) = TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
+    value(traceMatrix, 3, 0) = TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
 
-    value(traceMatrix, 0, 1) = +TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX;
-    value(traceMatrix, 1, 1) = +TraceBitMap_<>::DIAGONAL;
-    value(traceMatrix, 2, 1) = +TraceBitMap_<>::HORIZONTAL_OPEN | +TraceBitMap_<>::DIAGONAL | +TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | +TraceBitMap_<>::VERTICAL_OPEN;
-    value(traceMatrix, 3, 1) = +TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
+    value(traceMatrix, 0, 1) = TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX;
+    value(traceMatrix, 1, 1) = TraceBitMap_<>::DIAGONAL;
+    value(traceMatrix, 2, 1) = TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::VERTICAL_OPEN;
+    value(traceMatrix, 3, 1) = TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
 
-    value(traceMatrix, 0, 2) = +TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX;
-    value(traceMatrix, 1, 2) = +TraceBitMap_<>::DIAGONAL;
-    value(traceMatrix, 2, 2) = +TraceBitMap_<>::VERTICAL_OPEN | +TraceBitMap_<>::DIAGONAL;
-    value(traceMatrix, 3, 2) = +TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
+    value(traceMatrix, 0, 2) = TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX;
+    value(traceMatrix, 1, 2) = TraceBitMap_<>::DIAGONAL;
+    value(traceMatrix, 2, 2) = TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::DIAGONAL;
+    value(traceMatrix, 3, 2) = TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
 
-    value(traceMatrix, 0, 3) = +TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX;
-    value(traceMatrix, 1, 3) = +TraceBitMap_<>::HORIZONTAL_OPEN | +TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX;
-    value(traceMatrix, 2, 3) = +TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX;
-    value(traceMatrix, 3, 3) = +TraceBitMap_<>::DIAGONAL;
+    value(traceMatrix, 0, 3) = TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX;
+    value(traceMatrix, 1, 3) = TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX;
+    value(traceMatrix, 2, 3) = TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX;
+    value(traceMatrix, 3, 3) = TraceBitMap_<>::DIAGONAL;
 
-    TDPTraceNavigator navigator;
-    _init(navigator, traceMatrix, DPBandConfig<BandOff>());
+    TDPTraceNavigator navigator{traceMatrix, DPBandConfig<BandOff>()};
 
     DnaString str0 = "ACG";
     DnaString str1 = "ACG";
@@ -87,55 +86,55 @@ SEQAN_DEFINE_TEST(test_align2_traceback_affine)
     dpScout._maxHostPosition = 15;
     _computeTraceback(target, navigator, dpScout, str0, str1, DPBandConfig<BandOff>(), TDPProfile());
     SEQAN_ASSERT_EQ(length(target), 1u);
-    SEQAN_ASSERT_EQ(target[0], TTraceSegment(0, 0, 3, +TraceBitMap_<>::DIAGONAL));
+    SEQAN_ASSERT_EQ(target[0], TTraceSegment(0, 0, 3, TraceBitMap_<>::DIAGONAL));
 
     clear(target);
     dpScout._maxHostPosition = 14;
     _computeTraceback(target, navigator, dpScout, str0, str1, DPBandConfig<BandOff>(), TDPProfile());
     SEQAN_ASSERT_EQ(length(target), 3u);
-    SEQAN_ASSERT_EQ(target[0], TTraceSegment(3, 2, 1, +TraceBitMap_<>::VERTICAL));
-    SEQAN_ASSERT_EQ(target[1], TTraceSegment(0, 2, 3, +TraceBitMap_<>::HORIZONTAL));
-    SEQAN_ASSERT_EQ(target[2], TTraceSegment(0, 0, 2, +TraceBitMap_<>::VERTICAL));
+    SEQAN_ASSERT_EQ(target[0], TTraceSegment(3, 2, 1, TraceBitMap_<>::VERTICAL));
+    SEQAN_ASSERT_EQ(target[1], TTraceSegment(0, 2, 3, TraceBitMap_<>::HORIZONTAL));
+    SEQAN_ASSERT_EQ(target[2], TTraceSegment(0, 0, 2, TraceBitMap_<>::VERTICAL));
 
     clear(target);
     dpScout._maxHostPosition = 13;
     _computeTraceback(target, navigator, dpScout, str0, str1, DPBandConfig<BandOff>(), TDPProfile());
     SEQAN_ASSERT_EQ(length(target), 4u);
-    SEQAN_ASSERT_EQ(target[0], TTraceSegment(3, 1, 2, +TraceBitMap_<>::VERTICAL));
-    SEQAN_ASSERT_EQ(target[1], TTraceSegment(2, 1, 1, +TraceBitMap_<>::HORIZONTAL));
-    SEQAN_ASSERT_EQ(target[2], TTraceSegment(1, 0, 1, +TraceBitMap_<>::DIAGONAL));
-    SEQAN_ASSERT_EQ(target[3], TTraceSegment(0, 0, 1, +TraceBitMap_<>::HORIZONTAL));
+    SEQAN_ASSERT_EQ(target[0], TTraceSegment(3, 1, 2, TraceBitMap_<>::VERTICAL));
+    SEQAN_ASSERT_EQ(target[1], TTraceSegment(2, 1, 1, TraceBitMap_<>::HORIZONTAL));
+    SEQAN_ASSERT_EQ(target[2], TTraceSegment(1, 0, 1, TraceBitMap_<>::DIAGONAL));
+    SEQAN_ASSERT_EQ(target[3], TTraceSegment(0, 0, 1, TraceBitMap_<>::HORIZONTAL));
 
     clear(target);
     dpScout._maxHostPosition = 12;
     _computeTraceback(target, navigator, dpScout, str0, str1, DPBandConfig<BandOff>(), TDPProfile());
     SEQAN_ASSERT_EQ(length(target), 2u);
-    SEQAN_ASSERT_EQ(target[0], TTraceSegment(3, 0, 3, +TraceBitMap_<>::VERTICAL));
-    SEQAN_ASSERT_EQ(target[1], TTraceSegment(0, 0, 3, +TraceBitMap_<>::HORIZONTAL));
+    SEQAN_ASSERT_EQ(target[0], TTraceSegment(3, 0, 3, TraceBitMap_<>::VERTICAL));
+    SEQAN_ASSERT_EQ(target[1], TTraceSegment(0, 0, 3, TraceBitMap_<>::HORIZONTAL));
 
     clear(target);
     dpScout._maxHostPosition = 11;
     _computeTraceback(target, navigator, dpScout, str0, str1, DPBandConfig<BandOff>(), TDPProfile());
     SEQAN_ASSERT_EQ(length(target), 4u);
-    SEQAN_ASSERT_EQ(target[0], TTraceSegment(2, 3, 1, +TraceBitMap_<>::HORIZONTAL));
-    SEQAN_ASSERT_EQ(target[1], TTraceSegment(2, 1, 2, +TraceBitMap_<>::VERTICAL));
-    SEQAN_ASSERT_EQ(target[2], TTraceSegment(1, 0, 1, +TraceBitMap_<>::DIAGONAL));
-    SEQAN_ASSERT_EQ(target[3], TTraceSegment(0, 0, 1, +TraceBitMap_<>::HORIZONTAL));
+    SEQAN_ASSERT_EQ(target[0], TTraceSegment(2, 3, 1, TraceBitMap_<>::HORIZONTAL));
+    SEQAN_ASSERT_EQ(target[1], TTraceSegment(2, 1, 2, TraceBitMap_<>::VERTICAL));
+    SEQAN_ASSERT_EQ(target[2], TTraceSegment(1, 0, 1, TraceBitMap_<>::DIAGONAL));
+    SEQAN_ASSERT_EQ(target[3], TTraceSegment(0, 0, 1, TraceBitMap_<>::HORIZONTAL));
 
     clear(target);
     dpScout._maxHostPosition = 7;
     _computeTraceback(target, navigator, dpScout, str0, str1, DPBandConfig<BandOff>(), TDPProfile());
     SEQAN_ASSERT_EQ(length(target), 3u);
-    SEQAN_ASSERT_EQ(target[0], TTraceSegment(1, 3, 2, +TraceBitMap_<>::HORIZONTAL));
-    SEQAN_ASSERT_EQ(target[1], TTraceSegment(1, 1, 2, +TraceBitMap_<>::VERTICAL));
-    SEQAN_ASSERT_EQ(target[2], TTraceSegment(0, 0, 1, +TraceBitMap_<>::DIAGONAL));
+    SEQAN_ASSERT_EQ(target[0], TTraceSegment(1, 3, 2, TraceBitMap_<>::HORIZONTAL));
+    SEQAN_ASSERT_EQ(target[1], TTraceSegment(1, 1, 2, TraceBitMap_<>::VERTICAL));
+    SEQAN_ASSERT_EQ(target[2], TTraceSegment(0, 0, 1, TraceBitMap_<>::DIAGONAL));
 
     clear(target);
     dpScout._maxHostPosition = 3;
     _computeTraceback(target, navigator, dpScout, str0, str1, DPBandConfig<BandOff>(), TDPProfile());
     SEQAN_ASSERT_EQ(length(target), 2u);
-    SEQAN_ASSERT_EQ(target[0], TTraceSegment(0, 3, 3, +TraceBitMap_<>::HORIZONTAL));
-    SEQAN_ASSERT_EQ(target[1], TTraceSegment(0, 0, 3, +TraceBitMap_<>::VERTICAL));
+    SEQAN_ASSERT_EQ(target[0], TTraceSegment(0, 3, 3, TraceBitMap_<>::HORIZONTAL));
+    SEQAN_ASSERT_EQ(target[1], TTraceSegment(0, 0, 3, TraceBitMap_<>::VERTICAL));
 }
 
 SEQAN_DEFINE_TEST(test_align2_traceback_linear_unbanded_alignment)
@@ -157,28 +156,27 @@ SEQAN_DEFINE_TEST(test_align2_traceback_linear_unbanded_alignment)
 
     resize(traceMatrix);
 
-    value(traceMatrix, 0, 0) = +TraceBitMap_<>::NONE;
-    value(traceMatrix, 1, 0) = +TraceBitMap_<>::VERTICAL;
-    value(traceMatrix, 2, 0) = +TraceBitMap_<>::VERTICAL;
-    value(traceMatrix, 3, 0) = +TraceBitMap_<>::VERTICAL;
+    value(traceMatrix, 0, 0) = TraceBitMap_<>::NONE;
+    value(traceMatrix, 1, 0) = TraceBitMap_<>::VERTICAL;
+    value(traceMatrix, 2, 0) = TraceBitMap_<>::VERTICAL;
+    value(traceMatrix, 3, 0) = TraceBitMap_<>::VERTICAL;
 
-    value(traceMatrix, 0, 1) = +TraceBitMap_<>::HORIZONTAL;
-    value(traceMatrix, 1, 1) = +TraceBitMap_<>::DIAGONAL;
-    value(traceMatrix, 2, 1) = +TraceBitMap_<>::HORIZONTAL | +TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX;
-    value(traceMatrix, 3, 1) = +TraceBitMap_<>::NONE;
+    value(traceMatrix, 0, 1) = TraceBitMap_<>::HORIZONTAL;
+    value(traceMatrix, 1, 1) = TraceBitMap_<>::DIAGONAL;
+    value(traceMatrix, 2, 1) = TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX;
+    value(traceMatrix, 3, 1) = TraceBitMap_<>::NONE;
 
-    value(traceMatrix, 0, 2) = +TraceBitMap_<>::HORIZONTAL;
-    value(traceMatrix, 1, 2) = +TraceBitMap_<>::NONE;
-    value(traceMatrix, 2, 2) = +TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX;
-    value(traceMatrix, 3, 2) = +TraceBitMap_<>::NONE;
+    value(traceMatrix, 0, 2) = TraceBitMap_<>::HORIZONTAL;
+    value(traceMatrix, 1, 2) = TraceBitMap_<>::NONE;
+    value(traceMatrix, 2, 2) = TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX;
+    value(traceMatrix, 3, 2) = TraceBitMap_<>::NONE;
 
-    value(traceMatrix, 0, 3) = +TraceBitMap_<>::HORIZONTAL;
-    value(traceMatrix, 1, 3) = +TraceBitMap_<>::NONE;
-    value(traceMatrix, 2, 3) = +TraceBitMap_<>::NONE;
-    value(traceMatrix, 3, 3) = +TraceBitMap_<>::DIAGONAL | +TraceBitMap_<>::VERTICAL  | +TraceBitMap_<>::HORIZONTAL;
+    value(traceMatrix, 0, 3) = TraceBitMap_<>::HORIZONTAL;
+    value(traceMatrix, 1, 3) = TraceBitMap_<>::NONE;
+    value(traceMatrix, 2, 3) = TraceBitMap_<>::NONE;
+    value(traceMatrix, 3, 3) = TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL  | TraceBitMap_<>::HORIZONTAL;
 
-    TDPTraceNavigator navigator;
-    _init(navigator, traceMatrix, DPBandConfig<BandOff>());
+    TDPTraceNavigator navigator{traceMatrix, DPBandConfig<BandOff>{}};
 
     DnaString str0 = "ACG";
     DnaString str1 = "ACG";
@@ -187,10 +185,10 @@ SEQAN_DEFINE_TEST(test_align2_traceback_linear_unbanded_alignment)
     dpScout._maxHostPosition = 15;
     _computeTraceback(target, navigator, dpScout, str0, str1, DPBandConfig<BandOff>(), TDPProfile());
 
-    SEQAN_ASSERT_EQ(target[0], TTraceSegment(2, 2, 1, +TraceBitMap_<>::DIAGONAL));
-    SEQAN_ASSERT_EQ(target[1], TTraceSegment(1, 2, 1, +TraceBitMap_<>::HORIZONTAL));
-    SEQAN_ASSERT_EQ(target[2], TTraceSegment(1, 1, 1, +TraceBitMap_<>::VERTICAL));
-    SEQAN_ASSERT_EQ(target[3], TTraceSegment(0, 0, 1, +TraceBitMap_<>::DIAGONAL));
+    SEQAN_ASSERT_EQ(target[0], TTraceSegment(2, 2, 1, TraceBitMap_<>::DIAGONAL));
+    SEQAN_ASSERT_EQ(target[1], TTraceSegment(1, 2, 1, TraceBitMap_<>::HORIZONTAL));
+    SEQAN_ASSERT_EQ(target[2], TTraceSegment(1, 1, 1, TraceBitMap_<>::VERTICAL));
+    SEQAN_ASSERT_EQ(target[3], TTraceSegment(0, 0, 1, TraceBitMap_<>::DIAGONAL));
 }
 
 SEQAN_DEFINE_TEST(test_align2_traceback_linear_normal_banded_alignment)
@@ -202,7 +200,7 @@ SEQAN_DEFINE_TEST(test_align2_traceback_linear_normal_banded_alignment)
     typedef typename TraceBitMap_<>::Type TTraceValue;
     typedef DPMatrix_<TTraceValue, FullDPMatrix> TTraceMatrix;
 
-    typedef DPMatrixNavigator_<TTraceMatrix, DPTraceMatrix<TracebackOn<> >, NavigateColumnWise> TDPTraceNavigator;
+    typedef DPMatrixNavigator_<TTraceMatrix, DPTraceMatrix<TracebackOn<> >, NavigateColumnWiseBanded> TDPTraceNavigator;
 
     String<TTraceSegment> target;
     TTraceMatrix traceMatrix;
@@ -212,29 +210,28 @@ SEQAN_DEFINE_TEST(test_align2_traceback_linear_normal_banded_alignment)
 
     resize(traceMatrix);
 
-    value(traceMatrix, 0, 0) = +TraceBitMap_<>::NONE;
-    value(traceMatrix, 1, 0) = +TraceBitMap_<>::VERTICAL;
-    value(traceMatrix, 2, 0) = +TraceBitMap_<>::VERTICAL;
+    value(traceMatrix, 0, 0) = TraceBitMap_<>::NONE;
+    value(traceMatrix, 1, 0) = TraceBitMap_<>::VERTICAL;
+    value(traceMatrix, 2, 0) = TraceBitMap_<>::VERTICAL;
 
-    value(traceMatrix, 0, 1) = +TraceBitMap_<>::HORIZONTAL;
-    value(traceMatrix, 1, 1) = +TraceBitMap_<>::DIAGONAL;
-    value(traceMatrix, 2, 1) = +TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
+    value(traceMatrix, 0, 1) = TraceBitMap_<>::HORIZONTAL;
+    value(traceMatrix, 1, 1) = TraceBitMap_<>::DIAGONAL;
+    value(traceMatrix, 2, 1) = TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
 
-    value(traceMatrix, 0, 2) = +TraceBitMap_<>::NONE;
-    value(traceMatrix, 1, 2) = +TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX;
-    value(traceMatrix, 2, 2) = +TraceBitMap_<>::NONE;
+    value(traceMatrix, 0, 2) = TraceBitMap_<>::NONE;
+    value(traceMatrix, 1, 2) = TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX;
+    value(traceMatrix, 2, 2) = TraceBitMap_<>::NONE;
 
-    value(traceMatrix, 0, 3) = +TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX;
-    value(traceMatrix, 1, 3) = +TraceBitMap_<>::VERTICAL | +TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
-    value(traceMatrix, 2, 3) = +TraceBitMap_<>::NONE;
+    value(traceMatrix, 0, 3) = TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX;
+    value(traceMatrix, 1, 3) = TraceBitMap_<>::VERTICAL | TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
+    value(traceMatrix, 2, 3) = TraceBitMap_<>::NONE;
 
-    value(traceMatrix, 0, 4) = +TraceBitMap_<>::NONE;
-    value(traceMatrix, 1, 4) = +TraceBitMap_<>::DIAGONAL | +TraceBitMap_<>::VERTICAL  | +TraceBitMap_<>::HORIZONTAL;
-    value(traceMatrix, 2, 4) = +TraceBitMap_<>::NONE;
+    value(traceMatrix, 0, 4) = TraceBitMap_<>::NONE;
+    value(traceMatrix, 1, 4) = TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::VERTICAL  | TraceBitMap_<>::HORIZONTAL;
+    value(traceMatrix, 2, 4) = TraceBitMap_<>::NONE;
 
 
-    TDPTraceNavigator navigator;
-    _init(navigator, traceMatrix, DPBandConfig<BandOn>(-1, 1));
+    TDPTraceNavigator navigator{traceMatrix, DPBandConfig<BandOn>{-1, 1}};
 
     DnaString str0 = "ACGT";
     DnaString str1 = "ACGT";
@@ -243,11 +240,11 @@ SEQAN_DEFINE_TEST(test_align2_traceback_linear_normal_banded_alignment)
     dpScout._maxHostPosition = 13;
     _computeTraceback(target, navigator, dpScout, str0, str1, DPBandConfig<BandOn>(-1, 1), TDPProfile());
 
-    SEQAN_ASSERT_EQ(target[0], TTraceSegment(3, 3, 1, +TraceBitMap_<>::DIAGONAL));
-    SEQAN_ASSERT_EQ(target[1], TTraceSegment(3, 2, 1, +TraceBitMap_<>::VERTICAL));
-    SEQAN_ASSERT_EQ(target[2], TTraceSegment(1, 2, 2, +TraceBitMap_<>::HORIZONTAL));
-    SEQAN_ASSERT_EQ(target[3], TTraceSegment(1, 1, 1, +TraceBitMap_<>::VERTICAL));
-    SEQAN_ASSERT_EQ(target[4], TTraceSegment(0, 0, 1, +TraceBitMap_<>::DIAGONAL));
+    SEQAN_ASSERT_EQ(target[0], TTraceSegment(3, 3, 1, TraceBitMap_<>::DIAGONAL));
+    SEQAN_ASSERT_EQ(target[1], TTraceSegment(3, 2, 1, TraceBitMap_<>::VERTICAL));
+    SEQAN_ASSERT_EQ(target[2], TTraceSegment(1, 2, 2, TraceBitMap_<>::HORIZONTAL));
+    SEQAN_ASSERT_EQ(target[3], TTraceSegment(1, 1, 1, TraceBitMap_<>::VERTICAL));
+    SEQAN_ASSERT_EQ(target[4], TTraceSegment(0, 0, 1, TraceBitMap_<>::DIAGONAL));
 }
 
 SEQAN_DEFINE_TEST(test_align2_traceback_linear_wide_banded_alignment)
@@ -259,7 +256,7 @@ SEQAN_DEFINE_TEST(test_align2_traceback_linear_wide_banded_alignment)
     typedef typename TraceBitMap_<>::Type TTraceValue;
     typedef DPMatrix_<TTraceValue, FullDPMatrix> TTraceMatrix;
 
-    typedef DPMatrixNavigator_<TTraceMatrix, DPTraceMatrix<TracebackOn<> >, NavigateColumnWise> TDPTraceNavigator;
+    typedef DPMatrixNavigator_<TTraceMatrix, DPTraceMatrix<TracebackOn<> >, NavigateColumnWiseBanded> TDPTraceNavigator;
 
     String<TTraceSegment> target;
     TTraceMatrix traceMatrix;
@@ -269,64 +266,63 @@ SEQAN_DEFINE_TEST(test_align2_traceback_linear_wide_banded_alignment)
 
     resize(traceMatrix);
 
-    value(traceMatrix, 0, 0) = +TraceBitMap_<>::NONE;
-    value(traceMatrix, 1, 0) = +TraceBitMap_<>::NONE;
-    value(traceMatrix, 2, 0) = +TraceBitMap_<>::NONE;
-    value(traceMatrix, 3, 0) = +TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
-    value(traceMatrix, 4, 0) = +TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
-    value(traceMatrix, 5, 0) = +TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
-    value(traceMatrix, 6, 0) = +TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
-
-    value(traceMatrix, 0, 1) = +TraceBitMap_<>::NONE;
-    value(traceMatrix, 1, 1) = +TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX;
-    value(traceMatrix, 2, 1) = +TraceBitMap_<>::DIAGONAL;
-    value(traceMatrix, 3, 1) = +TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
-    value(traceMatrix, 4, 1) = +TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
-    value(traceMatrix, 5, 1) = +TraceBitMap_<>::NONE;
-    value(traceMatrix, 6, 1) = +TraceBitMap_<>::NONE;
-
-    value(traceMatrix, 0, 2) = +TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX;
-    value(traceMatrix, 1, 2) = +TraceBitMap_<>::NONE;
-    value(traceMatrix, 2, 2) = +TraceBitMap_<>::NONE;
-    value(traceMatrix, 3, 2) = +TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX;
-    value(traceMatrix, 4, 2) = +TraceBitMap_<>::NONE;
-    value(traceMatrix, 5, 2) = +TraceBitMap_<>::NONE;
-    value(traceMatrix, 6, 2) = +TraceBitMap_<>::NONE;
-
-    value(traceMatrix, 0, 3) = +TraceBitMap_<>::NONE;
-    value(traceMatrix, 1, 3) = +TraceBitMap_<>::NONE;
-    value(traceMatrix, 2, 3) = +TraceBitMap_<>::NONE;
-    value(traceMatrix, 3, 3) = +TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX;
-    value(traceMatrix, 4, 3) = +TraceBitMap_<>::NONE;
-    value(traceMatrix, 5, 3) = +TraceBitMap_<>::NONE;
-    value(traceMatrix, 6, 3) = +TraceBitMap_<>::NONE;
-
-    value(traceMatrix, 0, 4) = +TraceBitMap_<>::NONE;
-    value(traceMatrix, 1, 4) = +TraceBitMap_<>::NONE;
-    value(traceMatrix, 2, 4) = +TraceBitMap_<>::NONE;
-    value(traceMatrix, 3, 4) = +TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX;
-    value(traceMatrix, 4, 4) = +TraceBitMap_<>::NONE;
-    value(traceMatrix, 5, 4) = +TraceBitMap_<>::NONE;
-    value(traceMatrix, 6, 4) = +TraceBitMap_<>::NONE;
-
-    value(traceMatrix, 0, 5) = +TraceBitMap_<>::NONE;
-    value(traceMatrix, 1, 5) = +TraceBitMap_<>::NONE;
-    value(traceMatrix, 2, 5) = +TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX;
-    value(traceMatrix, 3, 5) = +TraceBitMap_<>::NONE;
-    value(traceMatrix, 4, 5) = +TraceBitMap_<>::NONE;
-    value(traceMatrix, 5, 5) = +TraceBitMap_<>::NONE;
-    value(traceMatrix, 6, 5) = +TraceBitMap_<>::NONE;
-
-    value(traceMatrix, 0, 6) = +TraceBitMap_<>::NONE;
-    value(traceMatrix, 1, 6) = +TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX;
-    value(traceMatrix, 2, 6) = +TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
-    value(traceMatrix, 3, 6) = +TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
-    value(traceMatrix, 4, 6) = +TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
-    value(traceMatrix, 5, 6) = +TraceBitMap_<>::NONE;
-    value(traceMatrix, 6, 6) = +TraceBitMap_<>::NONE;
-
-    TDPTraceNavigator navigator;
-    _init(navigator, traceMatrix, DPBandConfig<BandOn>(-4, 4));
+    value(traceMatrix, 0, 0) = TraceBitMap_<>::NONE;
+    value(traceMatrix, 1, 0) = TraceBitMap_<>::NONE;
+    value(traceMatrix, 2, 0) = TraceBitMap_<>::NONE;
+    value(traceMatrix, 3, 0) = TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
+    value(traceMatrix, 4, 0) = TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
+    value(traceMatrix, 5, 0) = TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
+    value(traceMatrix, 6, 0) = TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
+
+    value(traceMatrix, 0, 1) = TraceBitMap_<>::NONE;
+    value(traceMatrix, 1, 1) = TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX;
+    value(traceMatrix, 2, 1) = TraceBitMap_<>::DIAGONAL;
+    value(traceMatrix, 3, 1) = TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
+    value(traceMatrix, 4, 1) = TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
+    value(traceMatrix, 5, 1) = TraceBitMap_<>::NONE;
+    value(traceMatrix, 6, 1) = TraceBitMap_<>::NONE;
+
+    value(traceMatrix, 0, 2) = TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX;
+    value(traceMatrix, 1, 2) = TraceBitMap_<>::NONE;
+    value(traceMatrix, 2, 2) = TraceBitMap_<>::NONE;
+    value(traceMatrix, 3, 2) = TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX;
+    value(traceMatrix, 4, 2) = TraceBitMap_<>::NONE;
+    value(traceMatrix, 5, 2) = TraceBitMap_<>::NONE;
+    value(traceMatrix, 6, 2) = TraceBitMap_<>::NONE;
+
+    value(traceMatrix, 0, 3) = TraceBitMap_<>::NONE;
+    value(traceMatrix, 1, 3) = TraceBitMap_<>::NONE;
+    value(traceMatrix, 2, 3) = TraceBitMap_<>::NONE;
+    value(traceMatrix, 3, 3) = TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX;
+    value(traceMatrix, 4, 3) = TraceBitMap_<>::NONE;
+    value(traceMatrix, 5, 3) = TraceBitMap_<>::NONE;
+    value(traceMatrix, 6, 3) = TraceBitMap_<>::NONE;
+
+    value(traceMatrix, 0, 4) = TraceBitMap_<>::NONE;
+    value(traceMatrix, 1, 4) = TraceBitMap_<>::NONE;
+    value(traceMatrix, 2, 4) = TraceBitMap_<>::NONE;
+    value(traceMatrix, 3, 4) = TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX;
+    value(traceMatrix, 4, 4) = TraceBitMap_<>::NONE;
+    value(traceMatrix, 5, 4) = TraceBitMap_<>::NONE;
+    value(traceMatrix, 6, 4) = TraceBitMap_<>::NONE;
+
+    value(traceMatrix, 0, 5) = TraceBitMap_<>::NONE;
+    value(traceMatrix, 1, 5) = TraceBitMap_<>::NONE;
+    value(traceMatrix, 2, 5) = TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX;
+    value(traceMatrix, 3, 5) = TraceBitMap_<>::NONE;
+    value(traceMatrix, 4, 5) = TraceBitMap_<>::NONE;
+    value(traceMatrix, 5, 5) = TraceBitMap_<>::NONE;
+    value(traceMatrix, 6, 5) = TraceBitMap_<>::NONE;
+
+    value(traceMatrix, 0, 6) = TraceBitMap_<>::NONE;
+    value(traceMatrix, 1, 6) = TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX;
+    value(traceMatrix, 2, 6) = TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
+    value(traceMatrix, 3, 6) = TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
+    value(traceMatrix, 4, 6) = TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
+    value(traceMatrix, 5, 6) = TraceBitMap_<>::NONE;
+    value(traceMatrix, 6, 6) = TraceBitMap_<>::NONE;
+
+    TDPTraceNavigator navigator{traceMatrix, DPBandConfig<BandOn>{-4, 4}};
 
     DnaString str0 = "ACGTAC";
     DnaString str1 = "ACGTAC";
@@ -335,10 +331,10 @@ SEQAN_DEFINE_TEST(test_align2_traceback_linear_wide_banded_alignment)
     dpScout._maxHostPosition = 46;
     _computeTraceback(target, navigator, dpScout, str0, str1, DPBandConfig<BandOn>(-4, 4), TDPProfile());
 
-    SEQAN_ASSERT_EQ(target[0], TTraceSegment(6, 3, 3, +TraceBitMap_<>::VERTICAL));
-    SEQAN_ASSERT_EQ(target[1], TTraceSegment(1, 3, 5, +TraceBitMap_<>::HORIZONTAL));
-    SEQAN_ASSERT_EQ(target[2], TTraceSegment(1, 1, 2, +TraceBitMap_<>::VERTICAL));
-    SEQAN_ASSERT_EQ(target[3], TTraceSegment(0, 0, 1, +TraceBitMap_<>::DIAGONAL));
+    SEQAN_ASSERT_EQ(target[0], TTraceSegment(6, 3, 3, TraceBitMap_<>::VERTICAL));
+    SEQAN_ASSERT_EQ(target[1], TTraceSegment(1, 3, 5, TraceBitMap_<>::HORIZONTAL));
+    SEQAN_ASSERT_EQ(target[2], TTraceSegment(1, 1, 2, TraceBitMap_<>::VERTICAL));
+    SEQAN_ASSERT_EQ(target[3], TTraceSegment(0, 0, 1, TraceBitMap_<>::DIAGONAL));
 }
 
 SEQAN_DEFINE_TEST(test_align2_traceback_linear_small_banded_alignment)
@@ -350,7 +346,7 @@ SEQAN_DEFINE_TEST(test_align2_traceback_linear_small_banded_alignment)
     typedef typename TraceBitMap_<>::Type TTraceValue;
     typedef DPMatrix_<TTraceValue, FullDPMatrix> TTraceMatrix;
 
-    typedef DPMatrixNavigator_<TTraceMatrix, DPTraceMatrix<TracebackOn<> >, NavigateColumnWise> TDPTraceNavigator;
+    typedef DPMatrixNavigator_<TTraceMatrix, DPTraceMatrix<TracebackOn<> >, NavigateColumnWiseBanded> TDPTraceNavigator;
 
     String<TTraceSegment> target;
     TTraceMatrix traceMatrix;
@@ -360,16 +356,15 @@ SEQAN_DEFINE_TEST(test_align2_traceback_linear_small_banded_alignment)
 
     resize(traceMatrix);
 
-    value(traceMatrix, 0, 0) = +TraceBitMap_<>::NONE;
+    value(traceMatrix, 0, 0) = TraceBitMap_<>::NONE;
 
-    value(traceMatrix, 0, 1) = +TraceBitMap_<>::DIAGONAL;
+    value(traceMatrix, 0, 1) = TraceBitMap_<>::DIAGONAL;
 
-    value(traceMatrix, 0, 2) = +TraceBitMap_<>::DIAGONAL;
+    value(traceMatrix, 0, 2) = TraceBitMap_<>::DIAGONAL;
 
-    value(traceMatrix, 0, 3) = +TraceBitMap_<>::DIAGONAL;
+    value(traceMatrix, 0, 3) = TraceBitMap_<>::DIAGONAL;
 
-    TDPTraceNavigator navigator;
-    _init(navigator, traceMatrix, DPBandConfig<BandOn>(0, 0));
+    TDPTraceNavigator navigator{traceMatrix, DPBandConfig<BandOn>{0, 0}};
 
     DnaString str0 = "ACG";
     DnaString str1 = "ACG";
@@ -378,7 +373,7 @@ SEQAN_DEFINE_TEST(test_align2_traceback_linear_small_banded_alignment)
     dpScout._maxHostPosition = 3;
     _computeTraceback(target, navigator, dpScout, str0, str1, DPBandConfig<BandOn>(0, 0), TDPProfile());
 
-    SEQAN_ASSERT_EQ(target[0], TTraceSegment(0, 0, 3, +TraceBitMap_<>::DIAGONAL));
+    SEQAN_ASSERT_EQ(target[0], TTraceSegment(0, 0, 3, TraceBitMap_<>::DIAGONAL));
 }
 
 SEQAN_DEFINE_TEST(test_align2_traceback_gaps_left_linear_gaps)
@@ -400,24 +395,23 @@ SEQAN_DEFINE_TEST(test_align2_traceback_gaps_left_linear_gaps)
 
     resize(traceMatrix);
 
-    value(traceMatrix, 0, 0) = +TraceBitMap_<>::NONE;
-    value(traceMatrix, 1, 0) = +TraceBitMap_<>::VERTICAL_OPEN | +TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
-    value(traceMatrix, 2, 0) = +TraceBitMap_<>::VERTICAL;
-    value(traceMatrix, 3, 0) = +TraceBitMap_<>::VERTICAL;
+    value(traceMatrix, 0, 0) = TraceBitMap_<>::NONE;
+    value(traceMatrix, 1, 0) = TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
+    value(traceMatrix, 2, 0) = TraceBitMap_<>::VERTICAL;
+    value(traceMatrix, 3, 0) = TraceBitMap_<>::VERTICAL;
 
-    value(traceMatrix, 0, 1) = +TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX;
-    value(traceMatrix, 1, 1) = +TraceBitMap_<>::DIAGONAL;
-    value(traceMatrix, 2, 1) = +TraceBitMap_<>::DIAGONAL;
-    value(traceMatrix, 3, 1) = +TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::HORIZONTAL;
+    value(traceMatrix, 0, 1) = TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX;
+    value(traceMatrix, 1, 1) = TraceBitMap_<>::DIAGONAL;
+    value(traceMatrix, 2, 1) = TraceBitMap_<>::DIAGONAL;
+    value(traceMatrix, 3, 1) = TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::HORIZONTAL;
 
-    value(traceMatrix, 0, 2) = +TraceBitMap_<>::HORIZONTAL;
-    value(traceMatrix, 1, 2) = +TraceBitMap_<>::VERTICAL_OPEN | +TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
-    value(traceMatrix, 2, 2) = +TraceBitMap_<>::DIAGONAL;
-    value(traceMatrix, 3, 2) = +TraceBitMap_<>::VERTICAL | +TraceBitMap_<>::DIAGONAL;
+    value(traceMatrix, 0, 2) = TraceBitMap_<>::HORIZONTAL;
+    value(traceMatrix, 1, 2) = TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
+    value(traceMatrix, 2, 2) = TraceBitMap_<>::DIAGONAL;
+    value(traceMatrix, 3, 2) = TraceBitMap_<>::VERTICAL | TraceBitMap_<>::DIAGONAL;
 
 
-    TDPTraceNavigator navigator;
-    _init(navigator, traceMatrix, DPBandConfig<BandOff>());
+    TDPTraceNavigator navigator{traceMatrix, DPBandConfig<BandOff>()};
 
     DnaString str0 = "AC";
     DnaString str1 = "CCC";
@@ -426,8 +420,8 @@ SEQAN_DEFINE_TEST(test_align2_traceback_gaps_left_linear_gaps)
     dpScout._maxHostPosition = 11;
     _computeTraceback(target, navigator, dpScout, str0, str1, DPBandConfig<BandOff>(), TDPProfile());
 
-    SEQAN_ASSERT_EQ(target[0], TTraceSegment(0, 1, 2, +TraceBitMap_<>::DIAGONAL));
-    SEQAN_ASSERT_EQ(target[1], TTraceSegment(0, 0, 1, +TraceBitMap_<>::VERTICAL));
+    SEQAN_ASSERT_EQ(target[0], TTraceSegment(0, 1, 2, TraceBitMap_<>::DIAGONAL));
+    SEQAN_ASSERT_EQ(target[1], TTraceSegment(0, 0, 1, TraceBitMap_<>::VERTICAL));
 }
 
 SEQAN_DEFINE_TEST(test_align2_traceback_gaps_right_linear_gaps)
@@ -449,24 +443,23 @@ SEQAN_DEFINE_TEST(test_align2_traceback_gaps_right_linear_gaps)
 
     resize(traceMatrix);
 
-    value(traceMatrix, 0, 0) = +TraceBitMap_<>::NONE;
-    value(traceMatrix, 1, 0) = +TraceBitMap_<>::VERTICAL_OPEN | +TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
-    value(traceMatrix, 2, 0) = +TraceBitMap_<>::VERTICAL | +TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
-    value(traceMatrix, 3, 0) = +TraceBitMap_<>::VERTICAL | +TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
+    value(traceMatrix, 0, 0) = TraceBitMap_<>::NONE;
+    value(traceMatrix, 1, 0) = TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
+    value(traceMatrix, 2, 0) = TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
+    value(traceMatrix, 3, 0) = TraceBitMap_<>::VERTICAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
 
-    value(traceMatrix, 0, 1) = +TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX;
-    value(traceMatrix, 1, 1) = +TraceBitMap_<>::DIAGONAL;
-    value(traceMatrix, 2, 1) = +TraceBitMap_<>::DIAGONAL;
-    value(traceMatrix, 3, 1) = +TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX;
+    value(traceMatrix, 0, 1) = TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX;
+    value(traceMatrix, 1, 1) = TraceBitMap_<>::DIAGONAL;
+    value(traceMatrix, 2, 1) = TraceBitMap_<>::DIAGONAL;
+    value(traceMatrix, 3, 1) = TraceBitMap_<>::HORIZONTAL_OPEN | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX;
 
-    value(traceMatrix, 0, 2) = +TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX;
-    value(traceMatrix, 1, 2) = +TraceBitMap_<>::VERTICAL_OPEN | +TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
-    value(traceMatrix, 2, 2) = +TraceBitMap_<>::DIAGONAL;
-    value(traceMatrix, 3, 2) = +TraceBitMap_<>::VERTICAL | +TraceBitMap_<>::DIAGONAL | +TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
+    value(traceMatrix, 0, 2) = TraceBitMap_<>::HORIZONTAL | TraceBitMap_<>::MAX_FROM_HORIZONTAL_MATRIX;
+    value(traceMatrix, 1, 2) = TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
+    value(traceMatrix, 2, 2) = TraceBitMap_<>::DIAGONAL;
+    value(traceMatrix, 3, 2) = TraceBitMap_<>::VERTICAL | TraceBitMap_<>::DIAGONAL | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX;
 
 
-    TDPTraceNavigator navigator;
-    _init(navigator, traceMatrix, DPBandConfig<BandOff>());
+    TDPTraceNavigator navigator{traceMatrix, DPBandConfig<BandOff>()};
 
     DnaString str0 = "AC";
     DnaString str1 = "CCC";
@@ -475,8 +468,8 @@ SEQAN_DEFINE_TEST(test_align2_traceback_gaps_right_linear_gaps)
     dpScout._maxHostPosition = 11;
     _computeTraceback(target, navigator, dpScout, str0, str1, DPBandConfig<BandOff>(), TDPProfile());
 
-    SEQAN_ASSERT_EQ(target[0], TTraceSegment(2, 2, 1, +TraceBitMap_<>::VERTICAL));
-    SEQAN_ASSERT_EQ(target[1], TTraceSegment(0, 0, 2, +TraceBitMap_<>::DIAGONAL));
+    SEQAN_ASSERT_EQ(target[0], TTraceSegment(2, 2, 1, TraceBitMap_<>::VERTICAL));
+    SEQAN_ASSERT_EQ(target[1], TTraceSegment(0, 0, 2, TraceBitMap_<>::DIAGONAL));
 }
 
 SEQAN_DEFINE_TEST(test_align2_traceback_gaps_left_affine_gaps)
@@ -516,8 +509,7 @@ SEQAN_DEFINE_TEST(test_align2_traceback_gaps_left_affine_gaps)
         value(traceMatrix, 3, 2) = TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::DIAGONAL;
 
 
-        TDPTraceNavigator navigator;
-        _init(navigator, traceMatrix, DPBandConfig<BandOff>());
+        TDPTraceNavigator navigator{traceMatrix, DPBandConfig<BandOff>()};
 
         DnaString str0 = "AC";
         DnaString str1 = "CCC";
@@ -527,8 +519,8 @@ SEQAN_DEFINE_TEST(test_align2_traceback_gaps_left_affine_gaps)
         _computeTraceback(target, navigator, dpScout, str0, str1, DPBandConfig<BandOff>(), TDPProfile());
 
         // TODO(rmaerker): This is disabled by default for the affine gap costs.
-        SEQAN_ASSERT_EQ(target[0], TTraceSegment(2, 2, 1, +TraceBitMap_<>::VERTICAL));
-        SEQAN_ASSERT_EQ(target[1], TTraceSegment(0, 0, 2, +TraceBitMap_<>::DIAGONAL));
+        SEQAN_ASSERT_EQ(target[0], TTraceSegment(2, 2, 1, TraceBitMap_<>::VERTICAL));
+        SEQAN_ASSERT_EQ(target[1], TTraceSegment(0, 0, 2, TraceBitMap_<>::DIAGONAL));
     }
 
     {   // Tests inner gaps.
@@ -563,8 +555,7 @@ SEQAN_DEFINE_TEST(test_align2_traceback_gaps_left_affine_gaps)
         value(traceMatrix, 2, 4) = TraceBitMap_<>::NONE;
         value(traceMatrix, 3, 4) = TraceBitMap_<>::DIAGONAL;
 
-        TDPTraceNavigator navigator;
-        _init(navigator, traceMatrix, DPBandConfig<BandOff>());
+        TDPTraceNavigator navigator{traceMatrix, DPBandConfig<BandOff>()};
 
         DnaString str0 = "ACCA";
         DnaString str1 = "ACA";
@@ -574,9 +565,9 @@ SEQAN_DEFINE_TEST(test_align2_traceback_gaps_left_affine_gaps)
         _computeTraceback(target, navigator, dpScout, str0, str1, DPBandConfig<BandOff>(), TDPProfile());
 
         // TODO(rmaerker): This is disabled by default for the affine gap costs.
-        SEQAN_ASSERT_EQ(target[0], TTraceSegment(2, 1, 2, +TraceBitMap_<>::DIAGONAL));
-        SEQAN_ASSERT_EQ(target[1], TTraceSegment(1, 1, 1, +TraceBitMap_<>::HORIZONTAL));
-        SEQAN_ASSERT_EQ(target[2], TTraceSegment(0, 0, 1, +TraceBitMap_<>::DIAGONAL));
+        SEQAN_ASSERT_EQ(target[0], TTraceSegment(2, 1, 2, TraceBitMap_<>::DIAGONAL));
+        SEQAN_ASSERT_EQ(target[1], TTraceSegment(1, 1, 1, TraceBitMap_<>::HORIZONTAL));
+        SEQAN_ASSERT_EQ(target[2], TTraceSegment(0, 0, 1, TraceBitMap_<>::DIAGONAL));
     }
 
 }
@@ -617,8 +608,7 @@ SEQAN_DEFINE_TEST(test_align2_traceback_gaps_right_affine_gaps)
         value(traceMatrix, 3, 2) = TraceBitMap_<>::VERTICAL_OPEN | TraceBitMap_<>::MAX_FROM_VERTICAL_MATRIX | TraceBitMap_<>::DIAGONAL;
 
 
-        TDPTraceNavigator navigator;
-        _init(navigator, traceMatrix, DPBandConfig<BandOff>());
+        TDPTraceNavigator navigator{traceMatrix, DPBandConfig<BandOff>()};
 
         DnaString str0 = "AC";
         DnaString str1 = "CCC";
@@ -627,8 +617,8 @@ SEQAN_DEFINE_TEST(test_align2_traceback_gaps_right_affine_gaps)
         dpScout._maxHostPosition = 11;
         _computeTraceback(target, navigator, dpScout, str0, str1, DPBandConfig<BandOff>(), TDPProfile());
 
-        SEQAN_ASSERT_EQ(target[0], TTraceSegment(2, 2, 1, +TraceBitMap_<>::VERTICAL));
-        SEQAN_ASSERT_EQ(target[1], TTraceSegment(0, 0, 2, +TraceBitMap_<>::DIAGONAL));
+        SEQAN_ASSERT_EQ(target[0], TTraceSegment(2, 2, 1, TraceBitMap_<>::VERTICAL));
+        SEQAN_ASSERT_EQ(target[1], TTraceSegment(0, 0, 2, TraceBitMap_<>::DIAGONAL));
     }
 
     {   // Test inner gaps.
@@ -663,8 +653,7 @@ SEQAN_DEFINE_TEST(test_align2_traceback_gaps_right_affine_gaps)
         value(traceMatrix, 2, 4) = TraceBitMap_<>::NONE;
         value(traceMatrix, 3, 4) = TraceBitMap_<>::DIAGONAL;
 
-        TDPTraceNavigator navigator;
-        _init(navigator, traceMatrix, DPBandConfig<BandOff>());
+        TDPTraceNavigator navigator{traceMatrix, DPBandConfig<BandOff>()};
 
         DnaString str0 = "ACCA";
         DnaString str1 = "ACA";
@@ -674,9 +663,9 @@ SEQAN_DEFINE_TEST(test_align2_traceback_gaps_right_affine_gaps)
         _computeTraceback(target, navigator, dpScout, str0, str1, DPBandConfig<BandOff>(), TDPProfile());
 
         // TODO(rmaerker): This is disabled by default for the affine gap costs.
-        SEQAN_ASSERT_EQ(target[0], TTraceSegment(3, 2, 1, +TraceBitMap_<>::DIAGONAL));
-        SEQAN_ASSERT_EQ(target[1], TTraceSegment(2, 2, 1, +TraceBitMap_<>::HORIZONTAL));
-        SEQAN_ASSERT_EQ(target[2], TTraceSegment(0, 0, 2, +TraceBitMap_<>::DIAGONAL));
+        SEQAN_ASSERT_EQ(target[0], TTraceSegment(3, 2, 1, TraceBitMap_<>::DIAGONAL));
+        SEQAN_ASSERT_EQ(target[1], TTraceSegment(2, 2, 1, TraceBitMap_<>::HORIZONTAL));
+        SEQAN_ASSERT_EQ(target[2], TTraceSegment(0, 0, 2, TraceBitMap_<>::DIAGONAL));
     }
 }
 
diff --git a/tests/align/test_evaluate_alignment.h b/tests/align/test_evaluate_alignment.h
index 4a2c870..72c10e1 100644
--- a/tests/align/test_evaluate_alignment.h
+++ b/tests/align/test_evaluate_alignment.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                         test_evaluate_alignment.h
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/align/test_local_align.h b/tests/align/test_local_align.h
index 3aaaab5..0b424af 100644
--- a/tests/align/test_local_align.h
+++ b/tests/align/test_local_align.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/align/test_mock.h b/tests/align/test_mock.h
new file mode 100644
index 0000000..7161e0c
--- /dev/null
+++ b/tests/align/test_mock.h
@@ -0,0 +1,240 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Rene Rahn <rene.rahn at fu-berlin.de>
+// ==========================================================================
+
+#ifndef TESTS_ALIGN_TEST_MOCK_H_
+#define TESTS_ALIGN_TEST_MOCK_H_
+
+namespace impl
+{
+namespace test_align_mock
+{
+
+struct TestAlignSimdVariableLength_;
+using VariableLengthSimd = seqan::Tag<TestAlignSimdVariableLength_>;
+
+struct TestAlignSimdEqualLength_;
+using EqualLengthSimd = seqan::Tag<TestAlignSimdEqualLength_>;
+
+template <typename TAlphabet, typename TSimdLength>
+struct TestSequences_;
+
+template <>
+struct TestSequences_<seqan::Dna, EqualLengthSimd>
+{
+    using TSeq = seqan::String<seqan::Dna>;
+
+    static auto
+    getSequences()
+    {
+        seqan::StringSet<TSeq> set;
+        appendValue(set, "AGCGACTGCAAACATCAGATCAGAG");
+        appendValue(set, "TAATACTAGCATGCGATAAGTCCCT");
+        appendValue(set, "GGCACGTGGATGGTTTAGAGGAATC");
+        appendValue(set, "AGATTCAAGTCTGGTTAACCATCAA");
+        appendValue(set, "ACAGGTCTTGAGTCTAAAATTGTCG");
+        appendValue(set, "TCTCCTGCGTACGAGATGGAAATAC");
+        appendValue(set, "TAGGTAACTACAGGGACTCCGACGT");
+        appendValue(set, "TATGTACGTTGCTCCGTCAGAGGCG");
+
+        appendValue(set, "CCATTCAGGATCACGTTACCGCGAA");
+        appendValue(set, "AAAAAGGGACCAGGAGCTCTTCTCC");
+        appendValue(set, "CCTGCGGTCACGTCTATAGAAATTA");
+        appendValue(set, "CACCATTAACCCTCCTGAGAACCGG");
+        appendValue(set, "GAGGCGGGAATCCGTCACGTATGAG");
+        appendValue(set, "AAGGTATTTGCCCGATAATCAATAC");
+        appendValue(set, "CCCAGGCTTCTAACTTTTTCCACTC");
+        appendValue(set, "GCTTGAGCCGGCTAGGCCTTTCTGC");
+
+        appendValue(set, "ATCTCGGGTCCTGCCCAACCGGTCT");
+        appendValue(set, "AACAAGGGACCAGGAGCTCTTCTCC");
+        appendValue(set, "ACACGCTAATATAGCGAATCACCGA");
+        appendValue(set, "GAACCCGGCGCCACGCAATGGAACG");
+        appendValue(set, "TCCTTAACTCCGGCAGGCAATTAAA");
+        appendValue(set, "ACAGAAAAATAGGCGAATGAATCTT");
+        appendValue(set, "GGGAACGTATGTATAACGCAAAAAA");
+        appendValue(set, "TTCTCTGTGTATCGAAGAATGGCCT");
+
+        appendValue(set, "CCGAAGTTTCGATGGACTGGTGCCA");
+        appendValue(set, "ACGCGCAGGCATAGTTTTAGGAGAA");
+        appendValue(set, "TTATTCGGGGGCAGTGACAACCAAC");
+
+        seqan::StringSet<TSeq>  set2(set);
+        std::sort(seqan::begin(set2, seqan::Standard()), seqan::end(set2, seqan::Standard()),
+                  [](auto& strA, auto& strB){ return seqan::isLess(strA, strB); });
+        return std::make_tuple(set, set2);
+    }
+};
+
+template <>
+struct TestSequences_<seqan::Dna, VariableLengthSimd>
+{
+    using TSeq = seqan::String<seqan::Dna>;
+
+    static auto
+    getSequences()
+    {
+        seqan::StringSet<TSeq> set;
+        appendValue(set, "AGCGACTGCAAACATCAGATCAGAGGTAGAG");
+        appendValue(set, "TAATACTAGCATGCGATAAGTCCCT");
+        appendValue(set, "GGCACGTGTGGTTTAGAGGAATC");
+        appendValue(set, "AGATTCAAGTCTGGTTAACCATCAA");
+        appendValue(set, "ACAGGTCTTGAGTCTAAAATTGTCGAA");
+        appendValue(set, "TCTCCTGCGTACGAGATGGAAATAC");
+        appendValue(set, "TAGGTAACTACAGGGACACGT");
+        appendValue(set, "TATGTACGTCTCCGTCAGAGGCG");
+
+        appendValue(set, "CCATTCAGGATCACGTTACCGCGAAGTACCC");
+        appendValue(set, "AAGGGACCAGGAGCTCTTCTCC");
+        appendValue(set, "CCTGCGGTCACGTCTATAGAAATT");
+        appendValue(set, "CACCATTAACCCTCCTGAGAACCGAGTAGG");
+        appendValue(set, "GAGGCGGGAATCCGTCACGTATGAG");
+        appendValue(set, "AAGGTATTTGCCCGATAATCAATACGATGAGATAGAGAGATAGAATAGAGAAGGGACCGCGCATGACTACGATCGACTGACTACGA");
+        appendValue(set, "CGAGTATATCGAGAGAGGTCACG");
+        appendValue(set, "GCTTGAGCCGGCTAGGCTCTGC");
+
+        appendValue(set, "ATCTCGGGTCCTGCCAACCGGTCT");
+        appendValue(set, "AAAAAGGGACCAGGAGCTCTTCTCC");
+        appendValue(set, "ACACGCTAATATAGCGAATCACCGA");
+        appendValue(set, "AATGGAACG");
+        appendValue(set, "TCCTTAACTCCGGCAGGCAATTATACCGGACTGACACTTAAA");
+        appendValue(set, "ACAGAAAAATAGGCGAATGAAACACTCTT");
+        appendValue(set, "GGGAACGTATGTATAACGCAAAAA");
+        appendValue(set, "TTCTCTGTGTATCGAAGAATGCT");
+
+        appendValue(set, "CCGAAGTTTCGATGGATGGATTCCACACACCTGGTGCCA");
+        appendValue(set, "ACGCGCAGGCATAGTTGGAGAA");
+        appendValue(set, "TTATTCGGGGGCAGTGACAACACTTAGCGACTAC");
+
+        auto set2(set);
+        std::sort(seqan::begin(set2, seqan::Standard()), seqan::end(set2, seqan::Standard()),
+                  [](auto& strA, auto& strB){ return seqan::isLess(strA, strB); });
+        return std::make_tuple(set, set2);
+    }
+};
+
+template <>
+struct TestSequences_<seqan::AminoAcid, EqualLengthSimd>
+{
+    using TSeq = seqan::String<seqan::AminoAcid>;
+
+    static auto
+    getSequences()
+    {
+        seqan::StringSet<TSeq> set;
+        appendValue(set, "FNQSAEYPDISLHCGVLKWRATLGT");
+        appendValue(set, "EIKSDVLLHRPGNIGMQVAESYFAT");
+        appendValue(set, "PIIMWSMKNRTIERLPTGVLMISHT");
+        appendValue(set, "FMATNEKVHCACGADYQMIIDCNEA");
+        appendValue(set, "MFHQTSNANWMFVSNKFHIKFGTLD");
+        appendValue(set, "SNEMGQCFPHEPACFFDKDFRLFIN");
+        appendValue(set, "FPWAHYVVHTLREHRKDANHRSTSY");
+        appendValue(set, "QYRNTESMGCEMRCFTETIMIAGVA");
+
+        appendValue(set, "VVRMDGKEVLKQHVPTYADKHPTGQ");
+        appendValue(set, "TMLKWCEWCFAEFPPFASEPKFPPN");
+        appendValue(set, "GTWGWVDGVHHTMGEQCGPGRACWG");
+        appendValue(set, "ECDFQTWYFYCVNQEIFELFICCMG");
+        appendValue(set, "KRRELNGQERGGWWTVDGPGVSMGT");
+        appendValue(set, "CWAAHYVCWRTKQKQLVAFQRLNCI");
+        appendValue(set, "NRLVGFQIHCFLIRCVEPGQTHTID");
+        appendValue(set, "AYYVRGFMMGQMYGRPVILMTFTKP");
+
+        appendValue(set, "SFTQPVELHIPHYWWHLAYFMIMFY");
+        appendValue(set, "PMNKMFDFNNHQDLLTFTKRFPTPW");
+        appendValue(set, "VIPMIYHDWSIISALMMQKDIYYIA");
+        appendValue(set, "TPGMWGMATLTGNFNSIFVSKYVKN");
+        appendValue(set, "GKELWGMVIARAGMAVQNMYSRDTF");
+        appendValue(set, "VHASDLYAKCYSNCVYQENIDIAEV");
+        appendValue(set, "KQSGTLSGPQYWENVHRVLEDYPKE");
+        appendValue(set, "DPHGYCFYEGTFAWDVEVHEFNNKD");
+
+        appendValue(set, "NMQDVIGGKSLAQHSSVTYKAQQEH");
+        appendValue(set, "CQTPRWECSLNFDEKEAADLMIDVS");
+        appendValue(set, "PMMDLDHCMLIECLRPHNRDNCARH");
+
+        decltype(set) set2(set);
+        std::sort(seqan::begin(set2, seqan::Standard()), seqan::end(set2, seqan::Standard()),
+                  [](auto& strA, auto& strB){ return seqan::isLess(strA, strB); });
+        return std::make_tuple(set, set2);
+    }
+};
+
+template <>
+struct TestSequences_<seqan::AminoAcid, VariableLengthSimd>
+{
+    using TSeq = seqan::String<seqan::AminoAcid>;
+
+    static auto
+    getSequences()    {
+        seqan::StringSet<TSeq> set;
+        appendValue(set, "FNQSAEYPDISHCGVMQLKWRATLGT");
+        appendValue(set, "EIKSDVLLHRWSMKNPGNILMIDVGMQVAESYFAT");
+        appendValue(set, "PIIMWSMKNRTIEPTGLMISHT");
+        appendValue(set, "FMATNEKVHCACGWSMKNADLMIDVYQMIIDCNEA");
+        appendValue(set, "MWSMKNFHQTSNANWMFVSNMQKFHIKFGTLD");
+        appendValue(set, "SNEGQCFPHEPACFWSMKFDKDFRLFIN");
+        appendValue(set, "FPWAHYVVHTLREHMQRKDANHRSTSY");
+        appendValue(set, "QYRNTWSMKNESMGCEMRFLMIVTETIMIAGVA");
+
+        appendValue(set, "VVRMDGKEVLWSMKNKQHVPTYADKHPTGQ");
+        appendValue(set, "TMLKWCEWCFALMIDVEFPPFASEPKFPPN");
+        appendValue(set, "GTWGVDGVHHWSMWSMKNLMIDVTMGEQCGPGRACWG");
+        appendValue(set, "ECDFQTWYFYCVNQMQEIFELFICCMG");
+        appendValue(set, "KRREWSMKNLNGQERGGWWTVDGPGVSMGT");
+        appendValue(set, "CWAAHYCWRWWSMKNSMKNTKLMIDVQMQKQLVAFQRLNCI");
+        appendValue(set, "NRLVGFQIHCFIRCVEPGQTHTID");
+        appendValue(set, "AYYVRGFMMGQMMQYGRPVILMTFTKP");
+
+        appendValue(set, "SFTQPVELHIPHYWLMIDVWHLAYFMIMFY");
+        appendValue(set, "PMNKMFDFNHQMQDLLTFTKPTPW");
+        appendValue(set, "VIPMIYHDWSIISALMMLMIDVQKDIYYIA");
+        appendValue(set, "TPGMWGMATLTGMQNFNSFVSKYVKN");
+        appendValue(set, "GKELWGMVIARAGMAVQNLMIDVMYSRDTF");
+        appendValue(set, "VHASDLWSNYAKCYSNCVYQEIDIAEV");
+        appendValue(set, "KQSGTLSMQGPYWENVHRVLLMIDVEDYPKE");
+        appendValue(set, "DPHGYCFMQYEGTFAWDVEVHEFNNKD");
+
+        appendValue(set, "NMQDVIGGKSLAQHSSVTYAQQEH");
+        appendValue(set, "CQTPRWECMQSLNFDEKEAADLMIDVS");
+        appendValue(set, "PMMDLDWSMKNMLIECLRPHNRMQDNLMIDVCARH");
+
+        auto set2(set);
+        std::sort(seqan::begin(set2, seqan::Standard()), seqan::end(set2, seqan::Standard()),
+                  [](auto& strA, auto& strB){ return seqan::isLess(strA, strB); });
+        return std::make_tuple(set, set2);
+    }
+};
+} // namespace test_align_mock
+} // namespace impl
+#endif // TEST_MOCK_H_
diff --git a/tests/align_extend/test_align_extend.cpp b/tests/align_extend/test_align_extend.cpp
index 23d9e78..2e71dc5 100644
--- a/tests/align_extend/test_align_extend.cpp
+++ b/tests/align_extend/test_align_extend.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/align_extend/test_align_extend.h b/tests/align_extend/test_align_extend.h
index fe4d757..4b676b2 100644
--- a/tests/align_extend/test_align_extend.h
+++ b/tests/align_extend/test_align_extend.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/align_parallel/CMakeLists.txt b/tests/align_parallel/CMakeLists.txt
new file mode 100644
index 0000000..df770f5
--- /dev/null
+++ b/tests/align_parallel/CMakeLists.txt
@@ -0,0 +1,78 @@
+# ===========================================================================
+#                  SeqAn - The Library for Sequence Analysis
+# ===========================================================================
+# File: /tests/align_parallel/CMakeLists.txt
+#
+# CMakeLists.txt file for the align_parallel module tests.
+# ===========================================================================
+
+cmake_minimum_required (VERSION 3.0.0)
+project (seqan_tests_align_parallel CXX)
+message (STATUS "Configuring tests/align_parallel")
+
+# ----------------------------------------------------------------------------
+# Dependencies
+# ----------------------------------------------------------------------------
+
+set (ALIGN_PARALLEL_SIMD_TEST TRUE CACHE INTERNAL "Whether to build test_align_parallel.")
+# workaround a bug in llvm35 on FreeBSD
+if ((${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") AND
+    (COMPILER_CLANG) AND
+    (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.6.0))
+    set (ALIGN_PARALLEL_SIMD_TEST FALSE CACHE INTERNAL "Whether to build test_align_parallel.")
+endif ()
+
+# Increase recursive template instantiation depth for clang compiler.
+if (COMPILER_CLANG)
+    set(SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} -ftemplate-depth=1024")
+endif ()
+
+# ----------------------------------------------------------------------------
+# Build Setup
+# ----------------------------------------------------------------------------
+
+# Add include directories.
+include_directories (${SEQAN_INCLUDE_DIRS})
+
+# Add definitions set by find_package (SeqAn).
+add_definitions (${SEQAN_DEFINITIONS})
+
+# Update the list of file names below if you add source files to your test.
+add_executable (test_align_parallel_data_structures
+                test_align_parallel_data_structures.cpp
+                test_align_wavefront_task_scheduler.h
+                test_align_wavefront_alignment_scheduler.h
+                test_align_wavefront_intermediate_dp_result.h
+                test_align_wavefront_alignment_thread_local.h)
+
+add_executable (test_align_parallel_algorithm
+                test_align_parallel_algorithm.cpp
+                test_align_parallel_wavefront_alignment.h)
+
+add_executable (test_align_parallel_interface
+                test_align_parallel_interface.cpp
+                test_align_parallel_interface.h
+                ../align/test_mock.h)
+
+# Add dependencies found by find_package (SeqAn).
+target_link_libraries (test_align_parallel_data_structures ${SEQAN_LIBRARIES})
+
+# Add dependencies found by find_package (SeqAn).
+target_link_libraries (test_align_parallel_algorithm ${SEQAN_LIBRARIES})
+
+# Add dependencies found by find_package (SeqAn).
+target_link_libraries (test_align_parallel_interface ${SEQAN_LIBRARIES})
+
+# Add CXX flags found by find_package (SeqAn).
+set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SEQAN_CXX_FLAGS}")
+
+# ----------------------------------------------------------------------------
+# Register with CTest
+# ----------------------------------------------------------------------------
+
+add_test (NAME test_align_parallel_data_structures COMMAND $<TARGET_FILE:test_align_parallel_data_structures>)
+if (ALIGN_PARALLEL_SIMD_TEST)
+    include (SeqAnSimdUtility)
+    add_simd_platform_tests(test_align_parallel_interface)
+    add_simd_platform_tests(test_align_parallel_algorithm)
+endif ()
diff --git a/tests/basic/test_basic_allocator.cpp b/tests/align_parallel/test_align_parallel_algorithm.cpp
similarity index 78%
copy from tests/basic/test_basic_allocator.cpp
copy to tests/align_parallel/test_align_parallel_algorithm.cpp
index 0ddd7a5..6b0dd93 100644
--- a/tests/basic/test_basic_allocator.cpp
+++ b/tests/align_parallel/test_align_parallel_algorithm.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -29,27 +29,23 @@
 // DAMAGE.
 //
 // ==========================================================================
-// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
-// ==========================================================================
-// Tests for the sub module basic_fundamental.
+// Author: Rene Rahn <rene.rahn at fu-berlin.de>
 // ==========================================================================
 
 #include <seqan/basic.h>
 
-#include "test_basic_allocator.h"
+#include "test_align_parallel_wavefront_alignment.h"
 
-SEQAN_BEGIN_TESTSUITE(test_basic_allocator)
+SEQAN_BEGIN_TESTSUITE(test_align_parallel_algorithm)
 {
     // -----------------------------------------------------------------------
-    // Tests for Allocators
+    // Test single wavefront alignment.
     // -----------------------------------------------------------------------
 
-    SEQAN_CALL_TEST(test_basic_allocator_simple);
-    SEQAN_CALL_TEST(test_basic_allocator_pool);
-    SEQAN_CALL_TEST(test_basic_allocator_multi_pool);
-    SEQAN_CALL_TEST(test_basic_allocator_chunk_pool);
-    // TODO(holtgrew): Test for std:: adaption!
-
+    SEQAN_CALL_TEST(test_align_parallel_wavefront_single_global_alignment);
+    SEQAN_CALL_TEST(test_align_parallel_wavefront_multiple_global_alignment);
+#ifdef SEQAN_SIMD_ENABLED
+    SEQAN_CALL_TEST(test_align_parallel_wavefront_multiple_global_alignment_simd);
+#endif
 }
 SEQAN_END_TESTSUITE
-
diff --git a/tests/basic/test_basic_smart_pointer.cpp b/tests/align_parallel/test_align_parallel_data_structures.cpp
similarity index 56%
copy from tests/basic/test_basic_smart_pointer.cpp
copy to tests/align_parallel/test_align_parallel_data_structures.cpp
index 3b518ef..3b2ec5f 100644
--- a/tests/basic/test_basic_smart_pointer.cpp
+++ b/tests/align_parallel/test_align_parallel_data_structures.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -29,40 +29,47 @@
 // DAMAGE.
 //
 // ==========================================================================
-// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
-// ==========================================================================
-// Tests for the sub module basic_smart_pointer.
+// Author: Rene Rahn <rene.rahn at fu-berlin.de>
 // ==========================================================================
 
 #include <seqan/basic.h>
 
-#include "test_basic_smart_pointer_holder.h"
+#include "test_align_wavefront_task_scheduler.h"
+#include "test_align_wavefront_alignment_scheduler.h"
+#include "test_align_wavefront_intermediate_dp_result.h"
+#include "test_align_wavefront_alignment_thread_local.h"
 
-SEQAN_BEGIN_TESTSUITE(test_basic_smart_pointer)
+SEQAN_BEGIN_TESTSUITE(test_align_parallel_data_structures)
 {
     // -----------------------------------------------------------------------
-    // Tests for Holders
+    // Test wavefront task scheduler.
     // -----------------------------------------------------------------------
 
-    SEQAN_CALL_TEST(test_basic_smart_pointer_holder_simple_metafunctions);
-    SEQAN_CALL_TEST(test_basic_smart_pointer_holder_simple_constructors);
-    SEQAN_CALL_TEST(test_basic_smart_pointer_holder_simple_transport);
-    SEQAN_CALL_TEST(test_basic_smart_pointer_holder_simple_transport_value);
-    SEQAN_CALL_TEST(test_basic_smart_pointer_holder_simple_dependencies);
-    SEQAN_CALL_TEST(test_basic_smart_pointer_holder_simple_accessor);
+    SEQAN_CALL_TEST(test_align_parallel_wavefront_task_scheduler_construct);
+    SEQAN_CALL_TEST(test_align_parallel_wavefront_task_scheduler_async);
 
-    SEQAN_CALL_TEST(test_basic_smart_pointer_holder_tristate_metafunctions);
-    SEQAN_CALL_TEST(test_basic_smart_pointer_holder_tristate_constructors);
-    SEQAN_CALL_TEST(test_basic_smart_pointer_holder_tristate_transport);
-    SEQAN_CALL_TEST(test_basic_smart_pointer_holder_tristate_transport_value);
-    SEQAN_CALL_TEST(test_basic_smart_pointer_holder_tristate_dependencies);
-    SEQAN_CALL_TEST(test_basic_smart_pointer_holder_tristate_accessor);
+    // -----------------------------------------------------------------------
+    // Test wavefront alignment scheduler.
+    // -----------------------------------------------------------------------
+
+    SEQAN_CALL_TEST(test_align_parallel_wavefront_alignment_scheduler_construct);
+    SEQAN_CALL_TEST(test_align_parallel_wavefront_alignment_scheduler_async);
+    SEQAN_CALL_TEST(test_align_parallel_wavefront_alignment_scheduler_async_with_exception);
 
     // -----------------------------------------------------------------------
-    // Tests for Volatile Pointer
+    // Test WavefrontAlignmentResult
     // -----------------------------------------------------------------------
 
-    // TODO(holtgrew): Write tests.
+    SEQAN_CALL_TEST(test_align_parallel_intermediate_dp_result_construct);
+    SEQAN_CALL_TEST(test_align_parallel_intermediate_dp_result_update_max);
+    SEQAN_CALL_TEST(test_align_parallel_intermediate_dp_result_clear);
+
+    // -----------------------------------------------------------------------
+    // Test WavefrontAlignmentThreadLocalStorage
+    // -----------------------------------------------------------------------
+
+    SEQAN_CALL_TEST(test_align_parallel_wavefront_alignment_thread_local_storage_construt);
+    SEQAN_CALL_TEST(test_align_parallel_wavefront_alignment_thread_local_storage_cache);
+    SEQAN_CALL_TEST(test_align_parallel_wavefront_alignment_thread_local_storage_intermediate);
 }
 SEQAN_END_TESTSUITE
-
diff --git a/tests/align/test_align_simd.cpp b/tests/align_parallel/test_align_parallel_interface.cpp
similarity index 95%
rename from tests/align/test_align_simd.cpp
rename to tests/align_parallel/test_align_parallel_interface.cpp
index 405b6b6..44336b6 100644
--- a/tests/align/test_align_simd.cpp
+++ b/tests/align_parallel/test_align_parallel_interface.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -35,7 +35,7 @@
 #include <seqan/basic.h>
 #include <seqan/stream.h>
 
-#include "test_align_simd.h"
+#include "test_align_parallel_interface.h"
 
 int main(int argc, char const ** argv) {
     seqan::TestSystem::init(argc, argv);
diff --git a/tests/align_parallel/test_align_parallel_interface.h b/tests/align_parallel/test_align_parallel_interface.h
new file mode 100644
index 0000000..08e6e76
--- /dev/null
+++ b/tests/align_parallel/test_align_parallel_interface.h
@@ -0,0 +1,168 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Rene Rahn <rene.rahn at fu-berlin.de>
+// ==========================================================================
+
+// #define DP_PARALLEL_SHOW_PROGRESS // Enable when debugging.
+
+#include <seqan/align_parallel.h>
+
+#include "../align/test_mock.h"
+
+namespace test_align_parallel
+{
+
+template <typename TSets, typename TResults, typename ...TParams>
+inline void
+validateGlobal(TSets const & sets,
+               TResults const & res,
+               TParams && ...params)
+{
+    auto z = makeZipView(std::get<0>(sets), std::get<1>(sets), res);
+
+    for (auto && inst : z)
+    {
+        auto tmp = globalAlignmentScore(std::get<0>(inst), std::get<1>(inst), std::forward<TParams>(params)...);
+        SEQAN_ASSERT_EQ(tmp, std::get<2>(inst));
+    }
+}
+
+template <typename TSets, typename TResults, typename ...TParams>
+inline void
+validateLocal(TSets const & sets,
+              TResults const & res,
+              TParams && ...params)
+{
+    auto z = makeZipView(std::get<0>(sets), std::get<1>(sets), res);
+
+    for (auto && inst : z)
+    {
+        auto tmp = localAlignmentScore(std::get<0>(inst), std::get<1>(inst), std::forward<TParams>(params)...);
+        SEQAN_ASSERT_EQ(tmp, std::get<2>(inst));
+    }
+}
+
+}  // namespace test_align_parallel
+
+// ----------------------------------------------------------------------------
+// Class SimdAlignTest
+// ----------------------------------------------------------------------------
+
+// Common test class instance, which stores the types to be accessed.
+template <typename TTuple>
+class ParallelAlignInterfaceTest : public seqan::Test
+{
+public:
+    using TExecPolicy = std::tuple_element_t<0, TTuple>;
+};
+
+// ----------------------------------------------------------------------------
+// Configuration of typed tests for global alignment.
+// ----------------------------------------------------------------------------
+
+template <typename T>
+class ParallelAlignInterfaceTestCommon : public ParallelAlignInterfaceTest<T>
+{};
+
+typedef
+        seqan::TagList<std::tuple<seqan::ExecutionPolicy<seqan::Serial,                                             seqan::Serial>>,
+        seqan::TagList<std::tuple<seqan::ExecutionPolicy<seqan::Parallel,                                           seqan::Serial>>,
+        seqan::TagList<std::tuple<seqan::ExecutionPolicy<seqan::WavefrontAlignment<>,                               seqan::Serial>>,
+        seqan::TagList<std::tuple<seqan::ExecutionPolicy<seqan::WavefrontAlignment<seqan::BlockOffsetOptimization>, seqan::Serial>>
+#ifdef SEQAN_SIMD_ENABLED
+        ,
+        seqan::TagList<std::tuple<seqan::ExecutionPolicy<seqan::Serial,                                             seqan::Vectorial>>,
+        seqan::TagList<std::tuple<seqan::ExecutionPolicy<seqan::Parallel,                                           seqan::Vectorial>>,
+        seqan::TagList<std::tuple<seqan::ExecutionPolicy<seqan::WavefrontAlignment<>,                               seqan::Vectorial>>,
+        seqan::TagList<std::tuple<seqan::ExecutionPolicy<seqan::WavefrontAlignment<seqan::BlockOffsetOptimization>, seqan::Vectorial>>
+        > > > >
+#endif // SEQAN_SIMD_ENABLED
+        > > > > ParallelAlignInterfaceTestCommonTypes;
+
+SEQAN_TYPED_TEST_CASE(ParallelAlignInterfaceTestCommon, ParallelAlignInterfaceTestCommonTypes);
+
+SEQAN_TYPED_TEST(ParallelAlignInterfaceTestCommon, Global_Score)
+{
+    using namespace seqan;
+    using TExecPolicy = typename TestFixture::TExecPolicy;
+
+    auto sets = ::impl::test_align_mock::TestSequences_<Dna, ::impl::test_align_mock::EqualLengthSimd>::getSequences();
+
+    Score<int, Simple> scoreLinear(4, -2, -4);
+    TExecPolicy execPolicy;
+    setNumThreads(execPolicy, 4);
+    auto score = globalAlignmentScore(execPolicy, std::get<0>(sets), std::get<1>(sets), scoreLinear);
+
+    test_align_parallel::validateGlobal(sets, score, scoreLinear);
+
+    Score<int, Simple> scoreAffine(4, -2, -4, -10);
+    score = globalAlignmentScore(execPolicy, std::get<0>(sets), std::get<1>(sets), scoreAffine);
+    test_align_parallel::validateGlobal(sets, score, scoreAffine);
+}
+
+SEQAN_TYPED_TEST(ParallelAlignInterfaceTestCommon, Semi_Global_Score)
+{
+    using namespace seqan;
+    using TExecPolicy = typename TestFixture::TExecPolicy;
+
+    auto sets = ::impl::test_align_mock::TestSequences_<Dna, ::impl::test_align_mock::EqualLengthSimd>::getSequences();
+
+    Score<int, Simple> scoreLinear(4, -2, -4);
+    TExecPolicy execPolicy;
+    setNumThreads(execPolicy, 4);
+    auto score = globalAlignmentScore(execPolicy, std::get<0>(sets), std::get<1>(sets), scoreLinear, AlignConfig<true, false, false, true>());
+
+    test_align_parallel::validateGlobal(sets, score, scoreLinear, AlignConfig<true, false, false, true>());
+
+    Score<int, Simple> scoreAffine(4, -2, -4, -10);
+    score = globalAlignmentScore(execPolicy, std::get<0>(sets), std::get<1>(sets), scoreAffine, AlignConfig<true, false, false, true>());
+    test_align_parallel::validateGlobal(sets, score, scoreAffine, AlignConfig<true, false, false, true>());
+}
+
+SEQAN_TYPED_TEST(ParallelAlignInterfaceTestCommon, Local_Score)
+{
+    using namespace seqan;
+    using TExecPolicy = typename TestFixture::TExecPolicy;
+
+    auto sets = ::impl::test_align_mock::TestSequences_<Dna, ::impl::test_align_mock::EqualLengthSimd>::getSequences();
+
+    Score<int, Simple> scoreLinear(4, -2, -4);
+    TExecPolicy execPolicy;
+    setNumThreads(execPolicy, 4);
+    auto score = localAlignmentScore(execPolicy, std::get<0>(sets), std::get<1>(sets), scoreLinear);
+
+    test_align_parallel::validateLocal(sets, score, scoreLinear);
+
+    Score<int, Simple> scoreAffine(4, -2, -4, -10);
+    score = localAlignmentScore(execPolicy, std::get<0>(sets), std::get<1>(sets), scoreAffine);
+    test_align_parallel::validateLocal(sets, score, scoreAffine);
+}
diff --git a/tests/align_parallel/test_align_parallel_wavefront_alignment.h b/tests/align_parallel/test_align_parallel_wavefront_alignment.h
new file mode 100644
index 0000000..420ad96
--- /dev/null
+++ b/tests/align_parallel/test_align_parallel_wavefront_alignment.h
@@ -0,0 +1,183 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Rene Rahn <rene.rahn at fu-berlin.de>
+// ==========================================================================
+
+#include <seqan/align_parallel.h>
+
+namespace test_align_parallel
+{
+struct DPTestConfig : public seqan::DPTraits::GlobalAffine
+{
+    using TTracebackType = seqan::TracebackOff;
+};
+}  // namespace test_align_parallel
+
+SEQAN_DEFINE_TEST(test_align_parallel_wavefront_single_global_alignment)
+{
+    using namespace seqan;
+    // We need to be able to construct a thread pool.
+
+    // Define the traits object based on the settings.
+    // now we want to define a WavefrontAlignmentTask connecting all the components together.
+    DnaString seqH = "GGTTTTGTTTGATGGAGAATTGCGCAGAGGGGTTATATCTGCGTGAGGATCTGTCACTCGGCGGTGTGGG"
+                     "ATACCTCCCTGCTAAGGCGGGTTGAGTGATGTTCCCTCGGACTGGGGACCGCTGGCTTGCGAGCTATGTC"
+                     "CGCTACTCTCAGTACTACACTCTCATTTGAGCCCCCGCTCAGTTTGCTAGCAGAACCCGGCACATGGTTC"
+                     "GCCGATACTATGGATTTTCTAAAGAAACACTCTGTTAGGTGGTATGAGTCATGACGCACGCAGGGAGAGG"
+                     "CTAAGGCTTATGCTATGCTGATCTCCGTGAATGTCTATCATTCCTCTGCAGGACCC";
+
+    DnaString seqV = "ACAGAGCGCGTACTGTCTGACGACGTATCCGCGCGGACTAGAAGGCTGGTGCCTCGTCCAACAAATAGAT"
+                     "ACAGAAATCCACCGAAGTAAAGATCTCCAATTGTGGCACCACCAGGTGGCCACCACTCTTTGAAGTGAGG"
+                     "AGACTTGCTTTACGTGTTTGTTCAGCCCGAGCTTTCGCTCGCACTGGAACACTGGTGTTTCGTCCTTTCG"
+                     "GACTCATCAGTCAAGGTACGCACCTTGAGACACCGGGAAACAATCGATCAATCTTTCACAGAGCAACGAG"
+                     "TTCGCTACTCTTGCAAAAGATCGACTTCCTATTTCGTGGATA";
+
+    using TDPSettings = DPSettings<Score<int, Simple>, test_align_parallel::DPTestConfig>;
+    TDPSettings settings;
+    settings.scoringScheme = Score<int, Simple>{2, -2, -1, -11};
+
+    WavefrontAlignmentTask<DnaString, DnaString, TDPSettings> task{seqH, seqV, settings, 37};
+
+    using TThreadLocal = typename WavefrontAlignmentTaskConfig<TDPSettings>::TThreadLocal;
+
+    EnumerableThreadLocal<TThreadLocal> tls{TThreadLocal{1}};
+
+    WavefrontTaskScheduler scheduler(1, 1);
+    lockWriting(scheduler);
+    waitForWriters(scheduler);
+
+    WavefrontAlignmentExecutor<WavefrontTaskScheduler, decltype(tls)> executor{&scheduler, &tls};
+
+    int testScore{};
+    task(0, executor, [&](auto const /*id*/, auto const & score)
+    {
+        testScore = score;
+    });
+
+    SEQAN_ASSERT_EQ(globalAlignmentScore(seqH, seqV, settings.scoringScheme, AlignConfig<false, false, false, false>()), testScore);
+    unlockWriting(scheduler);
+}
+
+SEQAN_DEFINE_TEST(test_align_parallel_wavefront_multiple_global_alignment)
+{
+    using namespace seqan;
+
+    DnaString seqH = "GGTTTTGTTTGATGGAGAATTGCGCAGAGGGGTTATATCTGCGTGAGGATCTGTCACTCGGCGGTGTGGG"
+                     "ATACCTCCCTGCTAAGGCGGGTTGAGTGATGTTCCCTCGGACTGGGGACCGCTGGCTTGCGAGCTATGTC"
+                     "CGCTACTCTCAGTACTACACTCTCATTTGAGCCCCCGCTCAGTTTGCTAGCAGAACCCGGCACATGGTTC"
+                     "GCCGATACTATGGATTTTCTAAAGAAACACTCTGTTAGGTGGTATGAGTCATGACGCACGCAGGGAGAGG"
+                     "CTAAGGCTTATGCTATGCTGATCTCCGTGAATGTCTATCATTCCTCTGCAGGACCC";
+
+    DnaString seqV = "ACAGAGCGCGTACTGTCTGACGACGTATCCGCGCGGACTAGAAGGCTGGTGCCTCGTCCAACAAATAGAT"
+                     "ACAGAAATCCACCGAAGTAAAGATCTCCAATTGTGGCACCACCAGGTGGCCACCACTCTTTGAAGTGAGG"
+                     "AGACTTGCTTTACGTGTTTGTTCAGCCCGAGCTTTCGCTCGCACTGGAACACTGGTGTTTCGTCCTTTCG"
+                     "GACTCATCAGTCAAGGTACGCACCTTGAGACACCGGGAAACAATCGATCAATCTTTCACAGAGCAACGAG"
+                     "TTCGCTACTCTTGCAAAAGATCGACTTCCTATTTCGTGGATA";
+
+    StringSet<DnaString> setH;
+    StringSet<DnaString> setV;
+
+    for (unsigned i = 0; i < 100; ++i)
+    {
+        appendValue(setH, (i % 2 == 0) ? seqV : seqH);
+        appendValue(setV, (i % 5 == 0) ? seqH : seqV);
+    }
+
+    ExecutionPolicy<WavefrontAlignment<>, Serial> execPolicy;
+    setNumThreads(execPolicy, 4);
+    setParallelAlignments(execPolicy, 8);
+    setBlockSize(execPolicy, 56);
+
+    using TDPSettings = DPSettings<Score<int, Simple>, test_align_parallel::DPTestConfig>;
+    TDPSettings settings;
+    settings.scoringScheme = Score<int, Simple>{2, -2, -1, -11};
+
+    std::vector<int> alignScores(length(setH), std::numeric_limits<int>::min());
+
+    impl::alignExecBatch(execPolicy, setH, setV, settings, [&](auto const id, auto const score)
+    {
+        alignScores[id] = score;
+    });
+
+    for (unsigned i = 0; i < length(setH); ++i)
+    {
+        SEQAN_ASSERT_EQ(globalAlignmentScore(setH[i], setV[i], settings.scoringScheme, AlignConfig<false, false, false, false>()), alignScores[i]);
+    }
+}
+
+#ifdef SEQAN_SIMD_ENABLED
+SEQAN_DEFINE_TEST(test_align_parallel_wavefront_multiple_global_alignment_simd)
+{
+    using namespace seqan;
+
+    DnaString seqH = "GGTTTTGTTTGATGGAGAATTGCGCAGAGGGGTTATATCTGCGTGAGGATCTGTCACTCGGCGGTGTGGG"
+    "ATACCTCCCTGCTAAGGCGGGTTGAGTGATGTTCCCTCGGACTGGGGACCGCTGGCTTGCGAGCTATGTC"
+    "CGCTACTCTCAGTACTACACTCTCATTTGAGCCCCCGCTCAGTTTGCTAGCAGAACCCGGCACATGGTTC"
+    "GCCGATACTATGGATTTTCTAAAGAAACACTCTGTTAGGTGGTATGAGTCATGACGCACGCAGGGAGAGG"
+    "CTAAGGCTTATGCTATGCTGATCTCCGTGAATGTCTATCATTCCTCTGCAGGACCC";
+
+    DnaString seqV = "ACAGAGCGCGTACTGTCTGACGACGTATCCGCGCGGACTAGAAGGCTGGTGCCTCGTCCAACAAATAGAT"
+    "ACAGAAATCCACCGAAGTAAAGATCTCCAATTGTGGCACCACCAGGTGGCCACCACTCTTTGAAGTGAGG"
+    "AGACTTGCTTTACGTGTTTGTTCAGCCCGAGCTTTCGCTCGCACTGGAACACTGGTGTTTCGTCCTTTCG"
+    "GACTCATCAGTCAAGGTACGCACCTTGAGACACCGGGAAACAATCGATCAATCTTTCACAGAGCAACGAG"
+    "TTCGCTACTCTTGCAAAAGATCGACTTCCTATTTCGTGGATA";
+
+    StringSet<DnaString> setH;
+    StringSet<DnaString> setV;
+
+    for (unsigned i = 0; i < 100; ++i)
+    {
+        appendValue(setH, (i % 2 == 0) ? seqV : seqH);
+        appendValue(setV, (i % 5 == 0) ? seqH : seqV);
+    }
+
+    ExecutionPolicy<WavefrontAlignment<>, Vectorial> execPolicy;
+    setNumThreads(execPolicy, 2);
+    setParallelAlignments(execPolicy, 4);
+    setBlockSize(execPolicy, 56);
+
+    using TDPSettings = DPSettings<Score<int, Simple>, test_align_parallel::DPTestConfig>;
+    TDPSettings settings;
+    settings.scoringScheme = Score<int, Simple>{2, -2, -1, -11};
+
+    std::vector<int> alignScores(length(setH), std::numeric_limits<int>::min());
+    impl::alignExecBatch(execPolicy, setH, setV, settings, [&](auto const id, auto const score)
+                         {
+                             alignScores[id] = score;
+                         });
+
+    for (unsigned i = 0; i < length(setH); ++i)
+    {
+        SEQAN_ASSERT_EQ(globalAlignmentScore(setH[i], setV[i], settings.scoringScheme, AlignConfig<false, false, false, false>()), alignScores[i]);
+    }
+}
+#endif
diff --git a/tests/align_parallel/test_align_wavefront_alignment_scheduler.h b/tests/align_parallel/test_align_wavefront_alignment_scheduler.h
new file mode 100644
index 0000000..4896390
--- /dev/null
+++ b/tests/align_parallel/test_align_wavefront_alignment_scheduler.h
@@ -0,0 +1,266 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Rene Rahn <rene.rahn at fu-berlin.de>
+// ==========================================================================
+
+#include <seqan/align_parallel.h>
+
+SEQAN_DEFINE_TEST(test_align_parallel_wavefront_alignment_scheduler_construct)
+{
+    using namespace seqan;
+
+    // We need to be able to construct a thread pool.
+    SEQAN_ASSERT(std::is_default_constructible<WavefrontAlignmentScheduler>::value);
+    SEQAN_ASSERT(!std::is_copy_constructible<WavefrontAlignmentScheduler>::value);
+    SEQAN_ASSERT(!std::is_move_constructible<WavefrontAlignmentScheduler>::value);
+    SEQAN_ASSERT(!std::is_copy_assignable<WavefrontAlignmentScheduler>::value);
+    SEQAN_ASSERT(!std::is_move_assignable<WavefrontAlignmentScheduler>::value);
+
+    {  // Default construction and termination.
+        try
+        {
+            WavefrontAlignmentScheduler scheduler{};
+        }
+        catch(...)
+        {
+            SEQAN_ASSERT_FAIL("Failed to default construct scheduler!");
+        }
+    }
+
+    {  // Construction with some parameters and some values.
+
+        try
+        {
+            WavefrontAlignmentScheduler scheduler{4, 2};
+        }
+        catch(...)
+        {
+            SEQAN_ASSERT_FAIL("Failed to default construct scheduler!");
+        }
+    }
+}
+
+SEQAN_DEFINE_TEST(test_align_parallel_wavefront_alignment_scheduler_async)
+{
+    using namespace seqan;
+
+    using TTask = SchedulerTraits<WavefrontAlignmentScheduler>::TTask;
+
+    WavefrontAlignmentScheduler scheduler{8,2};
+
+    std::vector<uint16_t>  calledIds{0, 0, 0, 0, 0, 0, 0, 0};
+    bool isRecycled{false};
+    std::mutex mutexSetBool;
+
+    TTask t = [&](uint16_t const id)
+    {
+        // Now how can we spawn a test to the underlying scheduler.
+        auto & _taskScheduler = taskScheduler(scheduler);
+        using TInnerTask = typename SchedulerTraits<typename std::decay<decltype(_taskScheduler)>::type>::TTask;
+
+        bool eventState{false};
+        std::mutex mutexEvent;
+        std::condition_variable event;
+        TInnerTask task = [&] ()
+        {
+            if (calledIds[id] > 0)
+            {
+                std::lock_guard<std::mutex> lck(mutexSetBool);
+                isRecycled = true;
+            }
+
+            ++calledIds[id];
+
+            {
+                std::lock_guard<std::mutex> lck(mutexEvent);
+                eventState = true;
+                event.notify_one();
+            }
+        };
+        scheduleTask(_taskScheduler, task);
+        // need to wait for the internal task_scheduler.
+        {
+            std::unique_lock<std::mutex> lck(mutexEvent);
+            event.wait(lck, [&]{ return eventState; });
+        }
+    };
+
+    try
+    {
+        for (unsigned i = 0; i < 100; ++i)
+        {
+            scheduleTask(scheduler, t);
+        }
+
+        notify(scheduler);
+        seqan::wait(scheduler);
+    }
+    catch (...)
+    {
+        SEQAN_ASSERT_FAIL("Unexpected exception!");
+    }
+
+    auto val = std::accumulate(std::begin(calledIds), std::end(calledIds), 0);
+    SEQAN_ASSERT_EQ(val, 100);
+    SEQAN_ASSERT(isValid(scheduler));
+    SEQAN_ASSERT(isRecycled);
+}
+
+namespace test_align_parallel
+{
+
+struct test_error : public std::exception
+{
+    const char* msg;
+
+    explicit test_error( const char* what_arg ) : std::exception(), msg(what_arg)
+    {}
+
+    explicit test_error( const std::string& what_arg ) : test_error(what_arg.c_str())
+    {}
+
+    virtual const char* what() const noexcept
+    {
+        return msg;
+    }
+};
+
+struct RaiiEvent
+{
+    bool                    eventState{false};
+    std::mutex              mutexEvent{};
+    std::condition_variable event{};
+
+    inline void wait(unsigned const /*id*/)
+    {
+        {
+            std::unique_lock<std::mutex> lck(mutexEvent);
+            event.wait(lck, [&]{ return eventState; });
+        }
+    }
+
+    inline void notify(unsigned const /*id*/)
+    {
+        {
+            std::lock_guard<std::mutex> lck(mutexEvent);
+            eventState = true;
+            event.notify_one();
+        }
+    }
+};
+}
+
+SEQAN_DEFINE_TEST(test_align_parallel_wavefront_alignment_scheduler_async_with_exception)
+{
+    using namespace seqan;
+
+    using TTask = SchedulerTraits<WavefrontAlignmentScheduler>::TTask;
+
+    WavefrontAlignmentScheduler scheduler{8,2};
+
+    std::vector<uint16_t>  calledIds{0, 0, 0, 0, 0, 0, 0, 0};
+    bool isRecycled{false};
+    std::mutex mutexSetBool;
+
+    TTask t = [&] (uint16_t const id)
+    {
+        // Now how can we spawn a test to the underlying scheduler.
+        auto& _taskScheduler = taskScheduler(scheduler);
+        using TInnerTask = typename SchedulerTraits<typename std::decay<decltype(_taskScheduler)>::type>::TTask;
+
+        test_align_parallel::RaiiEvent event;
+        TInnerTask task = [&]()
+        {
+            {
+                std::lock_guard<std::mutex> lck(mutexSetBool);
+                isRecycled = true;
+                if (std::accumulate(std::begin(calledIds), std::end(calledIds), 0) == 50)
+                {
+                    event.notify(id);
+                    throw test_align_parallel::test_error("Test");
+                }
+            }
+            ++calledIds[id];
+            event.notify(id);
+        };
+
+        scheduleTask(_taskScheduler, task);
+        // need to wait for the internal task_scheduler.
+        event.wait(id);
+    };
+
+    try
+    {
+        for (unsigned i = 0; i < 100; ++i)
+        {
+            scheduleTask(scheduler, t);
+        }
+
+        notify(scheduler);
+        seqan::wait(scheduler);
+    }
+    catch (std::runtime_error & e)
+    {
+        std::string msg = e.what();
+        SEQAN_ASSERT_EQ(msg, "Invalid alignment scheduler!");
+    }
+
+    auto exceptVec = getExceptions(scheduler);
+    for (unsigned i = 0; i < exceptVec.size(); ++i)
+    {
+        try
+        {
+            if (exceptVec[i] != nullptr)
+                std::rethrow_exception(exceptVec[i]);
+        }
+        catch (std::runtime_error const & e)
+        {
+            std::string msg = e.what();
+            SEQAN_ASSERT_EQ(msg, "Invalid Task Scheduler");
+        }
+        catch (test_align_parallel::test_error const & e)
+        {
+            std::string msg = e.what();
+            SEQAN_ASSERT_EQ(msg, "Test");
+        }
+        catch (...)
+        {
+            SEQAN_ASSERT_FAIL("Caught unknown exception!");
+        }
+    }
+
+    notify(scheduler);
+    seqan::wait(scheduler);
+    auto val = std::accumulate(std::begin(calledIds), std::end(calledIds), 0);
+    SEQAN_ASSERT_EQ(val, 50);
+    SEQAN_ASSERT_NOT(isValid(scheduler));
+}
diff --git a/tests/basic/test_basic_alphabet_storage.h b/tests/align_parallel/test_align_wavefront_alignment_thread_local.h
similarity index 53%
copy from tests/basic/test_basic_alphabet_storage.h
copy to tests/align_parallel/test_align_wavefront_alignment_thread_local.h
index 4a70bb1..d2a16f1 100644
--- a/tests/basic/test_basic_alphabet_storage.h
+++ b/tests/align_parallel/test_align_wavefront_alignment_thread_local.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -29,70 +29,67 @@
 // DAMAGE.
 //
 // ==========================================================================
-// Author: Manuel Holtgrewe <manuel.holtgrewe at fu-berlin.de>
+// Author: Rene Rahn <rene.rahn at fu-berlin.de>
 // ==========================================================================
-// Tests for alphabet storage related code.
-//
-// Test default implementations and existance of functions only, the
-// individual implementations are tested when checking for concept
-// fulfillment.
-// ==========================================================================
-
-#ifndef SEQAN_TESTS_BASIC_TEST_BASIC_ALPHABET_STORAGE_H_
-#define SEQAN_TESTS_BASIC_TEST_BASIC_ALPHABET_STORAGE_H_
-
-struct LongStruct_
-{
-    int64_t a, b;
-};
 
-namespace seqan {
+#include <seqan/align_parallel.h>
 
-template <>
-struct ValueSize<LongStruct_>
+namespace test_align_parallel
 {
-    typedef unsigned Type;
-    static const unsigned VALUE = 42;
-};
-
-}
-
-SEQAN_DEFINE_TEST(test_basic_alphabet_storage_bits_per_value_metafunction)
+struct TestConfig
 {
-    using namespace seqan;
-
-    typedef BitsPerValue<int> TBitsPerValue SEQAN_UNUSED_TYPEDEF;  // Check existance.
+    using TCache        = std::vector<int>;
+    using TIntermediate = double;
 
-    SEQAN_ASSERT_EQ(+BitsPerValue<LongStruct_>::VALUE, 128u);
-}
+    using TLocalHost    = std::tuple<TIntermediate, TCache>;
+};
+}  // namespace test_align_parallel
 
-SEQAN_DEFINE_TEST(test_basic_alphabet_storage_value_size_metafunction)
+SEQAN_DEFINE_TEST(test_align_parallel_wavefront_alignment_thread_local_storage_construt)
 {
     using namespace seqan;
 
-    typedef ValueSize<int> TValueSize SEQAN_UNUSED_TYPEDEF;  // Check existance.
-
-    SEQAN_ASSERT_EQ(+ValueSize<LongStruct_>::VALUE, 42u);
+    using TLocalStorage = WavefrontAlignmentThreadLocalStorage<test_align_parallel::TestConfig>;
+    SEQAN_ASSERT(std::is_default_constructible<TLocalStorage>::value);
+    SEQAN_ASSERT(std::is_copy_constructible<TLocalStorage>::value);
+    SEQAN_ASSERT(std::is_move_constructible<TLocalStorage>::value);
+    SEQAN_ASSERT(std::is_copy_assignable<TLocalStorage>::value);
+    SEQAN_ASSERT(std::is_move_assignable<TLocalStorage>::value);
+
+    {
+        TLocalStorage store;
+        SEQAN_ASSERT_EQ(store._multiAlignmentThreadLocal.size(), 1u);
+    }
+
+    {
+        TLocalStorage store{3};
+        SEQAN_ASSERT_EQ(store._multiAlignmentThreadLocal.size(), 3u);
+    }
 }
 
-SEQAN_DEFINE_TEST(test_basic_alphabet_storage_value_size_function)
+SEQAN_DEFINE_TEST(test_align_parallel_wavefront_alignment_thread_local_storage_intermediate)
 {
     using namespace seqan;
 
-    SEQAN_ASSERT_EQ(valueSize<LongStruct_>(), 42u);
+    using TLocalStorage = WavefrontAlignmentThreadLocalStorage<test_align_parallel::TestConfig>;
+    {
+        TLocalStorage store{3};
+        auto & interim = intermediate(store, 1);
+        interim = 2.3;
+        SEQAN_ASSERT_EQ(intermediate(store, 1), 2.3);
+    }
 }
 
-SEQAN_DEFINE_TEST(test_basic_alphabet_storage_integral_for_value_metafunction)
-{
-}
-
-SEQAN_DEFINE_TEST(test_basic_alphabet_storage_bytes_per_value_metafunction)
+SEQAN_DEFINE_TEST(test_align_parallel_wavefront_alignment_thread_local_storage_cache)
 {
     using namespace seqan;
 
-    typedef BytesPerValue<int> TBitsPerValue SEQAN_UNUSED_TYPEDEF;  // Check existance.
-
-    SEQAN_ASSERT_EQ(+BytesPerValue<LongStruct_>::VALUE, 16);
+    using TLocalStorage = WavefrontAlignmentThreadLocalStorage<test_align_parallel::TestConfig>;
+    {
+        TLocalStorage store{3};
+        auto & local = cache(store, 1);
+        local.resize(5, 10);
+        SEQAN_ASSERT_EQ(cache(store, 1).size(), 5u);
+        SEQAN_ASSERT_EQ(cache(store, 1)[0], 10);
+    }
 }
-
-#endif  // #ifndef SEQAN_TESTS_BASIC_TEST_BASIC_ALPHABET_STORAGE_H_
diff --git a/tests/align_parallel/test_align_wavefront_intermediate_dp_result.h b/tests/align_parallel/test_align_wavefront_intermediate_dp_result.h
new file mode 100644
index 0000000..10708e0
--- /dev/null
+++ b/tests/align_parallel/test_align_wavefront_intermediate_dp_result.h
@@ -0,0 +1,121 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Rene Rahn <rene.rahn at fu-berlin.de>
+// ==========================================================================
+
+#include <seqan/align_parallel.h>
+
+namespace test_align_parallel
+{
+struct IntermediateTraits_
+{
+    using TScoreValue   = int;
+    using THostPosition = size_t;
+};
+
+}  // namespace test_align_parallel
+
+SEQAN_DEFINE_TEST(test_align_parallel_intermediate_dp_result_construct)
+{
+    using namespace seqan;
+
+    using TIntermediate = WavefrontAlignmentResult<test_align_parallel::IntermediateTraits_>;
+
+    SEQAN_ASSERT(std::is_default_constructible<TIntermediate>::value);
+    SEQAN_ASSERT(std::is_copy_constructible<TIntermediate>::value);
+    SEQAN_ASSERT(std::is_move_constructible<TIntermediate>::value);
+    SEQAN_ASSERT(std::is_copy_assignable<TIntermediate>::value);
+    SEQAN_ASSERT(std::is_move_assignable<TIntermediate>::value);
+
+    {
+        TIntermediate interim;
+        SEQAN_ASSERT_EQ(interim._maxState.first, std::numeric_limits<int>::min());
+        SEQAN_ASSERT_EQ(interim._maxState.second, 0u);
+        SEQAN_ASSERT_EQ(interim._tileCol, 0u);
+        SEQAN_ASSERT_EQ(interim._tileRow, 0u);
+    }
+
+    {
+        TIntermediate interim{{10, 3u}};
+        SEQAN_ASSERT_EQ(interim._maxState.first, 10);
+        SEQAN_ASSERT_EQ(interim._maxState.second, 3u);
+        SEQAN_ASSERT_EQ(interim._tileCol, 0u);
+        SEQAN_ASSERT_EQ(interim._tileRow, 0u);
+    }
+
+    {
+        TIntermediate interim{{10, 3u}, 2u, 4u};
+        SEQAN_ASSERT_EQ(interim._maxState.first, 10);
+        SEQAN_ASSERT_EQ(interim._maxState.second, 3u);
+        SEQAN_ASSERT_EQ(interim._tileCol, 2u);
+        SEQAN_ASSERT_EQ(interim._tileRow, 4u);
+    }
+}
+
+SEQAN_DEFINE_TEST(test_align_parallel_intermediate_dp_result_update_max)
+{
+    using namespace seqan;
+
+    using TIntermediate = WavefrontAlignmentResult<test_align_parallel::IntermediateTraits_>;
+    using TState = typename TIntermediate::TState;
+
+    TIntermediate interim{{10, 3u}, 2, 4};
+    updateMax(interim, TState{9, 7u}, 3, 5);
+    SEQAN_ASSERT_EQ(interim._maxState.first, 10);
+    SEQAN_ASSERT_EQ(interim._maxState.second, 3u);
+    SEQAN_ASSERT_EQ(interim._tileCol, 2u);
+    SEQAN_ASSERT_EQ(interim._tileRow, 4u);
+
+    updateMax(interim, TState{11, 7u}, 3, 5);
+    SEQAN_ASSERT_EQ(interim._maxState.first, 11);
+    SEQAN_ASSERT_EQ(interim._maxState.second, 7u);
+    SEQAN_ASSERT_EQ(interim._tileCol, 3u);
+    SEQAN_ASSERT_EQ(interim._tileRow, 5u);
+
+}
+
+SEQAN_DEFINE_TEST(test_align_parallel_intermediate_dp_result_clear)
+{
+    using namespace seqan;
+
+    using TIntermediate = WavefrontAlignmentResult<test_align_parallel::IntermediateTraits_>;
+
+    {
+        TIntermediate interim{{10, 3u}, 2, 4};
+        clear(interim);
+
+        SEQAN_ASSERT_EQ(interim._maxState.first, std::numeric_limits<int>::min());
+        SEQAN_ASSERT_EQ(interim._maxState.second, 0u);
+        SEQAN_ASSERT_EQ(interim._tileCol, 0u);
+        SEQAN_ASSERT_EQ(interim._tileRow, 0u);
+    }
+}
diff --git a/demos/howto/using_zip_iterator.cpp b/tests/align_parallel/test_align_wavefront_task_scheduler.h
similarity index 54%
copy from demos/howto/using_zip_iterator.cpp
copy to tests/align_parallel/test_align_wavefront_task_scheduler.h
index 00be410..6c06bb9 100644
--- a/demos/howto/using_zip_iterator.cpp
+++ b/tests/align_parallel/test_align_wavefront_task_scheduler.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -32,41 +32,68 @@
 // Author: Rene Rahn <rene.rahn at fu-berlin.de>
 // ==========================================================================
 
-#include <vector>
-#include <array>
+#include <seqan/align_parallel.h>
 
-#include <seqan/sequence.h>
-#include <seqan/stream.h>
-
-using namespace seqan;
-
-int main()
+SEQAN_DEFINE_TEST(test_align_parallel_wavefront_task_scheduler_construct)
 {
-    std::vector<int> vec = {10, 12, 14};
-    DnaString str = "AGT";
-    std::array<double, 3> arr = { {3.14, 2.71, 1.41} };
+    using namespace seqan;
 
-    auto zipCont = makeZipView(vec, str, infix(str, 0, 3), arr, reverseString(str));
+    // We need to be able to construct a thread pool.
+    SEQAN_ASSERT(!std::is_default_constructible<WavefrontTaskScheduler>::value);
+    SEQAN_ASSERT(!std::is_copy_constructible<WavefrontTaskScheduler>::value);
+    SEQAN_ASSERT(!std::is_move_constructible<WavefrontTaskScheduler>::value);
+    SEQAN_ASSERT(!std::is_copy_assignable<WavefrontTaskScheduler>::value);
+    SEQAN_ASSERT(!std::is_move_assignable<WavefrontTaskScheduler>::value);
 
-    // Range based for-loop.
-    std::cout << "Using range based for-loop!" << std::endl;
-    for (auto elem : zipCont)
+    try
     {
-        std::cout << (std::get<0>(elem) += 3) << ",  " << std::get<1>(elem) << ", " << std::get<2>(elem) << ", " << std::get<3>(elem) << ", " << std::get<4>(elem) << std::endl;
+        WavefrontTaskScheduler scheduler(4);
+        waitForWriters(scheduler);
     }
-
-    // Using iterator.
-    std::cout << "\nUsing iterator!" << std::endl;
-    for (auto it = begin(zipCont, Standard()); it != end(zipCont, Standard()); ++it)
+    catch(...)
     {
-        std::cout << (std::get<0>(*it) + 3) << ",  " << std::get<1>(*it) << ", " << std::get<2>(*it) << ", " << std::get<3>(*it) << ", " << std::get<4>(*it) << std::endl;
+        SEQAN_ASSERT_FAIL("Error during construction of scheduler!");
     }
+}
 
-    // Using value function and position.
-    std::cout << "\nUsing value and position!" << std::endl;
-    for (unsigned it = 0; it < length(zipCont); ++it)
+SEQAN_DEFINE_TEST(test_align_parallel_wavefront_task_scheduler_async)
+{
+    using namespace seqan;
+
+    using TTask = SchedulerTraits<WavefrontTaskScheduler>::TTask;
+
+    WavefrontTaskScheduler scheduler{2, 1};
+
+    bool t1Executed{false};
+    TTask t1 = [&]()
     {
-        std::cout << (std::get<0>(value(zipCont,it)) -= 3) << ",  " << std::get<1>(value(zipCont,it)) << ", " << std::get<2>(value(zipCont,it)) << ", " << std::get<3>(value(zipCont,it)) << ", " << std::get<4>(value(zipCont, it)) << std::endl;
-    }
-    return 0;
+        t1Executed = true;
+    };
+    bool t2Executed{false};
+    TTask t2 = [&]()
+    {
+        t2Executed = true;
+    };
+
+    // Register writer.
+    lockWriting(scheduler);
+
+    // Schedule jobs for async execution.
+    scheduleTask(scheduler, t1);
+    scheduleTask(scheduler, t2);
+
+    SEQAN_ASSERT_NOT(t1Executed);
+    SEQAN_ASSERT_NOT(t2Executed);
+
+    // Trigger execution.
+    waitForWriters(scheduler);
+
+    // Unregister writer.
+    unlockWriting(scheduler);
+
+    // Wait until schduler is done with all jobs.
+    seqan::wait(scheduler);
+
+    SEQAN_ASSERT(t1Executed);
+    SEQAN_ASSERT(t2Executed);
 }
diff --git a/tests/align_profile/test_align_profile.cpp b/tests/align_profile/test_align_profile.cpp
index c269aa4..12e9b3a 100644
--- a/tests/align_profile/test_align_profile.cpp
+++ b/tests/align_profile/test_align_profile.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/align_split/test_align_split.cpp b/tests/align_split/test_align_split.cpp
index 051054c..eeadb36 100644
--- a/tests/align_split/test_align_split.cpp
+++ b/tests/align_split/test_align_split.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/align_split/test_align_split.h b/tests/align_split/test_align_split.h
index cd44aca..2ecfc27 100644
--- a/tests/align_split/test_align_split.h
+++ b/tests/align_split/test_align_split.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/alignment_free/test_alignment_free.cpp b/tests/alignment_free/test_alignment_free.cpp
index 5cf5bd9..356b66a 100644
--- a/tests/alignment_free/test_alignment_free.cpp
+++ b/tests/alignment_free/test_alignment_free.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/arg_parse/test_arg_parse.cpp b/tests/arg_parse/test_arg_parse.cpp
index aec4bcb..8fe4c72 100644
--- a/tests/arg_parse/test_arg_parse.cpp
+++ b/tests/arg_parse/test_arg_parse.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                                 arg_parse
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -144,6 +144,7 @@ SEQAN_BEGIN_TESTSUITE(test_arg_parse)
     SEQAN_CALL_TEST(test_argument_invalid_cast);
     SEQAN_CALL_TEST(test_argument_min_max_boundaries);
     SEQAN_CALL_TEST(test_argument_valid_values);
+    SEQAN_CALL_TEST(test_argument_valid_values_directories);
 
     SEQAN_CALL_TEST(test_argument_parser);
     SEQAN_CALL_TEST(test_parse_non_const_cstring);
diff --git a/tests/arg_parse/test_arg_parse.h b/tests/arg_parse/test_arg_parse.h
index d6cd8a4..1975898 100644
--- a/tests/arg_parse/test_arg_parse.h
+++ b/tests/arg_parse/test_arg_parse.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                                 arg_parse
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/arg_parse/test_arg_parse_argument.h b/tests/arg_parse/test_arg_parse_argument.h
index 675e403..ee0c4da 100644
--- a/tests/arg_parse/test_arg_parse_argument.h
+++ b/tests/arg_parse/test_arg_parse_argument.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -223,4 +223,32 @@ SEQAN_DEFINE_TEST(test_argument_valid_values)
                          "the given path 'not-a-validfile.qxt' does not have one of the valid file extensions [*.txt, *.fasta]; the file extension was overridden to be '.fa'");
 }
 
+SEQAN_DEFINE_TEST(test_argument_valid_values_directories)
+{
+    ArgParseArgument dirarg(ArgParseArgument::INPUT_DIRECTORY);
+    setValidValues(dirarg, ".dir1 .dir2");
+
+    _assignArgumentValue(dirarg, "directory.dir1");
+    SEQAN_ASSERT_EQ(value(dirarg.value, 0), "directory.dir1");
+
+    // Test getFileExtension() function.
+    SEQAN_ASSERT_EQ(getFileExtension(dirarg), ".dir1");
+
+    // different case should also work
+    _assignArgumentValue(dirarg, "directory.DIR1");
+    SEQAN_ASSERT_EQ(value(dirarg.value, 0), "directory.DIR1");
+
+    // also accept a trailing '/'
+    _assignArgumentValue(dirarg, "directory.dir2/");
+    SEQAN_ASSERT_EQ(value(dirarg.value, 0), "directory.dir2/");
+
+    // Test getFileExtension() function.
+    SEQAN_ASSERT_EQ(getFileExtension(dirarg), ".dir2");
+
+    // different case should also work
+    _assignArgumentValue(dirarg, "directory.DIR2/");
+    SEQAN_ASSERT_EQ(value(dirarg.value, 0), "directory.DIR2/");
+
+}
+
 #endif // SEQAN_TESTS_ARG_PARSE_TEST_ARG_PARSE_ARGUMENT_H_
diff --git a/tests/arg_parse/test_arg_parse_ctd_support.h b/tests/arg_parse/test_arg_parse_ctd_support.h
index cd59ad1..a304a55 100644
--- a/tests/arg_parse/test_arg_parse_ctd_support.h
+++ b/tests/arg_parse/test_arg_parse_ctd_support.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -96,8 +96,7 @@ SEQAN_DEFINE_TEST(test_arg_parse_ctd_support)
     ofstream.close();
 
     // compare ctd to expected
-    seqan::CharString goldPath = SEQAN_PATH_TO_ROOT();
-    append(goldPath, "/tests/arg_parse/test_app.ctd");
+    seqan::CharString goldPath = getAbsolutePath("/tests/arg_parse/test_app.ctd");
 
     SEQAN_ASSERT(seqan::_compareTextFilesAlt(toCString(outPath), toCString(goldPath)));
 }
diff --git a/tests/arg_parse/test_arg_parse_option.h b/tests/arg_parse/test_arg_parse_option.h
index 2de02d7..eb22823 100644
--- a/tests/arg_parse/test_arg_parse_option.h
+++ b/tests/arg_parse/test_arg_parse_option.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/arg_parse/test_arg_parse_version_check.cpp b/tests/arg_parse/test_arg_parse_version_check.cpp
index 8708970..e66946e 100644
--- a/tests/arg_parse/test_arg_parse_version_check.cpp
+++ b/tests/arg_parse/test_arg_parse_version_check.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/arg_parse/test_arg_parse_version_check.h b/tests/arg_parse/test_arg_parse_version_check.h
index e6dd938..f1a834a 100644
--- a/tests/arg_parse/test_arg_parse_version_check.h
+++ b/tests/arg_parse/test_arg_parse_version_check.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/arg_parse/test_argument_parser.h b/tests/arg_parse/test_argument_parser.h
index a9066d6..6e08c24 100644
--- a/tests/arg_parse/test_argument_parser.h
+++ b/tests/arg_parse/test_argument_parser.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/arg_parse/test_extensions.h b/tests/arg_parse/test_extensions.h
index 6998c62..3f6135e 100644
--- a/tests/arg_parse/test_extensions.h
+++ b/tests/arg_parse/test_extensions.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/bam_io/test_bam_alignment_record.h b/tests/bam_io/test_bam_alignment_record.h
index b274c02..0709aab 100644
--- a/tests/bam_io/test_bam_alignment_record.h
+++ b/tests/bam_io/test_bam_alignment_record.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/bam_io/test_bam_file.h b/tests/bam_io/test_bam_file.h
index 54d41bd..4745ac2 100644
--- a/tests/bam_io/test_bam_file.h
+++ b/tests/bam_io/test_bam_file.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -49,8 +49,7 @@
 
 void testBamIOBamFileReadHeader(char const * pathFragment)
 {
-    seqan::CharString filePath = SEQAN_PATH_TO_ROOT();
-    append(filePath, pathFragment);
+    seqan::CharString filePath = seqan::getAbsolutePath(pathFragment);
 
     seqan::BamFileIn bamIO(toCString(filePath));
     seqan::BamHeader header;
@@ -85,8 +84,7 @@ SEQAN_DEFINE_TEST(test_bam_io_bam_file_bam_read_header)
 // Issue 489 reports a problems with reading/writing comment lines in SAM header.
 SEQAN_DEFINE_TEST(test_bam_io_sam_file_issue_489)
 {
-    seqan::CharString inFilePath = SEQAN_PATH_TO_ROOT();
-    append(inFilePath, "/tests/bam_io/sam_with_comments.sam");
+    seqan::CharString inFilePath = seqan::getAbsolutePath("/tests/bam_io/sam_with_comments.sam");
 
     seqan::CharString tmpPath = SEQAN_TEMP_FILENAME();
     append(tmpPath, ".sam");
@@ -119,8 +117,7 @@ SEQAN_DEFINE_TEST(test_bam_io_sam_file_issue_489)
 
 void testBamIOBamFileReadRecords(char const * pathFragment)
 {
-    seqan::CharString filePath = SEQAN_PATH_TO_ROOT();
-    append(filePath, pathFragment);
+    seqan::CharString filePath = seqan::getAbsolutePath(pathFragment);
 
     seqan::BamFileIn bamIO(toCString(filePath));
     seqan::BamHeader header;
@@ -210,8 +207,7 @@ SEQAN_DEFINE_TEST(test_bam_io_bam_file_bam_read_records)
 
 SEQAN_DEFINE_TEST(test_bam_io_bam_file_bam_read_ex1)
 {
-    seqan::CharString filePath = SEQAN_PATH_TO_ROOT();
-    append(filePath, "/tests/bam_io/ex1.bam");
+    seqan::CharString filePath = seqan::getAbsolutePath("/tests/bam_io/ex1.bam");
 
     seqan::BamFileIn bamIO(toCString(filePath));
     seqan::BamHeader header;
@@ -243,8 +239,7 @@ SEQAN_DEFINE_TEST(test_bam_io_bam_file_bam_read_ex1)
 
 void testBamIOBamFileWriteHeader(char const * pathFragmentExpected)
 {
-    seqan::CharString filePath = SEQAN_PATH_TO_ROOT();
-    append(filePath, pathFragmentExpected);
+    seqan::CharString filePath = seqan::getAbsolutePath(pathFragmentExpected);
 
     seqan::CharString tmpPath = SEQAN_TEMP_FILENAME();
     if (seqan::endsWith(pathFragmentExpected, ".bam"))
@@ -298,8 +293,7 @@ SEQAN_DEFINE_TEST(test_bam_io_bam_file_bam_write_header)
 
 void testBamIOBamFileWriteRecords(char const * pathFragmentExpected)
 {
-    seqan::CharString filePath = SEQAN_PATH_TO_ROOT();
-    append(filePath, pathFragmentExpected);
+    seqan::CharString filePath = seqan::getAbsolutePath(pathFragmentExpected);
 
     seqan::CharString tmpPath = SEQAN_TEMP_FILENAME();
     if (seqan::endsWith(pathFragmentExpected, ".bam"))
@@ -413,8 +407,7 @@ SEQAN_DEFINE_TEST(test_bam_io_bam_file_bam_write_records)
 
 SEQAN_DEFINE_TEST(test_bam_io_bam_file_sam_file_size)
 {
-    seqan::CharString filePath = SEQAN_PATH_TO_ROOT();
-    append(filePath, "/tests/bam_io/small.sam");
+    seqan::CharString filePath = seqan::getAbsolutePath("/tests/bam_io/small.sam");
 
     seqan::BamFileIn bamFile(toCString(filePath));
 
@@ -442,8 +435,7 @@ SEQAN_DEFINE_TEST(test_bam_io_bam_file_sam_file_size)
 
 SEQAN_DEFINE_TEST(test_bam_io_bam_file_bam_file_size)
 {
-    seqan::CharString filePath = SEQAN_PATH_TO_ROOT();
-    append(filePath, "/tests/bam_io/small.bam");
+    seqan::CharString filePath = seqan::getAbsolutePath("/tests/bam_io/small.bam");
 
     seqan::BamFileIn bamFile(toCString(filePath));
 
@@ -473,7 +465,7 @@ SEQAN_DEFINE_TEST(test_bam_io_bam_file_bam_file_seek)
 {
     typedef seqan::Position<seqan::BamFileIn>::Type TPosition;
 
-    std::string filePath = (std::string)SEQAN_PATH_TO_ROOT() + "/apps/ngs_roi/example/example.bam";
+    std::string filePath = seqan::getAbsolutePath("/apps/ngs_roi/example/example.bam");
 
     seqan::BamFileIn bamFile(filePath.c_str());
 
diff --git a/tests/bam_io/test_bam_header_record.h b/tests/bam_io/test_bam_header_record.h
index 12c57d6..0825b4f 100644
--- a/tests/bam_io/test_bam_header_record.h
+++ b/tests/bam_io/test_bam_header_record.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/bam_io/test_bam_index.h b/tests/bam_io/test_bam_index.h
index a1192df..4cb2ee0 100644
--- a/tests/bam_io/test_bam_index.h
+++ b/tests/bam_io/test_bam_index.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -44,11 +44,9 @@ using namespace seqan;
 
 SEQAN_DEFINE_TEST(test_bam_io_bam_index_build)
 {
-    CharString expectedBaiFilename = SEQAN_PATH_TO_ROOT();
-    append(expectedBaiFilename, "/tests/bam_io/small.bam.bai");
+    CharString expectedBaiFilename = getAbsolutePath("/tests/bam_io/small.bam.bai");
 
-    CharString bamFilename = SEQAN_PATH_TO_ROOT();
-    append(bamFilename, "/tests/bam_io/small.bam");
+    CharString bamFilename = getAbsolutePath("/tests/bam_io/small.bam");
 
     CharString tmpOutPath = SEQAN_TEMP_FILENAME();
     append(tmpOutPath, ".bai");
@@ -63,8 +61,7 @@ SEQAN_DEFINE_TEST(test_bam_io_bam_index_build)
 
 SEQAN_DEFINE_TEST(test_bam_io_bam_index_open)
 {
-    CharString baiFilename = SEQAN_PATH_TO_ROOT();
-    append(baiFilename, "/tests/bam_io/small.bam.bai");
+    CharString baiFilename = getAbsolutePath("/tests/bam_io/small.bam.bai");
 
     BamIndex<Bai> baiIndex;
     SEQAN_ASSERT(open(baiIndex, toCString(baiFilename)));
@@ -80,8 +77,7 @@ SEQAN_DEFINE_TEST(test_bam_io_bam_index_open)
     SEQAN_ASSERT_EQ(getUnalignedCount(baiIndex), 0u);
 
     // File has same contents as in the SAM test.
-    CharString bamFilename = SEQAN_PATH_TO_ROOT();
-    append(bamFilename, "/tests/bam_io/small.bam");
+    CharString bamFilename = getAbsolutePath("/tests/bam_io/small.bam");
 
     BamFileIn bamFile(toCString(bamFilename));
 
@@ -95,12 +91,13 @@ SEQAN_DEFINE_TEST(test_bam_io_bam_index_open)
     SEQAN_ASSERT(found);
     SEQAN_ASSERT_NOT(jumpToRegion(bamFile, found, 1, 1, 10, baiIndex));
     SEQAN_ASSERT_NOT(found);
+    SEQAN_ASSERT(jumpToRegion(bamFile, found, 0, 20, 100, baiIndex));
+    SEQAN_ASSERT_NOT(found);
 }
 
 SEQAN_DEFINE_TEST(test_bam_io_bam_index_save)
 {
-    CharString baiFilename = SEQAN_PATH_TO_ROOT();
-    append(baiFilename, "/tests/bam_io/small.bam.bai");
+    CharString baiFilename = getAbsolutePath("/tests/bam_io/small.bam.bai");
     
     CharString tmpOutPath = SEQAN_TEMP_FILENAME();
     append(tmpOutPath, ".bai");
diff --git a/tests/bam_io/test_bam_io.cpp b/tests/bam_io/test_bam_io.cpp
index 7d97118..e1b5c15 100644
--- a/tests/bam_io/test_bam_io.cpp
+++ b/tests/bam_io/test_bam_io.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -37,6 +37,7 @@
 #include <seqan/stream.h>
 
 #include "test_bam_alignment_record.h"
+#include "test_bam_file.h"
 #include "test_bam_header_record.h"
 #include "test_bam_io_context.h"
 #include "test_bam_sam_conversion.h"
@@ -48,7 +49,6 @@
 
 #if SEQAN_HAS_ZLIB
 #include "test_bam_index.h"
-#include "test_bam_file.h"
 #endif
 
 SEQAN_BEGIN_TESTSUITE(test_bam_io)
diff --git a/tests/bam_io/test_bam_io_context.h b/tests/bam_io/test_bam_io_context.h
index 862203a..b9d2c05 100644
--- a/tests/bam_io/test_bam_io_context.h
+++ b/tests/bam_io/test_bam_io_context.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/bam_io/test_bam_sam_conversion.h b/tests/bam_io/test_bam_sam_conversion.h
index 16f0aaa..2c329bc 100644
--- a/tests/bam_io/test_bam_sam_conversion.h
+++ b/tests/bam_io/test_bam_sam_conversion.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -124,6 +124,9 @@ SEQAN_DEFINE_TEST(test_assign_tags_bam_to_sam_type_I)
 
 SEQAN_DEFINE_TEST(test_assign_tags_bam_to_sam_type_f)
 {
+#if defined (__arm__) && defined(__ARM_PCS_VFP) // NOTE(h-2): armhf CRASHES here for unknown reasons
+    return;
+#endif
     using namespace seqan;
 
     CharString bamTags;
@@ -132,7 +135,9 @@ SEQAN_DEFINE_TEST(test_assign_tags_bam_to_sam_type_f)
     arrayCopy(DATA, DATA + 7, &bamTags[0]);
     CharString samTags;
     assignTagsBamToSam(samTags, bamTags);
+#if defined(__x86_64__) || defined(_M_X64) || defined(__i386) || defined(_M_IX86) // rounding errors on non-x86
     SEQAN_ASSERT_EQ(CharString("XX:f:0.5"), CharString(samTags));
+#endif
 }
 
 SEQAN_DEFINE_TEST(test_assign_tags_bam_to_sam_type_Z)
@@ -249,7 +254,9 @@ SEQAN_DEFINE_TEST(test_assign_tags_bam_to_sam_type_Bf)
     arrayCopy(DATA, DATA + 16, &bamTags[0]);
     CharString samTags;
     assignTagsBamToSam(samTags, bamTags);
+#if defined(__x86_64__) || defined(_M_X64) || defined(__i386) || defined(_M_IX86) // rounding errors on non-x86
     SEQAN_ASSERT_EQ(CharString("XX:B:f,0.5,0.5"), CharString(samTags));
+#endif
 }
 
 SEQAN_DEFINE_TEST(test_assign_tags_sam_to_bam_two_tags)
@@ -293,7 +300,9 @@ SEQAN_DEFINE_TEST(test_assign_tags_sam_to_bam_type_f)
     resize(expected, 7);
     char const * DATA = "XXf\x00\x00\x00\x3f";
     arrayCopy(DATA, DATA + 7, begin(expected, Standard()));
+#if defined(__x86_64__) || defined(_M_X64) || defined(__i386) || defined(_M_IX86) // rounding errors on non-x86
     SEQAN_ASSERT_EQ(expected, CharString(bamTags));
+#endif
 }
 
 SEQAN_DEFINE_TEST(test_assign_tags_sam_to_bam_type_Z)
@@ -419,7 +428,9 @@ SEQAN_DEFINE_TEST(test_assign_tags_sam_to_bam_type_Bf)
     resize(expected, 16);
     char const * DATA = "XXBf\2\0\0\0\x00\x00\x00\x3f\x00\x00\x00\x3f";
     arrayCopy(DATA, DATA + 16, begin(expected, Standard()));
+#if defined(__x86_64__) || defined(_M_X64) || defined(__i386) || defined(_M_IX86) // rounding errors on non-x86
     SEQAN_ASSERT_EQ(expected, CharString(bamTags));
+#endif
 }
 
 #endif  // TESTS_BAM_IO_TEST_BAM_SAM_CONVERSION_H_
diff --git a/tests/bam_io/test_bam_tags_dict.h b/tests/bam_io/test_bam_tags_dict.h
index e0ad9fd..140e5e8 100644
--- a/tests/bam_io/test_bam_tags_dict.h
+++ b/tests/bam_io/test_bam_tags_dict.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/bam_io/test_read_bam.h b/tests/bam_io/test_read_bam.h
index 871c8f9..d700ca7 100644
--- a/tests/bam_io/test_read_bam.h
+++ b/tests/bam_io/test_read_bam.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -50,9 +50,8 @@ SEQAN_DEFINE_TEST(test_bam_io_bam_read_header)
 
     // File has same contents as in the SAM test.
     CharString bamFilename;
-    append(bamFilename, SEQAN_PATH_TO_ROOT());
-    //append(bamFilename, "/tests/bam_io/small.bam");
-    append(bamFilename, "/tests/bam_io/test_small.bam");
+    append(bamFilename, getAbsolutePath("/tests/bam_io/test_small.bam"));
+    //append(bamFilename, getAbsolutPath("/tests/bam_io/small.bam"));
 
     String<char, MMap<> > in;
     open(in, toCString(bamFilename));
@@ -105,9 +104,8 @@ SEQAN_DEFINE_TEST(test_bam_io_bam_read_alignment)
     // -----------------------------------------------------------------------
 
     CharString bamFilename;
-    append(bamFilename, SEQAN_PATH_TO_ROOT());
-    //append(bamFilename, "/tests/bam_io/small.bam");
-    append(bamFilename, "/tests/bam_io/test_small.bam");
+    append(bamFilename, getAbsolutePath("/tests/bam_io/test_small.bam"));
+    //append(bamFilename, getAbsolutePath("/tests/bam_io/small.bam"));
 
     String<char, MMap<> > in;
     open(in, toCString(bamFilename));
diff --git a/tests/bam_io/test_read_sam.h b/tests/bam_io/test_read_sam.h
index 55ade92..fcf4e02 100644
--- a/tests/bam_io/test_read_sam.h
+++ b/tests/bam_io/test_read_sam.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/bam_io/test_write_bam.h b/tests/bam_io/test_write_bam.h
index 4780c7f..2af02ed 100644
--- a/tests/bam_io/test_write_bam.h
+++ b/tests/bam_io/test_write_bam.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -75,8 +75,7 @@ SEQAN_DEFINE_TEST(test_bam_io_bam_write_header)
 
     // Compare results.
     CharString bamFilename;
-    append(bamFilename, SEQAN_PATH_TO_ROOT());
-    append(bamFilename, "/tests/bam_io/header_uncompressed.bam");
+    append(bamFilename, getAbsolutePath("/tests/bam_io/header_uncompressed.bam"));
 
     String<char, MMap<> > EXPECTED;
     open(EXPECTED, toCString(bamFilename));
@@ -136,8 +135,7 @@ SEQAN_DEFINE_TEST(test_bam_io_bam_write_alignment)
     write(text, record, bamIOContext, Bam());
 
     CharString bamFilename;
-    append(bamFilename, SEQAN_PATH_TO_ROOT());
-    append(bamFilename, "/tests/bam_io/alignment_uncompressed.bam");
+    append(bamFilename, getAbsolutePath("/tests/bam_io/alignment_uncompressed.bam"));
 
     String<char, MMap<> > EXPECTED;
     open(EXPECTED, toCString(bamFilename));
diff --git a/tests/bam_io/test_write_sam.h b/tests/bam_io/test_write_sam.h
index 9f87398..43da50d 100644
--- a/tests/bam_io/test_write_sam.h
+++ b/tests/bam_io/test_write_sam.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/CMakeLists.txt b/tests/basic/CMakeLists.txt
index bb15a93..e9a23b7 100644
--- a/tests/basic/CMakeLists.txt
+++ b/tests/basic/CMakeLists.txt
@@ -123,12 +123,6 @@ add_executable (
   test_basic_iterator.h)
 target_link_libraries (test_basic_iterator ${SEQAN_LIBRARIES})
 
-add_executable (
-  test_basic_simd_vector
-  test_basic_simd_vector.cpp
-  test_basic_simd_vector.h)
-target_link_libraries (test_basic_simd_vector ${SEQAN_LIBRARIES})
-
 # Add CXX flags found by find_package (SeqAn).
 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SEQAN_CXX_FLAGS}")
 
@@ -149,4 +143,3 @@ add_test (NAME test_test_basic_smart_pointer COMMAND $<TARGET_FILE:test_basic_sm
 add_test (NAME test_test_basic_container COMMAND $<TARGET_FILE:test_basic_container>)
 add_test (NAME test_test_basic_proxy COMMAND $<TARGET_FILE:test_basic_proxy>)
 add_test (NAME test_test_basic_iterator COMMAND $<TARGET_FILE:test_basic_iterator>)
-add_test (NAME test_test_basic_simd_vector COMMAND $<TARGET_FILE:test_basic_simd_vector>)
diff --git a/tests/basic/test_basic.cpp b/tests/basic/test_basic.cpp
index b1b73d9..650bfab 100644
--- a/tests/basic/test_basic.cpp
+++ b/tests/basic/test_basic.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -338,7 +338,6 @@ SEQAN_BEGIN_TESTSUITE(test_basic)
     // SEQAN_CALL_TEST(test_basic_conversions);
     SEQAN_CALL_TEST(test_basic_alphabet_extreme_values);
     // SEQAN_CALL_TEST(test_basic_simple_types);
-    SEQAN_CALL_TEST(test_basic_suprema_infima);
 
     SEQAN_CALL_TEST(test_basic_concepts_integer_concept);
 }
diff --git a/tests/basic/test_basic_aggregate.cpp b/tests/basic/test_basic_aggregate.cpp
index a13e413..5ca52df 100644
--- a/tests/basic/test_basic_aggregate.cpp
+++ b/tests/basic/test_basic_aggregate.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/test_basic_aggregate.h b/tests/basic/test_basic_aggregate.h
index b1090a5..86d1a6f 100644
--- a/tests/basic/test_basic_aggregate.h
+++ b/tests/basic/test_basic_aggregate.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -479,7 +479,10 @@ SEQAN_DEFINE_TEST(test_basic_aggregates_pair_packed_constructors)
 
     // Default constructor.
     {
-        TPair p;
+        TPair p{};
+
+        SEQAN_ASSERT_EQ(p.i1, 0);
+        SEQAN_ASSERT_EQ(p.i2, 0u);
     }
 
     // Normal Constructor Pair(i1, i2).
diff --git a/tests/basic/test_basic_allocator.cpp b/tests/basic/test_basic_allocator.cpp
index 0ddd7a5..ef520b1 100644
--- a/tests/basic/test_basic_allocator.cpp
+++ b/tests/basic/test_basic_allocator.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/test_basic_allocator.h b/tests/basic/test_basic_allocator.h
index bea7a75..67321c1 100644
--- a/tests/basic/test_basic_allocator.h
+++ b/tests/basic/test_basic_allocator.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/test_basic_alphabet.cpp b/tests/basic/test_basic_alphabet.cpp
index fd31cd5..1460957 100644
--- a/tests/basic/test_basic_alphabet.cpp
+++ b/tests/basic/test_basic_alphabet.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -55,9 +55,9 @@ SEQAN_BEGIN_TESTSUITE(test_basic_alphabet)
     // Test Math Functions
     // -----------------------------------------------------------------------
 
-    SEQAN_CALL_TEST(test_basic_alphabet_math_metafunctions);
-    SEQAN_CALL_TEST(test_basic_alphabet_math_min_value);
-    SEQAN_CALL_TEST(test_basic_alphabet_math_max_value);
+    // SEQAN_CALL_TEST(test_basic_alphabet_math_metafunctions); //deprecated
+    // SEQAN_CALL_TEST(test_basic_alphabet_math_min_value);     //deprecated
+    // SEQAN_CALL_TEST(test_basic_alphabet_math_max_value);     //deprecated
 
     // -----------------------------------------------------------------------
     // Test Adaptions of Builtin Types
diff --git a/tests/basic/test_basic_alphabet.h b/tests/basic/test_basic_alphabet.h
index 1ae1696..ec20e47 100644
--- a/tests/basic/test_basic_alphabet.h
+++ b/tests/basic/test_basic_alphabet.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -456,20 +456,11 @@ void TestExtremeValuesSigned()
 
     long double maxVal = -minVal - 1;
 
-/*
-    std::cout << std::endl << "Max/Min of " << typeid(T).name() << std::endl;
-    std::cout << maxVal << " == " << MaxValue<T>::VALUE << "(" << (double)MaxValue<T>::VALUE << ")  " << maxValue<T>() << std::endl;
-    std::cout << minVal << " == " << MinValue<T>::VALUE << "(" << (double)MinValue<T>::VALUE << ")  " << minValue<T>() << std::endl;
-*/
-
     bool isSigned = IsSameType< typename MakeSigned_<T>::Type, T >::VALUE;
     SEQAN_ASSERT(isSigned);
 
-    SEQAN_ASSERT_EQ(maxValue<T>(), MaxValue<T>::VALUE);
-    SEQAN_ASSERT_EQ(minValue<T>(), MinValue<T>::VALUE);
-
-    long double maxDelta = maxVal - MaxValue<T>::VALUE;
-    long double minDelta = minVal - (long double)MinValue<T>::VALUE;
+    long double maxDelta = maxVal - std::numeric_limits<T>::max();
+    long double minDelta = minVal - (long double)std::numeric_limits<T>::min();
     SEQAN_ASSERT(maxDelta <= maxVal/1000);
     SEQAN_ASSERT(-maxVal/1000 <= maxDelta);
     SEQAN_ASSERT(minDelta <= maxVal/1000);
@@ -484,22 +475,13 @@ void TestExtremeValuesUnsigned()
         maxVal = 2*maxVal;
     maxVal = maxVal - 1;
 
-/*
-    std::cout << std::endl << "Max/Min of " << typeid(T).name() << std::endl;
-    std::cout << maxVal << " == " << MaxValue<T>::VALUE << "(" << (double)MaxValue<T>::VALUE << ")  " << maxValue<T>() << std::endl;
-    std::cout << 0 << " == " << MinValue<T>::VALUE << "(" << (double)MinValue<T>::VALUE << ")  " << minValue<T>() << std::endl;
-*/
-
     bool isUnsigned = IsSameType< typename MakeUnsigned_<T>::Type, T >::VALUE;
     SEQAN_ASSERT(isUnsigned);
 
-    SEQAN_ASSERT_EQ(maxValue<T>(), MaxValue<T>::VALUE);
-    SEQAN_ASSERT_EQ(minValue<T>(), MinValue<T>::VALUE);
-
-    long double maxDelta = maxVal - MaxValue<T>::VALUE;
+    long double maxDelta = maxVal - std::numeric_limits<T>::max();
     SEQAN_ASSERT_LEQ(maxDelta, maxVal/1000);
     SEQAN_ASSERT_LEQ(-maxVal/1000, maxDelta);
-    SEQAN_ASSERT_EQ((T)0, MinValue<T>::VALUE);
+    SEQAN_ASSERT_EQ((T)0, std::numeric_limits<T>::min());
 }
 
 SEQAN_DEFINE_TEST(test_basic_alphabet_extreme_values)
@@ -547,30 +529,6 @@ SEQAN_DEFINE_TEST(test_basic_array_functions)
     TestArrayFunctions<long double>(3.1, 1.2);
 }
 
-SEQAN_DEFINE_TEST(test_basic_suprema_infima)
-{
-  using namespace seqan;
-
-    // These tests are only here to instantiate the MaxValue and
-    // MinValue Metafunctions for double and float.
-    {
-        double x = MaxValue<double>::VALUE;
-        SEQAN_ASSERT_GT(x, 0);
-    }
-    {
-        double x = MinValue<double>::VALUE;
-        SEQAN_ASSERT_LT(x, 0);
-    }
-    {
-        float x = MaxValue<float>::VALUE;
-        SEQAN_ASSERT_GT(x, 0);
-    }
-    {
-        float x = MinValue<float>::VALUE;
-        SEQAN_ASSERT_LT(x, 0);
-    }
-}
-
 SEQAN_DEFINE_TEST(test_basic_alphabet_value_size)
 {
     SEQAN_ASSERT_EQ(+ValueSize<bool>::VALUE, 2u);
diff --git a/tests/basic/test_basic_alphabet_adapt_builtins.h b/tests/basic/test_basic_alphabet_adapt_builtins.h
index b0e6705..bda6757 100644
--- a/tests/basic/test_basic_alphabet_adapt_builtins.h
+++ b/tests/basic/test_basic_alphabet_adapt_builtins.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -70,19 +70,6 @@ SEQAN_DEFINE_TEST(test_basic_alphabet_adapt_builtins_concepts_bool)
         SEQAN_ASSERT_EQ(b, true);
     }
 
-    // Ordered Alphabet Concept
-    {
-        bool b = false, c = true;
-
-        SEQAN_ASSERT_EQ(minValue(bool()), false);
-        SEQAN_ASSERT_EQ(minValue<bool>(), false);
-        SEQAN_ASSERT_EQ(+(MinValue<bool>::VALUE), 0/*false*/);
-        SEQAN_ASSERT_EQ(maxValue(bool()), true);
-        SEQAN_ASSERT_EQ(maxValue<bool>(), true);
-        SEQAN_ASSERT_EQ(+(MaxValue<bool>::VALUE), 1/*true*/);
-        SEQAN_ASSERT(b < c);
-    }
-
     // Finite Ordered Alphabet
     {
         bool b = false;
@@ -114,19 +101,6 @@ SEQAN_DEFINE_TEST(test_basic_alphabet_adapt_builtins_concepts_char)
         SEQAN_ASSERT_EQ(b, true);
     }
 
-    // Ordered Alphabet Concept
-    {
-        char b = false, c = true;
-        SEQAN_ASSERT_EQ(minValue(char()), '\0');
-        SEQAN_ASSERT_EQ(minValue<char>(), '\0');
-        SEQAN_ASSERT_EQ(+(MinValue<char>::VALUE), '\0');
-        // TODO(holtgrew): Is the following correct?
-        SEQAN_ASSERT_EQ(maxValue(char()), char(-1));
-        SEQAN_ASSERT_EQ(maxValue<char>(), char(-1));
-        SEQAN_ASSERT_EQ(+(MaxValue<char>::VALUE), char(-1));
-        SEQAN_ASSERT(b < c);
-    }
-
     // Finite Ordered Alphabet
     {
         char b = 0;
@@ -168,19 +142,6 @@ SEQAN_DEFINE_TEST(test_basic_alphabet_adapt_builtins_concepts_short)
         SEQAN_ASSERT_EQ(b, 1);
     }
 
-    // Ordered Alphabet Concept
-    {
-        short b = 0, c = 42;
-
-        SEQAN_ASSERT_LEQ(minValue(short()), -32768);
-        SEQAN_ASSERT_LEQ(minValue<short>(), -32768);
-        SEQAN_ASSERT_LEQ(+(MinValue<short>::VALUE), -32768);
-        SEQAN_ASSERT_GEQ(maxValue(short()), 32767);
-        SEQAN_ASSERT_GEQ(maxValue<short>(), 32767);
-        SEQAN_ASSERT_GEQ(+(MaxValue<short>::VALUE), 32767);
-        SEQAN_ASSERT(b < c);
-    }
-
     // Finite Ordered Alphabet
     {
         short b = 0;
@@ -214,21 +175,6 @@ SEQAN_DEFINE_TEST(test_basic_alphabet_adapt_builtins_concepts_int)
         SEQAN_ASSERT_EQ(b, 1);
     }
 
-    // Ordered Alphabet Concept
-    {
-        int b = 0, c = 42;
-
-        // note(marehr): -2147483648 would produce the compiler warning C4146:
-        // unary minus operator applied to unsigned type, result still unsigned
-        SEQAN_ASSERT_EQ(minValue(int()), -2147483647 - 1);
-        SEQAN_ASSERT_EQ(minValue<int>(), -2147483647 - 1);
-        SEQAN_ASSERT_EQ(+(MinValue<int>::VALUE), -2147483647 - 1);
-        SEQAN_ASSERT_EQ(maxValue(int()), 2147483647);
-        SEQAN_ASSERT_EQ(maxValue<int>(), 2147483647);
-        SEQAN_ASSERT_EQ(+(MaxValue<int>::VALUE), 2147483647);
-        SEQAN_ASSERT(b < c);
-    }
-
     // Finite Ordered Alphabet
     {
         int b = 0;
@@ -262,19 +208,6 @@ SEQAN_DEFINE_TEST(test_basic_alphabet_adapt_builtins_concepts_long)
         SEQAN_ASSERT_EQ(b, 1);
     }
 
-    // Ordered Alphabet Concept
-    {
-        long b = 0, c = 42;
-
-        SEQAN_ASSERT_LEQ(minValue(long()), +(MinValue<int>::VALUE));
-        SEQAN_ASSERT_LEQ(minValue<long>(), +(MinValue<int>::VALUE));
-        SEQAN_ASSERT_LEQ(+(MinValue<long>::VALUE), +(MinValue<int>::VALUE));
-        SEQAN_ASSERT_GEQ(maxValue(long()), +(MaxValue<int>::VALUE));
-        SEQAN_ASSERT_GEQ(maxValue<long>(), +(MaxValue<int>::VALUE));
-        SEQAN_ASSERT_GEQ(+(MaxValue<long>::VALUE), +(MaxValue<int>::VALUE));
-        SEQAN_ASSERT(b < c);
-    }
-
     // Finite Ordered Alphabet
     {
         long b = 0;
@@ -317,19 +250,6 @@ SEQAN_DEFINE_TEST(test_basic_alphabet_adapt_builtins_concepts_int8)
         SEQAN_ASSERT_EQ(b, 1);
     }
 
-    // Ordered Alphabet Concept
-    {
-        int8_t b = 0, c = 42;
-
-        SEQAN_ASSERT_EQ(minValue(int8_t()), -128);
-        SEQAN_ASSERT_EQ(minValue<int8_t>(), -128);
-        SEQAN_ASSERT_EQ(+(MinValue<int8_t>::VALUE), -128);
-        SEQAN_ASSERT_GEQ(maxValue(int8_t()), 127);
-        SEQAN_ASSERT_GEQ(maxValue<int8_t>(), 127);
-        SEQAN_ASSERT_GEQ(+(MaxValue<int8_t>::VALUE), 127);
-        SEQAN_ASSERT(b < c);
-    }
-
     // Finite Ordered Alphabet
     {
         int8_t b = 0;
@@ -363,19 +283,6 @@ SEQAN_DEFINE_TEST(test_basic_alphabet_adapt_builtins_concepts_uint8)
         SEQAN_ASSERT_EQ(b, 1);
     }
 
-    // Ordered Alphabet Concept
-    {
-        uint8_t b = 0, c = 42;
-
-        SEQAN_ASSERT_EQ(minValue(uint8_t()), 0u);
-        SEQAN_ASSERT_EQ(minValue<uint8_t>(), 0u);
-        SEQAN_ASSERT_EQ(+(MinValue<uint8_t>::VALUE), 0);
-        SEQAN_ASSERT_EQ(maxValue(uint8_t()), 255u);
-        SEQAN_ASSERT_EQ(maxValue<uint8_t>(), 255u);
-        SEQAN_ASSERT_EQ(+(MaxValue<uint8_t>::VALUE), 255);
-        SEQAN_ASSERT(b < c);
-    }
-
     // Finite Ordered Alphabet
     {
         uint8_t b = 0;
@@ -408,19 +315,6 @@ SEQAN_DEFINE_TEST(test_basic_alphabet_adapt_builtins_concepts_int16)
         SEQAN_ASSERT_EQ(b, 1);
     }
 
-    // Ordered Alphabet Concept
-    {
-        int16_t b = 0, c = 42;
-
-        SEQAN_ASSERT_EQ(minValue(int16_t()), -32768);
-        SEQAN_ASSERT_EQ(minValue<int16_t>(), -32768);
-        SEQAN_ASSERT_EQ(+(MinValue<int16_t>::VALUE), -32768);
-        SEQAN_ASSERT_EQ(maxValue(int16_t()), 32767);
-        SEQAN_ASSERT_EQ(maxValue<int16_t>(), 32767);
-        SEQAN_ASSERT_EQ(+(MaxValue<int16_t>::VALUE), 32767);
-        SEQAN_ASSERT(b < c);
-    }
-
     // Finite Ordered Alphabet
     {
         int16_t b = 0;
@@ -454,19 +348,6 @@ SEQAN_DEFINE_TEST(test_basic_alphabet_adapt_builtins_concepts_uint16)
         SEQAN_ASSERT_EQ(b, 1);
     }
 
-    // Ordered Alphabet Concept
-    {
-        uint16_t b = 0, c = 42;
-
-        SEQAN_ASSERT_EQ(minValue(uint16_t()), 0u);
-        SEQAN_ASSERT_EQ(minValue<uint16_t>(), 0u);
-        SEQAN_ASSERT_EQ(+(MinValue<uint16_t>::VALUE), 0);
-        SEQAN_ASSERT_EQ(maxValue(uint16_t()), 65535u);
-        SEQAN_ASSERT_EQ(maxValue<uint16_t>(), 65535u);
-        SEQAN_ASSERT_EQ(+(MaxValue<uint16_t>::VALUE), 65535);
-        SEQAN_ASSERT(b < c);
-    }
-
     // Finite Ordered Alphabet
     {
         uint16_t b = 0;
@@ -499,21 +380,6 @@ SEQAN_DEFINE_TEST(test_basic_alphabet_adapt_builtins_concepts_int32)
         SEQAN_ASSERT_EQ(b, 1);
     }
 
-    // Ordered Alphabet Concept
-    {
-        int32_t b = 0, c = 42;
-
-        // note(marehr): -2147483648 would produce the compiler warning C4146:
-        // unary minus operator applied to unsigned type, result still unsigned
-        SEQAN_ASSERT_EQ(minValue(int32_t()), -2147483647 - 1);
-        SEQAN_ASSERT_EQ(minValue<int32_t>(), -2147483647 - 1);
-        SEQAN_ASSERT_EQ(+(MinValue<int32_t>::VALUE), -2147483647 - 1);
-        SEQAN_ASSERT_EQ(maxValue(int32_t()), 2147483647);
-        SEQAN_ASSERT_EQ(maxValue<int32_t>(), 2147483647);
-        SEQAN_ASSERT_EQ(+(MaxValue<int32_t>::VALUE), 2147483647);
-        SEQAN_ASSERT(b < c);
-    }
-
     // Finite Ordered Alphabet
     {
         int32_t b = 0;
@@ -547,19 +413,6 @@ SEQAN_DEFINE_TEST(test_basic_alphabet_adapt_builtins_concepts_uint32)
         SEQAN_ASSERT_EQ(b, 1u);
     }
 
-    // Ordered Alphabet Concept
-    {
-        uint32_t b = 0, c = 42;
-
-        SEQAN_ASSERT_EQ(minValue(uint32_t()), 0u);
-        SEQAN_ASSERT_EQ(minValue<uint32_t>(), 0u);
-        SEQAN_ASSERT_EQ(+(MinValue<uint32_t>::VALUE), 0u);
-        SEQAN_ASSERT_EQ(maxValue(uint32_t()), 4294967295u);
-        SEQAN_ASSERT_EQ(maxValue<uint32_t>(), 4294967295u);
-        SEQAN_ASSERT_EQ(+(MaxValue<uint32_t>::VALUE), 4294967295u);
-        SEQAN_ASSERT(b < c);
-    }
-
     // Finite Ordered Alphabet
     {
         uint32_t b = 0;
@@ -592,19 +445,6 @@ SEQAN_DEFINE_TEST(test_basic_alphabet_adapt_builtins_concepts_int64)
         SEQAN_ASSERT_EQ(b, 1);
     }
 
-    // Ordered Alphabet Concept
-    {
-        int64_t b = 0, c = 42;
-
-        SEQAN_ASSERT_LT(minValue((int64_t)(0)), minValue((int32_t)(0)));
-        SEQAN_ASSERT_LT(minValue<int64_t>(), minValue<int32_t>());
-        SEQAN_ASSERT_LT(+(MinValue<int64_t>::VALUE), +(MinValue<int32_t>::VALUE));
-        SEQAN_ASSERT_GT(maxValue((int64_t)(0)), maxValue((int32_t)(0)));
-        SEQAN_ASSERT_GT(maxValue<int64_t>(), maxValue<int32_t>());
-        SEQAN_ASSERT_GT(+(MaxValue<int64_t>::VALUE), +(MaxValue<int32_t>::VALUE));
-        SEQAN_ASSERT(b < c);
-    }
-
     // Finite Ordered Alphabet
     {
         int64_t b = 0;
@@ -638,19 +478,6 @@ SEQAN_DEFINE_TEST(test_basic_alphabet_adapt_builtins_concepts_uint64)
         SEQAN_ASSERT_EQ(b, 1u);
     }
 
-    // Ordered Alphabet Concept
-    {
-        uint64_t b = 0, c = 42;
-
-        SEQAN_ASSERT_EQ(minValue(uint64_t()), 0u);
-        SEQAN_ASSERT_EQ(minValue<uint64_t>(), 0u);
-        SEQAN_ASSERT_EQ(+(MinValue<uint64_t>::VALUE), 0u);
-        SEQAN_ASSERT_GT(maxValue(uint64_t()), maxValue(uint32_t()));
-        SEQAN_ASSERT_GT(maxValue<uint64_t>(), maxValue<uint32_t>());
-        SEQAN_ASSERT_GT(+(MaxValue<uint64_t>::VALUE), +(MaxValue<uint32_t>::VALUE));
-        SEQAN_ASSERT(b < c);
-    }
-
     // Finite Ordered Alphabet
     {
         uint64_t b = 0;
@@ -684,19 +511,6 @@ SEQAN_DEFINE_TEST(test_basic_alphabet_adapt_builtins_concepts_float)
         SEQAN_ASSERT_EQ(b, 1);
     }
 
-    // Ordered Alphabet Concept
-    {
-        float b = 0, c = 42;
-
-        SEQAN_ASSERT_LT(minValue(float()), 0);
-        SEQAN_ASSERT_LT(minValue<float>(), 0);
-        SEQAN_ASSERT_LT(+(MinValue<float>::VALUE), 0);
-        SEQAN_ASSERT_GT(maxValue(float()), 0);
-        SEQAN_ASSERT_GT(maxValue<float>(), 0);
-        SEQAN_ASSERT_GT(+(MaxValue<float>::VALUE), 0);
-        SEQAN_ASSERT(b < c);
-    }
-
     // Finite Ordered Alphabet - Not Applicable
     // Alphabet With Gaps - Not Applicable
     // Alphabet With Unknown Value - Not Applicable
@@ -716,19 +530,6 @@ SEQAN_DEFINE_TEST(test_basic_alphabet_adapt_builtins_concepts_double)
         SEQAN_ASSERT_EQ(b, 1);
     }
 
-    // Ordered Alphabet Concept
-    {
-        double b = 0, c = 42;
-
-        SEQAN_ASSERT_LT(minValue(double()), 0);
-        SEQAN_ASSERT_LT(minValue<double>(), 0);
-        SEQAN_ASSERT_LT(+(MinValue<double>::VALUE), 0);
-        SEQAN_ASSERT_GT(maxValue(double()), 0);
-        SEQAN_ASSERT_GT(maxValue<double>(), 0);
-        SEQAN_ASSERT_GT(+(MaxValue<double>::VALUE), 0);
-        SEQAN_ASSERT(b < c);
-    }
-
     // Alphabet With Gaps - Not Applicable
     // Alphabet With Unknown Value - Not Applicable
     // Alphabet With Qualities - Not Applicable
diff --git a/tests/basic/test_basic_alphabet_bio.h b/tests/basic/test_basic_alphabet_bio.h
index 728ecd1..bc40316 100644
--- a/tests/basic/test_basic_alphabet_bio.h
+++ b/tests/basic/test_basic_alphabet_bio.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/test_basic_alphabet_concepts.h b/tests/basic/test_basic_alphabet_concepts.h
index d66742d..15da004 100644
--- a/tests/basic/test_basic_alphabet_concepts.h
+++ b/tests/basic/test_basic_alphabet_concepts.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/test_basic_alphabet_math.h b/tests/basic/test_basic_alphabet_math.h
index 918c124..d9883c1 100644
--- a/tests/basic/test_basic_alphabet_math.h
+++ b/tests/basic/test_basic_alphabet_math.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -61,34 +61,37 @@ struct MyNumber_
     {}
 };
 
-inline MyNumber_ const &
-infimumValueImpl(MyNumber_ * /*tag*/)
+namespace seqan
 {
-    static const MyNumber_ result(-1);
-    return result;
-}
+template <>
+struct MinValue<MyNumber_>
+{
+    static const MyNumber_ VALUE;
+};
 
-inline MyNumber_ const &
-supremumValueImpl(MyNumber_ * /*tag*/)
+const MyNumber_ MinValue<MyNumber_>::VALUE = MyNumber_(-1);
+
+template <>
+struct MaxValue<MyNumber_>
 {
-    static const MyNumber_ result(1);
-    return result;
+    static const MyNumber_ VALUE;
+};
+
+const MyNumber_ MaxValue<MyNumber_>::VALUE = MyNumber_(1);
 }
 
 SEQAN_DEFINE_TEST(test_basic_alphabet_math_min_value)
 {
     using namespace seqan;
 
-    SEQAN_ASSERT_EQ(minValue<MyNumber_>().value, -1);
-    SEQAN_ASSERT_EQ(minValue(MyNumber_()).value,  -1);
+    SEQAN_ASSERT_EQ(MinValue<MyNumber_>::VALUE.value, -1);
 }
 
 SEQAN_DEFINE_TEST(test_basic_alphabet_math_max_value)
 {
     using namespace seqan;
 
-    SEQAN_ASSERT_EQ(maxValue<MyNumber_>().value, 1);
-    SEQAN_ASSERT_EQ(maxValue(MyNumber_()).value,  1);
+    SEQAN_ASSERT_EQ(MaxValue<MyNumber_>::VALUE.value, 1);
 }
 
 #endif  // #ifndef SEQAN_TESTS_BASIC_TEST_BASIC_ALPHABET_MATH_H_
diff --git a/tests/basic/test_basic_alphabet_profile.h b/tests/basic/test_basic_alphabet_profile.h
index 0f0e873..9bbb94a 100644
--- a/tests/basic/test_basic_alphabet_profile.h
+++ b/tests/basic/test_basic_alphabet_profile.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/test_basic_alphabet_qualities.h b/tests/basic/test_basic_alphabet_qualities.h
index 5daffba..e7cfce3 100644
--- a/tests/basic/test_basic_alphabet_qualities.h
+++ b/tests/basic/test_basic_alphabet_qualities.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/test_basic_alphabet_residue.h b/tests/basic/test_basic_alphabet_residue.h
index 4db2bd0..1682bea 100644
--- a/tests/basic/test_basic_alphabet_residue.h
+++ b/tests/basic/test_basic_alphabet_residue.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -102,13 +102,8 @@ SEQAN_DEFINE_TEST(test_basic_alphabet_residue_metafunctions_dna)
 
     // Ordered Alphabet Concept Metafunctions / Type Queries
 
-    SEQAN_ASSERT_EQ(MaxValue<Dna>::VALUE, Dna('T'));
-    SEQAN_ASSERT_EQ(maxValue<Dna>(), Dna('T'));
-    SEQAN_ASSERT_EQ(maxValue(Dna()), Dna('T'));
-
-    SEQAN_ASSERT_EQ(MinValue<Dna>::VALUE, Dna('A'));
-    SEQAN_ASSERT_EQ(minValue<Dna>(), Dna('A'));
-    SEQAN_ASSERT_EQ(minValue(Dna()), Dna('A'));
+    SEQAN_ASSERT_EQ(std::numeric_limits<Dna>::max(), Dna('T'));
+    SEQAN_ASSERT_EQ(std::numeric_limits<Dna>::min(), Dna('A'));
 
     // Finited Ordered Alphabet Concept Metafunctions / Type Queries
 
@@ -133,13 +128,8 @@ SEQAN_DEFINE_TEST(test_basic_alphabet_residue_metafunctions_dna5)
 
     // Ordered Alphabet Concept Metafunctions / Type Queries
 
-    SEQAN_ASSERT_EQ(MaxValue<Dna5>::VALUE, Dna5('N'));
-    SEQAN_ASSERT_EQ(maxValue<Dna5>(), Dna5('N'));
-    SEQAN_ASSERT_EQ(maxValue(Dna5()), Dna5('N'));
-
-    SEQAN_ASSERT_EQ(MinValue<Dna5>::VALUE, Dna5('A'));
-    SEQAN_ASSERT_EQ(minValue<Dna5>(), Dna5('A'));
-    SEQAN_ASSERT_EQ(minValue(Dna5()), Dna5('A'));
+    SEQAN_ASSERT_EQ(std::numeric_limits<Dna5>::max(), Dna5('N'));
+    SEQAN_ASSERT_EQ(std::numeric_limits<Dna5>::min(), Dna5('A'));
 
     // Finited Ordered Alphabet Concept Metafunctions / Type Queries
 
@@ -169,13 +159,8 @@ SEQAN_DEFINE_TEST(test_basic_alphabet_residue_metafunctions_dna_q)
 
     // Ordered Alphabet Concept Metafunctions / Type Queries
 
-    SEQAN_ASSERT_EQ(MaxValue<DnaQ>::VALUE, DnaQ('T'));
-    SEQAN_ASSERT_EQ(maxValue<DnaQ>(), DnaQ('T'));
-    SEQAN_ASSERT_EQ(maxValue(DnaQ()), DnaQ('T'));
-
-    SEQAN_ASSERT_EQ(MinValue<DnaQ>::VALUE, DnaQ('A'));
-    SEQAN_ASSERT_EQ(minValue<DnaQ>(), DnaQ('A'));
-    SEQAN_ASSERT_EQ(minValue(DnaQ()), DnaQ('A'));
+    SEQAN_ASSERT_EQ(std::numeric_limits<DnaQ>::max(), DnaQ('T'));
+    SEQAN_ASSERT_EQ(std::numeric_limits<DnaQ>::min(), DnaQ('A'));
 
     // Finited Ordered Alphabet Concept Metafunctions / Type Queries
 
@@ -205,13 +190,8 @@ SEQAN_DEFINE_TEST(test_basic_alphabet_residue_metafunctions_dna5_q)
 
     // Ordered Alphabet Concept Metafunctions / Type Queries
 
-    SEQAN_ASSERT_EQ(MaxValue<Dna5Q>::VALUE, Dna5Q('N'));
-    SEQAN_ASSERT_EQ(maxValue<Dna5Q>(), Dna5Q('N'));
-    SEQAN_ASSERT_EQ(maxValue(Dna5Q()), Dna5Q('N'));
-
-    SEQAN_ASSERT_EQ(MinValue<Dna5Q>::VALUE, Dna5Q('A'));
-    SEQAN_ASSERT_EQ(minValue<Dna5Q>(), Dna5Q('A'));
-    SEQAN_ASSERT_EQ(minValue(Dna5Q()), Dna5Q('A'));
+    SEQAN_ASSERT_EQ(std::numeric_limits<Dna5Q>::max(), Dna5Q('N'));
+    SEQAN_ASSERT_EQ(std::numeric_limits<Dna5Q>::min(), Dna5Q('A'));
 
     // Finited Ordered Alphabet Concept Metafunctions / Type Queries
 
@@ -246,13 +226,8 @@ SEQAN_DEFINE_TEST(test_basic_alphabet_residue_metafunctions_rna)
 
     // Ordered Alphabet Concept Metafunctions / Type Queries
 
-    SEQAN_ASSERT_EQ(MaxValue<Rna>::VALUE, Rna('U'));
-    SEQAN_ASSERT_EQ(maxValue<Rna>(), Rna('U'));
-    SEQAN_ASSERT_EQ(maxValue(Rna()), Rna('U'));
-
-    SEQAN_ASSERT_EQ(MinValue<Rna>::VALUE, Rna('A'));
-    SEQAN_ASSERT_EQ(minValue<Rna>(), Rna('A'));
-    SEQAN_ASSERT_EQ(minValue(Rna()), Rna('A'));
+    SEQAN_ASSERT_EQ(std::numeric_limits<Rna>::max(), Rna('U'));
+    SEQAN_ASSERT_EQ(std::numeric_limits<Rna>::min(), Rna('A'));
 
     // Finited Ordered Alphabet Concept Metafunctions / Type Queries
 
@@ -277,13 +252,8 @@ SEQAN_DEFINE_TEST(test_basic_alphabet_residue_metafunctions_rna5)
 
     // Ordered Alphabet Concept Metafunctions / Type Queries
 
-    SEQAN_ASSERT_EQ(MaxValue<Rna5>::VALUE, Rna5('N'));
-    SEQAN_ASSERT_EQ(maxValue<Rna5>(), Rna5('N'));
-    SEQAN_ASSERT_EQ(maxValue(Rna5()), Rna5('N'));
-
-    SEQAN_ASSERT_EQ(MinValue<Rna5>::VALUE, Rna5('A'));
-    SEQAN_ASSERT_EQ(minValue<Rna5>(), Rna5('A'));
-    SEQAN_ASSERT_EQ(minValue(Rna5()), Rna5('A'));
+    SEQAN_ASSERT_EQ(std::numeric_limits<Rna5>::max(), Rna5('N'));
+    SEQAN_ASSERT_EQ(std::numeric_limits<Rna5>::min(), Rna5('A'));
 
     // Finited Ordered Alphabet Concept Metafunctions / Type Queries
 
@@ -313,13 +283,8 @@ SEQAN_DEFINE_TEST(test_basic_alphabet_residue_metafunctions_iupac)
 
     // Ordered Alphabet Concept Metafunctions / Type Queries
 
-    SEQAN_ASSERT_EQ(MaxValue<Iupac>::VALUE, Iupac('N'));
-    SEQAN_ASSERT_EQ(maxValue<Iupac>(), Iupac('N'));
-    SEQAN_ASSERT_EQ(maxValue(Iupac()), Iupac('N'));
-
-    SEQAN_ASSERT_EQ(MinValue<Iupac>::VALUE, Iupac('U'));
-    SEQAN_ASSERT_EQ(minValue<Iupac>(), Iupac('U'));
-    SEQAN_ASSERT_EQ(minValue(Iupac()), Iupac('U'));
+    SEQAN_ASSERT_EQ(std::numeric_limits<Iupac>::max(), Iupac('N'));
+    SEQAN_ASSERT_EQ(std::numeric_limits<Iupac>::min(), Iupac('U'));
 
     // Finited Ordered Alphabet Concept Metafunctions / Type Queries
 
@@ -355,14 +320,9 @@ SEQAN_DEFINE_TEST(test_basic_alphabet_residue_metafunctions_amino_acid)
     SEQAN_ASSERT_EQ(+(BitsPerValue<AminoAcid>::VALUE), 5);
 
     // Ordered Alphabet Concept Metafunctions / Type Queries
-    SEQAN_ASSERT_EQ(MaxValue<AminoAcid>::VALUE, 26u);
-    SEQAN_ASSERT_EQ(MaxValue<AminoAcid>::VALUE, AminoAcid('*'));
-    SEQAN_ASSERT_EQ(maxValue<AminoAcid>(), AminoAcid('*'));
-    SEQAN_ASSERT_EQ(maxValue(AminoAcid()), AminoAcid('*'));
-
-    SEQAN_ASSERT_EQ(MinValue<AminoAcid>::VALUE, AminoAcid('A'));
-    SEQAN_ASSERT_EQ(minValue<AminoAcid>(), AminoAcid('A'));
-    SEQAN_ASSERT_EQ(minValue(AminoAcid()), AminoAcid('A'));
+    SEQAN_ASSERT_EQ(std::numeric_limits<AminoAcid>::max(), 26u);
+    SEQAN_ASSERT_EQ(std::numeric_limits<AminoAcid>::max(), AminoAcid('*'));
+    SEQAN_ASSERT_EQ(std::numeric_limits<AminoAcid>::min(), AminoAcid('A'));
 
     // Finited Ordered Alphabet Concept Metafunctions / Type Queries
 
diff --git a/tests/basic/test_basic_alphabet_simple_type.h b/tests/basic/test_basic_alphabet_simple_type.h
index e9328d3..4e950e6 100644
--- a/tests/basic/test_basic_alphabet_simple_type.h
+++ b/tests/basic/test_basic_alphabet_simple_type.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/test_basic_alphabet_storage.h b/tests/basic/test_basic_alphabet_storage.h
index 4a70bb1..1443ceb 100644
--- a/tests/basic/test_basic_alphabet_storage.h
+++ b/tests/basic/test_basic_alphabet_storage.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/test_basic_array_construct_destruct.h b/tests/basic/test_basic_array_construct_destruct.h
index 9aa7a0c..15fd082 100644
--- a/tests/basic/test_basic_array_construct_destruct.h
+++ b/tests/basic/test_basic_array_construct_destruct.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/test_basic_array_constructor_destruct.h b/tests/basic/test_basic_array_constructor_destruct.h
index 6bb509b..f9a629b 100644
--- a/tests/basic/test_basic_array_constructor_destruct.h
+++ b/tests/basic/test_basic_array_constructor_destruct.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/test_basic_concept.cpp b/tests/basic/test_basic_concept.cpp
index 8f96601..1742ae1 100644
--- a/tests/basic/test_basic_concept.cpp
+++ b/tests/basic/test_basic_concept.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -38,11 +38,13 @@
 #include <seqan/sequence.h>
 
 #include "test_basic_fundamental_concepts.h"
+#include "test_basic_concepts.h"
 
 SEQAN_BEGIN_TESTSUITE(test_basic_concept)
 {
     SEQAN_CALL_TEST(test_basic_concepts_concept_impl);
     SEQAN_CALL_TEST(test_basic_concepts_concept_refine);
+
+    SEQAN_CALL_TEST(test_basic_concepts_move_construtible_concept);
 }
 SEQAN_END_TESTSUITE
-
diff --git a/tests/basic/test_basic_concepts.h b/tests/basic/test_basic_concepts.h
index a82af76..fa9e200 100644
--- a/tests/basic/test_basic_concepts.h
+++ b/tests/basic/test_basic_concepts.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -87,4 +87,43 @@ SEQAN_DEFINE_TEST(test_basic_concepts_integer_concept)
     // BOOST_CONCEPT_ASSERT((boost::Integer<double>));
 }
 
+SEQAN_DEFINE_TEST(test_basic_concepts_move_construtible_concept)
+{
+    using namespace seqan;
+
+    struct TestMoveable
+    {
+        TestMoveable() = default;
+
+        TestMoveable(TestMoveable && other)
+        {
+            ignoreUnusedVariableWarning(other);
+        }
+    };
+
+    struct TestNotMoveable
+    {
+        TestNotMoveable() = default;
+
+        TestNotMoveable(TestNotMoveable const & other)
+        {
+            ignoreUnusedVariableWarning(other);
+        }
+    };
+
+    struct TestNotCopyableAndMoveable
+    {
+        TestNotCopyableAndMoveable() = default;
+
+        TestNotCopyableAndMoveable(TestNotCopyableAndMoveable const &) = delete;
+        TestNotCopyableAndMoveable(TestNotCopyableAndMoveable &&) = delete;
+    };
+
+    SEQAN_CONCEPT_ASSERT((MoveConstructible<char>));
+    SEQAN_CONCEPT_ASSERT((MoveConstructible<TestMoveable>));
+    SEQAN_CONCEPT_ASSERT((MoveConstructible<TestNotMoveable>));
+    //NOTE: Fails compiling because of deleted copy and move c'tor, which is the expected behavior.
+    //SEQAN_CONCEPT_ASSERT((MoveConstructible<TestNotCopyableAndMoveable>));
+}
+
 #endif  // #ifndef TESTS_BASIC_TEST_BASIC_CONCEPTS_H_
diff --git a/tests/basic/test_basic_construct_destruct.h b/tests/basic/test_basic_construct_destruct.h
index 81da055..ad74199 100644
--- a/tests/basic/test_basic_construct_destruct.h
+++ b/tests/basic/test_basic_construct_destruct.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/test_basic_container.cpp b/tests/basic/test_basic_container.cpp
index 1cf1286..dcdeb30 100644
--- a/tests/basic/test_basic_container.cpp
+++ b/tests/basic/test_basic_container.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/test_basic_container_proxy.h b/tests/basic/test_basic_container_proxy.h
index 955b8ac..4d1b9f5 100644
--- a/tests/basic/test_basic_container_proxy.h
+++ b/tests/basic/test_basic_container_proxy.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/test_basic_exception.cpp b/tests/basic/test_basic_exception.cpp
index 3f321fc..4de620b 100644
--- a/tests/basic/test_basic_exception.cpp
+++ b/tests/basic/test_basic_exception.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/test_basic_exception.h b/tests/basic/test_basic_exception.h
index f5fe6b9..56b89bb 100644
--- a/tests/basic/test_basic_exception.h
+++ b/tests/basic/test_basic_exception.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -43,7 +43,7 @@ SEQAN_DEFINE_TEST(test_basic_exception_try_catch)
     {
         SEQAN_THROW(Exception());
     }
-    SEQAN_CATCH(Exception)
+    SEQAN_CATCH(Exception &)
     {
         return;
     }
@@ -57,7 +57,7 @@ SEQAN_DEFINE_TEST(test_basic_exception_bad_alloc)
     {
         SEQAN_THROW(BadAlloc());
     }
-    SEQAN_CATCH(BadAlloc)
+    SEQAN_CATCH(BadAlloc &)
     {
         return;
     }
@@ -71,7 +71,7 @@ SEQAN_DEFINE_TEST(test_basic_exception_runtime_error)
     {
         SEQAN_THROW(RuntimeError("Throwing a RuntimeError."));
     }
-    SEQAN_CATCH(RuntimeError)
+    SEQAN_CATCH(RuntimeError &)
     {
         return;
     }
diff --git a/tests/basic/test_basic_fundamental.cpp b/tests/basic/test_basic_fundamental.cpp
index 26769b5..776317f 100644
--- a/tests/basic/test_basic_fundamental.cpp
+++ b/tests/basic/test_basic_fundamental.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/test_basic_fundamental_comparison.h b/tests/basic/test_basic_fundamental_comparison.h
index 0f1b6fb..d1682a5 100644
--- a/tests/basic/test_basic_fundamental_comparison.h
+++ b/tests/basic/test_basic_fundamental_comparison.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/test_basic_fundamental_concepts.h b/tests/basic/test_basic_fundamental_concepts.h
index 11dc589..09d1aca 100644
--- a/tests/basic/test_basic_fundamental_concepts.h
+++ b/tests/basic/test_basic_fundamental_concepts.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/test_basic_fundamental_conversion.h b/tests/basic/test_basic_fundamental_conversion.h
index d3007ca..ca5d897 100644
--- a/tests/basic/test_basic_fundamental_conversion.h
+++ b/tests/basic/test_basic_fundamental_conversion.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/test_basic_fundamental_helpers.h b/tests/basic/test_basic_fundamental_helpers.h
index 81699a9..6da7f38 100644
--- a/tests/basic/test_basic_fundamental_helpers.h
+++ b/tests/basic/test_basic_fundamental_helpers.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/test_basic_fundamental_metafunctions.h b/tests/basic/test_basic_fundamental_metafunctions.h
index bf7e5a6..cff0a4c 100644
--- a/tests/basic/test_basic_fundamental_metafunctions.h
+++ b/tests/basic/test_basic_fundamental_metafunctions.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/test_basic_fundamental_tags.h b/tests/basic/test_basic_fundamental_tags.h
index 5cf770e..ed89be4 100644
--- a/tests/basic/test_basic_fundamental_tags.h
+++ b/tests/basic/test_basic_fundamental_tags.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/test_basic_fundamental_transport.h b/tests/basic/test_basic_fundamental_transport.h
index d5b970a..6b4e180 100644
--- a/tests/basic/test_basic_fundamental_transport.h
+++ b/tests/basic/test_basic_fundamental_transport.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/test_basic_hosted_type_interface.h b/tests/basic/test_basic_hosted_type_interface.h
index 974e2d1..f2149bd 100644
--- a/tests/basic/test_basic_hosted_type_interface.h
+++ b/tests/basic/test_basic_hosted_type_interface.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/test_basic_iterator.cpp b/tests/basic/test_basic_iterator.cpp
index 13f7f6c..dad1280 100644
--- a/tests/basic/test_basic_iterator.cpp
+++ b/tests/basic/test_basic_iterator.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/test_basic_iterator.h b/tests/basic/test_basic_iterator.h
index e130c41..f48ee07 100644
--- a/tests/basic/test_basic_iterator.h
+++ b/tests/basic/test_basic_iterator.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -276,7 +276,7 @@ SEQAN_DEFINE_TEST(test_basic_iterator_adapt_pointer_transport_value)
         resetCDStructStatics();
 
         CDStruct * ptr = &cs1;
-        assignValue(ptr, cs2);
+        *ptr = cs2;
 
         SEQAN_ASSERT_EQ(ptr->copiedFrom, -1);
         SEQAN_ASSERT_EQ(ptr->movedFrom, -1);
diff --git a/tests/basic/test_basic_iterator_concepts.h b/tests/basic/test_basic_iterator_concepts.h
index b5e63d4..1112f56 100644
--- a/tests/basic/test_basic_iterator_concepts.h
+++ b/tests/basic/test_basic_iterator_concepts.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/test_basic_iterator_zip.h b/tests/basic/test_basic_iterator_zip.h
index dde2541..bdf145b 100644
--- a/tests/basic/test_basic_iterator_zip.h
+++ b/tests/basic/test_basic_iterator_zip.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/test_basic_math.cpp b/tests/basic/test_basic_math.cpp
index 2921b7d..009762c 100644
--- a/tests/basic/test_basic_math.cpp
+++ b/tests/basic/test_basic_math.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/test_basic_math.h b/tests/basic/test_basic_math.h
index ebbb53f..60387cf 100644
--- a/tests/basic/test_basic_math.h
+++ b/tests/basic/test_basic_math.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/test_basic_metaprogramming.cpp b/tests/basic/test_basic_metaprogramming.cpp
index c71b916..118bc19 100644
--- a/tests/basic/test_basic_metaprogramming.cpp
+++ b/tests/basic/test_basic_metaprogramming.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/test_basic_metaprogramming.h b/tests/basic/test_basic_metaprogramming.h
index 6abed1a..d06db2e 100644
--- a/tests/basic/test_basic_metaprogramming.h
+++ b/tests/basic/test_basic_metaprogramming.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/test_basic_metaprogramming_control.h b/tests/basic/test_basic_metaprogramming_control.h
index 5c5f7f5..43c4113 100644
--- a/tests/basic/test_basic_metaprogramming_control.h
+++ b/tests/basic/test_basic_metaprogramming_control.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/test_basic_metaprogramming_enable_if.h b/tests/basic/test_basic_metaprogramming_enable_if.h
index 7d5c3bb..864f5c5 100644
--- a/tests/basic/test_basic_metaprogramming_enable_if.h
+++ b/tests/basic/test_basic_metaprogramming_enable_if.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/test_basic_metaprogramming_logic.h b/tests/basic/test_basic_metaprogramming_logic.h
index 1867316..f31daea 100644
--- a/tests/basic/test_basic_metaprogramming_logic.h
+++ b/tests/basic/test_basic_metaprogramming_logic.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/test_basic_metaprogramming_math.h b/tests/basic/test_basic_metaprogramming_math.h
index 330957a..d05117d 100644
--- a/tests/basic/test_basic_metaprogramming_math.h
+++ b/tests/basic/test_basic_metaprogramming_math.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/test_basic_metaprogramming_type.h b/tests/basic/test_basic_metaprogramming_type.h
index 92ea1e8..b803cbc 100644
--- a/tests/basic/test_basic_metaprogramming_type.h
+++ b/tests/basic/test_basic_metaprogramming_type.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/test_basic_parallelism.cpp b/tests/basic/test_basic_parallelism.cpp
index 4987647..c860d4d 100644
--- a/tests/basic/test_basic_parallelism.cpp
+++ b/tests/basic/test_basic_parallelism.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/test_basic_parallelism.h b/tests/basic/test_basic_parallelism.h
index 955b8ac..4d1b9f5 100644
--- a/tests/basic/test_basic_parallelism.h
+++ b/tests/basic/test_basic_parallelism.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/test_basic_proxy.cpp b/tests/basic/test_basic_proxy.cpp
index 95359b5..0654df0 100644
--- a/tests/basic/test_basic_proxy.cpp
+++ b/tests/basic/test_basic_proxy.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/test_basic_proxy.h b/tests/basic/test_basic_proxy.h
index ca25c2a..3848144 100644
--- a/tests/basic/test_basic_proxy.h
+++ b/tests/basic/test_basic_proxy.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/test_basic_simd_vector.h b/tests/basic/test_basic_simd_vector.h
deleted file mode 100644
index e6b1519..0000000
--- a/tests/basic/test_basic_simd_vector.h
+++ /dev/null
@@ -1,155 +0,0 @@
-// ==========================================================================
-//                 SeqAn - The Library for Sequence Analysis
-// ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-//     * Redistributions of source code must retain the above copyright
-//       notice, this list of conditions and the following disclaimer.
-//     * Redistributions in binary form must reproduce the above copyright
-//       notice, this list of conditions and the following disclaimer in the
-//       documentation and/or other materials provided with the distribution.
-//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
-//       its contributors may be used to endorse or promote products derived
-//       from this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
-// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
-// DAMAGE.
-//
-// ==========================================================================
-// Author: David Weese <david.weese at fu-berlin.de>
-// ==========================================================================
-// Tests for SIMD vectors.
-// ==========================================================================
-
-#ifndef SEQAN_CORE_TESTS_BASIC_TEST_BASIC_SIMD_VECTOR_H_
-#define SEQAN_CORE_TESTS_BASIC_TEST_BASIC_SIMD_VECTOR_H_
-
-#include <random>
-
-#include <seqan/sequence.h>
-#include <seqan/misc/bit_twiddling.h>
-#include <seqan/basic/basic_simd_vector.h>
-
-#if defined(SEQAN_SIMD_ENABLED)
-namespace seqan {
-
-template <int ROWS, typename TVector>
-inline void test_matrix_transpose()
-{
-    typedef typename Value<TVector>::Type TValue;
-    typedef TVector TMatrix[LENGTH<TVector>::VALUE];
-    const int COLS = LENGTH<TVector>::VALUE;
-    
-    String<TValue> random;
-    resize(random, ROWS * COLS);
-
-    std::mt19937 rng;
-    std::uniform_int_distribution<TValue> pdf(0, MaxValue<TValue>::VALUE);
-    for (unsigned i = 0; i < length(random); ++i)
-        random[i] = pdf(rng);
-
-    TMatrix tmp;
-    for (int i = 0; i < ROWS; ++i)
-        for (int j = 0; j < COLS; ++j)
-            tmp[i][j] = random[i * COLS + j];
-
-//    for(int i=0;i<ROWS;++i)
-//        print(std::cout, tmp[i]) << std::endl;
-
-    transpose<ROWS>(tmp);
-
-//    std::cout << std::endl;
-//    std::cout << std::endl;
-//    for(int i=0;i<DIM;++i)
-//        print(std::cout, tmp[i]) << std::endl;
-    
-    for (int i = 0; i < ROWS; ++i)
-        for (int j = 0; j < COLS; ++j)
-            SEQAN_ASSERT_EQ(tmp[i][j], random[j * ROWS + i]);
-}
-
-}
-
-#ifdef SEQAN_SSE4
-
-SEQAN_DEFINE_TEST(test_basic_simd_shuffle)
-{
-    seqan::SimdVector<unsigned short, 8>::Type vec;
-    seqan::SimdVector<unsigned char, 8>::Type  indices;
-
-    for (int i = 0; i < 8; ++i)
-        vec[i] = i * 259 + 3;
-
-    for (int i = 0; i < 8; ++i)
-        indices[i] = 7 - i;
-
-    vec = seqan::shuffleVector(vec, indices);
-
-    for (int i = 0; i < 8; ++i)
-        SEQAN_ASSERT_EQ(vec[i], (7 - i) * 259 + 3);
-}
-
-SEQAN_DEFINE_TEST(test_basic_simd_transpose_8x8)
-{
-    seqan::test_matrix_transpose<8, seqan::SimdVector<unsigned char, 8>::Type>();
-}
-
-SEQAN_DEFINE_TEST(test_basic_simd_transpose_16x16)
-{
-    seqan::test_matrix_transpose<16, seqan::SimdVector<unsigned char, 16>::Type>();
-}
-
-#ifdef __AVX2__
-
-SEQAN_DEFINE_TEST(test_basic_simd_shuffle_avx)
-{
-    seqan::SimdVector<unsigned short, 16>::Type vec;
-    seqan::SimdVector<unsigned char, 16>::Type  indices;
-    
-    const int perm[] = {1,4,2,6,3,5,0,7};
-
-    for (int i = 0; i < 8; ++i)
-    {
-        vec[i]   = i * 259 + 3;
-        vec[i+8] = i * 432 + 9;
-    }
-
-    for (int i = 0; i < 8; ++i)
-    {
-        indices[i]   = 7 - i;
-        indices[i+8] = perm[i];
-    }
-
-    vec = seqan::shuffleVector(vec, indices);
-
-    for (int i = 0; i < 8; ++i)
-    {
-        SEQAN_ASSERT_EQ(vec[i],   (7 - i) * 259 + 3);
-        SEQAN_ASSERT_EQ(vec[i+8], perm[i] * 432 + 9);
-    }
-}
-
-
-SEQAN_DEFINE_TEST(test_basic_simd_transpose_32x32)
-{
-    seqan::test_matrix_transpose<32, seqan::SimdVector<unsigned char, 32>::Type >();
-}
-
-#endif  // #ifdef __AVX2__
-#endif  // #ifdef SEQAN_SSE4
-#endif  // SEQAN_SIMD_ENABLED
-
-#endif  // #ifndef SEQAN_CORE_TESTS_BASIC_TEST_BASIC_SIMD_VECTOR_H_
diff --git a/tests/basic/test_basic_smart_pointer.cpp b/tests/basic/test_basic_smart_pointer.cpp
index 3b518ef..f9f1d27 100644
--- a/tests/basic/test_basic_smart_pointer.cpp
+++ b/tests/basic/test_basic_smart_pointer.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/test_basic_smart_pointer_holder.h b/tests/basic/test_basic_smart_pointer_holder.h
index 5019e64..4d2d920 100644
--- a/tests/basic/test_basic_smart_pointer_holder.h
+++ b/tests/basic/test_basic_smart_pointer_holder.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/test_basic_tag.h b/tests/basic/test_basic_tag.h
index 355b2fc..0bc26d3 100644
--- a/tests/basic/test_basic_tag.h
+++ b/tests/basic/test_basic_tag.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/test_basic_transport.h b/tests/basic/test_basic_transport.h
index cd31921..ba0b9a6 100644
--- a/tests/basic/test_basic_transport.h
+++ b/tests/basic/test_basic_transport.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/basic/test_basic_type.h b/tests/basic/test_basic_type.h
index 8a5cf4f..6380747 100644
--- a/tests/basic/test_basic_type.h
+++ b/tests/basic/test_basic_type.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/bed_io/test_bed_io.cpp b/tests/bed_io/test_bed_io.cpp
index f2cde99..0099637 100644
--- a/tests/bed_io/test_bed_io.cpp
+++ b/tests/bed_io/test_bed_io.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -385,8 +385,7 @@ SEQAN_DEFINE_TEST(test_bed_write_bed12_record)
 
 SEQAN_DEFINE_TEST(test_bed_bed_file_read)
 {
-    seqan::CharString inPath = SEQAN_PATH_TO_ROOT();
-    append(inPath, "/tests/bed_io/example.bed");
+    seqan::CharString inPath = getAbsolutePath("/tests/bed_io/example.bed");
 
     seqan::BedFileIn bedStream(toCString(inPath));
 
@@ -410,7 +409,7 @@ SEQAN_DEFINE_TEST(test_bed_bed_file_read)
 
 SEQAN_DEFINE_TEST(test_bed_bed_file_write)
 {
-    seqan::CharString tmpPath = SEQAN_PATH_TO_ROOT();
+    seqan::CharString tmpPath = SEQAN_TEMP_FILENAME();
     append(tmpPath, ".bed");
 
     seqan::BedFileOut bedStream(toCString(tmpPath));
@@ -431,8 +430,7 @@ SEQAN_DEFINE_TEST(test_bed_bed_file_write)
 
     close(bedStream);
 
-    seqan::CharString goldPath(SEQAN_PATH_TO_ROOT());
-    append(goldPath, "/tests/bed_io/example.bed");
+    seqan::CharString goldPath(getAbsolutePath("/tests/bed_io/example.bed"));
     SEQAN_ASSERT(seqan::_compareTextFiles(toCString(tmpPath), toCString(goldPath)));
 }
 
diff --git a/tests/blast/test_blast.cpp b/tests/blast/test_blast.cpp
index 5af959c..2fd4a79 100644
--- a/tests/blast/test_blast.cpp
+++ b/tests/blast/test_blast.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2013, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/blast/test_blast_input.h b/tests/blast/test_blast_input.h
index 0e2e621..3b41812 100644
--- a/tests/blast/test_blast_input.h
+++ b/tests/blast/test_blast_input.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -46,7 +46,7 @@ using namespace seqan;
 inline void
 _test_blast_read_tabular_match_lowlevel(std::string const & path)
 {
-    std::string inPath = std::string(SEQAN_PATH_TO_ROOT()) + std::string(path);
+    std::string inPath = seqan::getAbsolutePath(path.c_str());
 
     std::ifstream ifstream(toCString(inPath),
                            std::ios_base::in | std::ios_base::binary);
@@ -159,8 +159,7 @@ void _testReadTabularWithoutComments(TContext &,
 {
     typedef BlastMatchField<> TField;
 
-    std::string inPath = std::string(SEQAN_PATH_TO_ROOT());
-    inPath += path;
+    std::string inPath = seqan::getAbsolutePath(path.c_str());
 
     BlastRecord<> r;
 
@@ -366,8 +365,7 @@ void _testReadTabularWithComments(TContext &,
 {
     typedef BlastMatchField<> TField;
 
-    std::string inPath = std::string(SEQAN_PATH_TO_ROOT());
-    inPath += path;
+    std::string inPath = seqan::getAbsolutePath(path.c_str());
 
     BlastRecord<> r;
 
diff --git a/tests/blast/test_blast_misc.h b/tests/blast/test_blast_misc.h
index b2482d9..f98f12c 100644
--- a/tests/blast/test_blast_misc.h
+++ b/tests/blast/test_blast_misc.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/blast/test_blast_output.h b/tests/blast/test_blast_output.h
index 79c85d0..e28e550 100644
--- a/tests/blast/test_blast_output.h
+++ b/tests/blast/test_blast_output.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -179,7 +179,7 @@ _testBlastOutputGenerateContent(TFile & file,
 
             computeAlignmentStats(m, context);
             computeBitScore(m, context);
-            computeEValue(m, context);
+            computeEValue(m, records[q].qLength, context);
         }
     }
 
diff --git a/tests/blast/test_blast_statistics.h b/tests/blast/test_blast_statistics.h
index 497c8e8..1e02707 100644
--- a/tests/blast/test_blast_statistics.h
+++ b/tests/blast/test_blast_statistics.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/consensus/test_consensus.cpp b/tests/consensus/test_consensus.cpp
index b57c79d..aac56a3 100644
--- a/tests/consensus/test_consensus.cpp
+++ b/tests/consensus/test_consensus.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/consensus/test_consensus.h b/tests/consensus/test_consensus.h
index 31d0257..952d275 100644
--- a/tests/consensus/test_consensus.h
+++ b/tests/consensus/test_consensus.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                              test_consensus.h
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -250,8 +250,7 @@ SEQAN_DEFINE_TEST(test_consensus_host_weightedconsensus_score)
 SEQAN_DEFINE_TEST(test_consensus_write_celera_cgb)
 {
     // Get path to input files.
-    seqan::CharString inPathSam = SEQAN_PATH_TO_ROOT();
-    append(inPathSam, "/tests/consensus/toy.sam");
+    seqan::CharString inPathSam = seqan::getAbsolutePath("/tests/consensus/toy.sam");
     // Get path to temporary file.
     seqan::CharString outPathCgb = SEQAN_TEMP_FILENAME();
 
@@ -266,16 +265,14 @@ SEQAN_DEFINE_TEST(test_consensus_write_celera_cgb)
     fCgbOut.close();
 
     // Compare result.
-    seqan::CharString goldPathCgb = SEQAN_PATH_TO_ROOT();
-    append(goldPathCgb, "/tests/consensus/sam_to_cgb_result.cgb");
+    seqan::CharString goldPathCgb = seqan::getAbsolutePath("/tests/consensus/sam_to_cgb_result.cgb");
     SEQAN_ASSERT(seqan::_compareTextFilesAlt(toCString(outPathCgb), toCString(goldPathCgb)));
 }
 
 SEQAN_DEFINE_TEST(test_consensus_write_celera_frg)
 {
     // Get path to input files.
-    seqan::CharString inPathSam = SEQAN_PATH_TO_ROOT();
-    append(inPathSam, "/tests/consensus/toy.sam");
+    seqan::CharString inPathSam = seqan::getAbsolutePath("/tests/consensus/toy.sam");
     // Get path to temporary file.
     seqan::CharString outPathFrg = SEQAN_TEMP_FILENAME();
 
@@ -290,18 +287,15 @@ SEQAN_DEFINE_TEST(test_consensus_write_celera_frg)
     fFrgOut.close();
 
     // Compare result.
-    seqan::CharString goldPathFrg = SEQAN_PATH_TO_ROOT();
-    append(goldPathFrg, "/tests/consensus/sam_to_frg_result.frg");
+    seqan::CharString goldPathFrg = seqan::getAbsolutePath("/tests/consensus/sam_to_frg_result.frg");
     SEQAN_ASSERT(seqan::_compareTextFiles(toCString(outPathFrg), toCString(goldPathFrg)));
 }
 
 SEQAN_DEFINE_TEST(test_consensus_write_fasta_read_format)
 {
     // Get path to input files.
-    seqan::CharString inPathSam = SEQAN_PATH_TO_ROOT();
-    append(inPathSam, "/tests/consensus/toy.sam");
-    seqan::CharString inPathFasta = SEQAN_PATH_TO_ROOT();
-    append(inPathFasta, "/tests/consensus/toy.fa");
+    seqan::CharString inPathSam = seqan::getAbsolutePath("/tests/consensus/toy.sam");
+    seqan::CharString inPathFasta = seqan::getAbsolutePath( "/tests/consensus/toy.fa");
     // Get path to temporary file.
     seqan::CharString outPathFasta = SEQAN_TEMP_FILENAME();
 
@@ -317,16 +311,14 @@ SEQAN_DEFINE_TEST(test_consensus_write_fasta_read_format)
     fFastaOut.close();
 
     // Compare result.
-    seqan::CharString goldPathFasta = SEQAN_PATH_TO_ROOT();
-    append(goldPathFasta, "/tests/consensus/sam_to_fasta_read_result.fa");
+    seqan::CharString goldPathFasta = seqan::getAbsolutePath("/tests/consensus/sam_to_fasta_read_result.fa");
     SEQAN_ASSERT(seqan::_compareTextFiles(toCString(outPathFasta), toCString(goldPathFasta)));
 }
 
 SEQAN_DEFINE_TEST(test_consensus_convert_simple_read_file)
 {
     // Get path to input files.
-    seqan::CharString inPathFasta = SEQAN_PATH_TO_ROOT();
-    append(inPathFasta, "/tests/consensus/simulated_reads.fasta");
+    seqan::CharString inPathFasta = seqan::getAbsolutePath("/tests/consensus/simulated_reads.fasta");
     std::string filePath(toCString(inPathFasta));
     // Get path to temporary file.
     std::string outPathSam = (std::string)SEQAN_TEMP_FILENAME() + ".sam";
@@ -343,8 +335,7 @@ SEQAN_DEFINE_TEST(test_consensus_convert_simple_read_file)
     close(fSamOut);
 
     // Compare result.
-    seqan::CharString goldPathSam = SEQAN_PATH_TO_ROOT();
-    append(goldPathSam, "/tests/consensus/reads_to_sam_read_result.sam");
+    seqan::CharString goldPathSam = seqan::getAbsolutePath("/tests/consensus/reads_to_sam_read_result.sam");
     SEQAN_ASSERT(seqan::_compareTextFiles(outPathSam.c_str(), toCString(goldPathSam)));
 }
 
diff --git a/tests/consensus/test_consensus_realign.h b/tests/consensus/test_consensus_realign.h
index 12bcc28..3c7463d 100644
--- a/tests/consensus/test_consensus_realign.h
+++ b/tests/consensus/test_consensus_realign.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                              test_consensus.h
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -48,8 +48,7 @@ SEQAN_DEFINE_TEST(test_consensus_realign_one_contig_small)
     //
     // There are many superfluous gaps in the SAM file that we will get rid of below.
     seqan::FragmentStore<> store;
-    seqan::CharString samPath = SEQAN_PATH_TO_ROOT();
-    append(samPath, "/tests/consensus/small_example.sam");
+    seqan::CharString samPath = seqan::getAbsolutePath("/tests/consensus/small_example.sam");
     seqan::BamFileIn fSamIn(toCString(samPath));
     readRecords(store, fSamIn);
 
@@ -61,7 +60,7 @@ SEQAN_DEFINE_TEST(test_consensus_realign_one_contig_small)
     seqan::Score<int, seqan::WeightedConsensusScore<
                           seqan::Score<int, seqan::FractionalScore>,
                           seqan::Score<int, seqan::ConsensusScore> > > combinedScore;
-    reAlign(store, combinedScore, 0, 1, 30, false);
+    reAlignment(store, 0, 1, 30, false);
 
     layoutAlignment(layout, store);
     std::stringstream ss;
diff --git a/tests/consensus_v2/test_consensus_v2.cpp b/tests/consensus_v2/test_consensus_v2.cpp
index 98c7d60..f666542 100644
--- a/tests/consensus_v2/test_consensus_v2.cpp
+++ b/tests/consensus_v2/test_consensus_v2.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/find/test_find.cpp b/tests/find/test_find.cpp
index a6eeb59..1563ebb 100644
--- a/tests/find/test_find.cpp
+++ b/tests/find/test_find.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/find/test_find_hamming.h b/tests/find/test_find_hamming.h
index 68a461c..8f35ba7 100644
--- a/tests/find/test_find_hamming.h
+++ b/tests/find/test_find_hamming.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/find/test_find_myers_banded.h b/tests/find/test_find_myers_banded.h
index 45675b4..28ce239 100755
--- a/tests/find/test_find_myers_banded.h
+++ b/tests/find/test_find_myers_banded.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/gff_io/test_gff_io.cpp b/tests/gff_io/test_gff_io.cpp
index 7910abd..0bb5471 100644
--- a/tests/gff_io/test_gff_io.cpp
+++ b/tests/gff_io/test_gff_io.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/gff_io/test_gff_io.h b/tests/gff_io/test_gff_io.h
index 342840c..c661f8f 100644
--- a/tests/gff_io/test_gff_io.h
+++ b/tests/gff_io/test_gff_io.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -44,8 +44,7 @@ using namespace seqan;
 
 SEQAN_DEFINE_TEST(test_store_io_read_record_context_gff)
 {
-    CharString gffPath = SEQAN_PATH_TO_ROOT();
-    append(gffPath, "/tests/gff_io/example.gff");
+    CharString gffPath = getAbsolutePath("/tests/gff_io/example.gff");
 
     String<char, MMap<> > inString;
     open(inString, toCString(gffPath));
@@ -102,8 +101,7 @@ SEQAN_DEFINE_TEST(test_store_io_read_record_context_gff)
 
 SEQAN_DEFINE_TEST(test_store_io_write_record_context_gff)
 {
-    CharString gffPath = SEQAN_PATH_TO_ROOT();
-    append(gffPath, "/tests/gff_io/example.gff");
+    CharString gffPath = getAbsolutePath("/tests/gff_io/example.gff");
 
     String<char, MMap<> > inString;
     open(inString, toCString(gffPath));
@@ -125,8 +123,7 @@ SEQAN_DEFINE_TEST(test_store_io_write_record_context_gff)
         ++count;
     }
 
-    String<char> goldPath = SEQAN_PATH_TO_ROOT();
-    append(goldPath, "/tests/gff_io/example_context.gff");
+    String<char> goldPath = getAbsolutePath("/tests/gff_io/example_context.gff");
     String<char, MMap<> > goldString;
     open(goldString, toCString(goldPath));
 
@@ -135,10 +132,8 @@ SEQAN_DEFINE_TEST(test_store_io_write_record_context_gff)
 
 SEQAN_DEFINE_TEST(test_store_io_comment_processing_context_gff)
 {
-    CharString gffPath = SEQAN_PATH_TO_ROOT();
-
     // slightly modified version of "example.gff". 3 lines of comments are included.
-    append(gffPath, "/tests/gff_io/example_with_comments.gff");
+    CharString gffPath = getAbsolutePath("/tests/gff_io/example_with_comments.gff");
 
     String<char, MMap<> > inString;
     open(inString, toCString(gffPath));
@@ -196,8 +191,7 @@ SEQAN_DEFINE_TEST(test_store_io_comment_processing_context_gff)
 // Complex GTF format, from pseudogenes.org
 SEQAN_DEFINE_TEST(test_store_io_read_record_gtf_pseudogenes)
 {
-    CharString gtfPath = SEQAN_PATH_TO_ROOT();
-    append(gtfPath, "/tests/gff_io/example_pseudogenes.gtf");
+    CharString gtfPath = getAbsolutePath("/tests/gff_io/example_pseudogenes.gtf");
 
     String<char, MMap<> > inString;
     open(inString, toCString(gtfPath));
@@ -263,8 +257,7 @@ SEQAN_DEFINE_TEST(test_store_io_read_record_gtf_pseudogenes)
 
 SEQAN_DEFINE_TEST(test_store_io_read_record_context_gtf)
 {
-    CharString gtfPath = SEQAN_PATH_TO_ROOT();
-    append(gtfPath, "/tests/gff_io/example.gtf");
+    CharString gtfPath = getAbsolutePath("/tests/gff_io/example.gtf");
 
     String<char, MMap<> > inString;
     open(inString, toCString(gtfPath));
@@ -320,8 +313,7 @@ SEQAN_DEFINE_TEST(test_store_io_read_record_context_gtf)
 
 SEQAN_DEFINE_TEST(test_store_io_write_record_context_gtf)
 {
-    CharString gtfPath = SEQAN_PATH_TO_ROOT();
-    append(gtfPath, "/tests/gff_io/example.gtf");
+    CharString gtfPath = getAbsolutePath("/tests/gff_io/example.gtf");
 
     String<char, MMap<> > inString;
     open(inString, toCString(gtfPath));
@@ -347,8 +339,7 @@ SEQAN_DEFINE_TEST(test_store_io_write_record_context_gtf)
         appendValue(temp, 'A');
     }
 
-    String<char> goldPath = SEQAN_PATH_TO_ROOT();
-    append(goldPath, "/tests/gff_io/example_context.gtf");
+    String<char> goldPath = getAbsolutePath("/tests/gff_io/example_context.gtf");
     String<char, MMap<> > goldString;
     open(goldString, toCString(goldPath));
 
@@ -357,8 +348,7 @@ SEQAN_DEFINE_TEST(test_store_io_write_record_context_gtf)
 
 SEQAN_DEFINE_TEST(test_store_io_gff_stream_read_record_gff)
 {
-    CharString gffPath = SEQAN_PATH_TO_ROOT();
-    append(gffPath, "/tests/gff_io/example.gff");
+    CharString gffPath = getAbsolutePath("/tests/gff_io/example.gff");
 
     GffFileIn gffStream(toCString(gffPath));
 
@@ -411,8 +401,7 @@ SEQAN_DEFINE_TEST(test_store_io_gff_stream_read_record_gff)
 
 SEQAN_DEFINE_TEST(test_store_io_gff_stream_read_record_gtf)
 {
-    CharString gffPath = SEQAN_PATH_TO_ROOT();
-    append(gffPath, "/tests/gff_io/example.gtf");
+    CharString gffPath = getAbsolutePath("/tests/gff_io/example.gtf");
 
     GffFileIn gffStream(toCString(gffPath));
 
@@ -463,8 +452,7 @@ SEQAN_DEFINE_TEST(test_store_io_gff_stream_read_record_gtf)
 
 SEQAN_DEFINE_TEST(test_store_io_gff_stream_write_record_gff)
 {
-    CharString gtfPath = SEQAN_PATH_TO_ROOT();
-    append(gtfPath, "/tests/gff_io/example.gff");
+    CharString gtfPath = getAbsolutePath("/tests/gff_io/example.gff");
 
     GffFileIn inStream(toCString(gtfPath));
 
@@ -487,8 +475,7 @@ SEQAN_DEFINE_TEST(test_store_io_gff_stream_write_record_gff)
 
 SEQAN_DEFINE_TEST(test_store_io_gff_stream_write_record_gtf)
 {
-    CharString gtfPath = SEQAN_PATH_TO_ROOT();
-    append(gtfPath, "/tests/gff_io/example.gtf");
+    CharString gtfPath = getAbsolutePath("/tests/gff_io/example.gtf");
 
     GffFileIn inStream(toCString(gtfPath));
 
diff --git a/tests/graph_algorithms/test_graph_algorithms.cpp b/tests/graph_algorithms/test_graph_algorithms.cpp
index 61ab2bb..4cabc8c 100644
--- a/tests/graph_algorithms/test_graph_algorithms.cpp
+++ b/tests/graph_algorithms/test_graph_algorithms.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/graph_algorithms/test_graph_algorithms.h b/tests/graph_algorithms/test_graph_algorithms.h
index bc3441e..8438522 100644
--- a/tests/graph_algorithms/test_graph_algorithms.h
+++ b/tests/graph_algorithms/test_graph_algorithms.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/graph_align/test_graph_align.cpp b/tests/graph_align/test_graph_align.cpp
index e0a82ff..e45e97a 100644
--- a/tests/graph_align/test_graph_align.cpp
+++ b/tests/graph_align/test_graph_align.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/graph_align/test_graph_impl_align.h b/tests/graph_align/test_graph_impl_align.h
index 22dcef6..ae599ef 100644
--- a/tests/graph_align/test_graph_impl_align.h
+++ b/tests/graph_align/test_graph_impl_align.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/graph_align/test_graph_match_refinement.h b/tests/graph_align/test_graph_match_refinement.h
index 3cf69ff..2450c2f 100644
--- a/tests/graph_align/test_graph_match_refinement.h
+++ b/tests/graph_align/test_graph_match_refinement.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/graph_msa/test_graph_msa.cpp b/tests/graph_msa/test_graph_msa.cpp
index bc1579e..2725024 100644
--- a/tests/graph_msa/test_graph_msa.cpp
+++ b/tests/graph_msa/test_graph_msa.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/graph_msa/test_graph_msa_guide_tree.h b/tests/graph_msa/test_graph_msa_guide_tree.h
index 41724c7..6506293 100644
--- a/tests/graph_msa/test_graph_msa_guide_tree.h
+++ b/tests/graph_msa/test_graph_msa_guide_tree.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/graph_msa/test_graph_tcoffee.h b/tests/graph_msa/test_graph_tcoffee.h
index f7b75fb..870f5f2 100644
--- a/tests/graph_msa/test_graph_tcoffee.h
+++ b/tests/graph_msa/test_graph_tcoffee.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/graph_types/test_graph_types_basic.cpp b/tests/graph_types/test_graph_types_basic.cpp
index 86b0ce2..012e38c 100644
--- a/tests/graph_types/test_graph_types_basic.cpp
+++ b/tests/graph_types/test_graph_types_basic.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/graph_types/test_graph_types_derived.cpp b/tests/graph_types/test_graph_types_derived.cpp
index e0ce202..163ccef 100644
--- a/tests/graph_types/test_graph_types_derived.cpp
+++ b/tests/graph_types/test_graph_types_derived.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/graph_types/test_graph_types_iterators.cpp b/tests/graph_types/test_graph_types_iterators.cpp
index 01c207a..a60381c 100644
--- a/tests/graph_types/test_graph_types_iterators.cpp
+++ b/tests/graph_types/test_graph_types_iterators.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/graph_types/test_graph_types_property_map.cpp b/tests/graph_types/test_graph_types_property_map.cpp
index 787ba45..dbc54d7 100644
--- a/tests/graph_types/test_graph_types_property_map.cpp
+++ b/tests/graph_types/test_graph_types_property_map.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/graph_types/test_graph_types_types.cpp b/tests/graph_types/test_graph_types_types.cpp
index b782697..5827718 100644
--- a/tests/graph_types/test_graph_types_types.cpp
+++ b/tests/graph_types/test_graph_types_types.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/graph_types/test_graph_types_utils.cpp b/tests/graph_types/test_graph_types_utils.cpp
index 166499e..cf57a42 100644
--- a/tests/graph_types/test_graph_types_utils.cpp
+++ b/tests/graph_types/test_graph_types_utils.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/index/CMakeLists.txt b/tests/index/CMakeLists.txt
index eed4089..ad1c9e3 100644
--- a/tests/index/CMakeLists.txt
+++ b/tests/index/CMakeLists.txt
@@ -141,6 +141,11 @@ add_executable (test_find_backtracking
                 test_find_base.h)
 target_link_libraries (test_find_backtracking ${SEQAN_LIBRARIES})
 
+add_executable (test_find2_index_approx
+                test_find2_index_approx.cpp
+                test_find2_index_approx.h)
+target_link_libraries (test_find2_index_approx ${SEQAN_LIBRARIES})
+
 add_executable (test_index_repeats
                test_index_repeats.cpp
                test_index_repeats.h)
@@ -180,4 +185,3 @@ add_test (NAME test_test_index_view COMMAND $<TARGET_FILE:test_index_view>)
 add_test (NAME test_test_index_finder COMMAND $<TARGET_FILE:test_index_finder>)
 add_test (NAME test_test_find_backtracking COMMAND $<TARGET_FILE:test_find_backtracking>)
 add_test (NAME test_test_index_repeats COMMAND $<TARGET_FILE:test_index_repeats>)
-
diff --git a/tests/index/test_crosscompare.h b/tests/index/test_crosscompare.h
index b173590..90d4632 100644
--- a/tests/index/test_crosscompare.h
+++ b/tests/index/test_crosscompare.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/tabix_io/test_tabix_io.cpp b/tests/index/test_find2_index_approx.cpp
similarity index 78%
copy from tests/tabix_io/test_tabix_io.cpp
copy to tests/index/test_find2_index_approx.cpp
index ad3124a..0644b46 100644
--- a/tests/tabix_io/test_tabix_io.cpp
+++ b/tests/index/test_find2_index_approx.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -12,14 +12,14 @@
 //     * Redistributions in binary form must reproduce the above copyright
 //       notice, this list of conditions and the following disclaimer in the
 //       documentation and/or other materials provided with the distribution.
-//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//     * Neither the name of NVIDIA Corporation nor the names of
 //       its contributors may be used to endorse or promote products derived
 //       from this software without specific prior written permission.
 //
 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// ARE DISCLAIMED. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE
 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
@@ -29,17 +29,18 @@
 // DAMAGE.
 //
 // ==========================================================================
-// Author: David Weese <david.weese at fu-berlin.de>
+// Author: Christopher Pockrandt <github at cpockrandt.de>
 // ==========================================================================
 
 #include <seqan/basic.h>
-#include <seqan/file.h>
 
-#include "test_tabix_io.h"
+#include "test_find2_index_approx.h"
 
-
-SEQAN_BEGIN_TESTSUITE(test_tabix_io)
+SEQAN_BEGIN_TESTSUITE(test_find_index_approx)
 {
-    SEQAN_CALL_TEST(test_tabix_io_read_indexed_vcf);
+    // Call tests.
+    SEQAN_CALL_TEST(test_find2_index_approx_hamming);
+    SEQAN_CALL_TEST(test_find2_index_approx_edit);
+    SEQAN_CALL_TEST(test_find2_index_approx_small_test);
 }
 SEQAN_END_TESTSUITE
diff --git a/tests/index/test_find2_index_approx.h b/tests/index/test_find2_index_approx.h
new file mode 100644
index 0000000..ae2631c
--- /dev/null
+++ b/tests/index/test_find2_index_approx.h
@@ -0,0 +1,489 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of NVIDIA Corporation nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Christopher Pockrandt <github at cpockrandt.de>
+// ==========================================================================
+
+#ifndef TESTS_FIND2_INDEX_APPROX_H_
+#define TESTS_FIND2_INDEX_APPROX_H_
+
+#include <mutex>
+#include <ctime>
+
+#include <seqan/index.h>
+
+#include "test_index_helpers.h"
+
+using namespace seqan;
+
+// ============================================================================
+// Functions
+// ============================================================================
+
+template <typename TChar, typename TConfig>
+void generateText(String<TChar, TConfig> & text, unsigned const length)
+{
+    unsigned alphabetSize = ValueSize<TChar>::VALUE;
+    unsigned minChar = MinValue<TChar>::VALUE;
+
+    resize(text, length);
+
+    for (unsigned i = 0; i < length; ++i)
+    {
+        text[i] = std::rand() % alphabetSize - minChar;
+    }
+}
+
+template< typename TContainer>
+inline void printVector(const TContainer & c, std::ostream & stream)
+{
+    using T = std::decay_t<decltype(c[0])>;
+    stream << "[";
+    for (uint8_t i = 0; i < c.size(); ++i)
+    {
+        stream << (std::is_same<T, uint8_t>::value ? (unsigned) c[i] : c[i])
+               << ((i < c.size() - 1) ? ", " : "");
+    }
+    stream << "]" << std::endl;
+}
+
+template <size_t nbrBlocks>
+inline void printSearch(OptimalSearch<nbrBlocks> const & s, std::ostream & stream)
+{
+    stream << "SearchScheme (Pi): ";
+    printVector(s.pi, stream);
+    stream << "SearchScheme (L): ";
+    printVector(s.l, stream);
+    stream << "SearchScheme (U): ";
+    printVector(s.u, stream);
+    stream << "SearchScheme (BL): ";
+    printVector(s.blocklength, stream);
+}
+
+inline void _getErrorDistributions(std::vector<std::vector<uint8_t> > & res,
+                                   std::vector<uint8_t> l,
+                                   std::vector<uint8_t> u,
+                                   uint8_t const e)
+{
+    if (l.size() == 0)
+    {
+        std::vector<uint8_t> emptyVector;
+        res.push_back(emptyVector);
+        return;
+    }
+
+    uint8_t l1 = l[0];
+    uint8_t u1 = u[0];
+    l.erase(l.begin());
+    u.erase(u.begin());
+
+    for (uint8_t i = std::max(e, l1); i <= u1; ++i)
+    {
+        std::vector<std::vector<uint8_t> > _res;
+        _getErrorDistributions(_res, l, u, i);
+        for (auto & _resElem : _res)
+        {
+            _resElem.insert(_resElem.begin(), i - e);
+            res.push_back(_resElem);
+        }
+    }
+}
+
+// Compute all possible error distributions given a search.
+// The result is ordered as the search (s.pi)
+template <size_t nbrBlocks>
+inline void getErrorDistributions(std::vector<std::vector<uint8_t> > & res,
+                                  OptimalSearch<nbrBlocks> const & s)
+{
+    std::vector<uint8_t> l(s.l.begin(), s.l.end());
+    std::vector<uint8_t> u(s.u.begin(), s.u.end());
+    _getErrorDistributions(res, l, u, 0u);
+}
+
+// Reorder blocks s.t. they are in a sequential order (from left to right)
+template <size_t nbrBlocks, typename T>
+inline void orderVector(OptimalSearch<nbrBlocks> const & s, std::vector<T> & v)
+{
+    std::vector<T> v_tmp = v;
+    for (uint8_t i = 0; i < s.pi.size(); ++i)
+    {
+        uint8_t index = s.pi[i] - 1;
+        v[index] = v_tmp[i];
+    }
+}
+
+// Reorder blocks s.t. they are in a sequential order (from left to right)
+// Blocklength is stored as absolute values instead of cumulative values.
+template <size_t nbrBlocks>
+inline void getOrderedSearch(OptimalSearch<nbrBlocks> const & s, OptimalSearch<nbrBlocks> & os)
+{
+    for (uint8_t i = 0; i < s.pi.size(); ++i)
+    {
+        uint8_t index = s.pi[i] - 1;
+        os.pi[index] = s.pi[i];
+        os.l[index] = s.l[i];
+        os.u[index] = s.u[i];
+        os.blocklength[index] = s.blocklength[i] - ((i > 0) ? s.blocklength[i - 1] : 0);
+    }
+}
+
+// Trivial backtracking that finds *all* matches with given distance.
+template <typename TDelegate, typename TText, typename TIndex,
+          typename TIndexSpec, typename TText2, typename TNeedleIter>
+inline void trivialSearch(TDelegate && delegate,
+                          Iter<Index<TText, TIndex>, VSTree<TopDown<TIndexSpec> > > it,
+                          TText2 const & needle,
+                          TNeedleIter const needleIt,
+                          uint8_t const errorsLeft,
+                          bool const indels)
+{
+    if (errorsLeft == 0)
+    {
+        if (goDown(it, suffix(needle, position(needleIt, needle)), Rev()))
+            delegate(it);
+        return;
+    }
+
+    if (atEnd(needleIt, needle))
+    {
+        delegate(it);
+        if (!(indels && errorsLeft > 0))
+            return;
+    }
+
+    // Insertion
+    if (indels && !atEnd(needleIt, needle))
+        trivialSearch(delegate, it, needle, needleIt + 1, errorsLeft - 1, indels);
+
+    if (goDown(it, Rev()))
+    {
+        do
+        {
+            // Match / Mismatch
+            if (!atEnd(needleIt, needle))
+            {
+                auto delta = !ordEqual(parentEdgeLabel(it, Rev()), value(needleIt));
+                trivialSearch(delegate, it, needle, needleIt + 1, errorsLeft - delta, indels);
+            }
+
+            // Deletion
+            if (indels)
+                trivialSearch(delegate, it, needle, needleIt, errorsLeft - 1, indels);
+
+        } while (goRight(it, Rev()));
+    }
+}
+
+// Compute random blocklengths (order: left to right)
+template <size_t nbrBlocks, size_t N>
+inline void setRandomBlockLength(std::array<OptimalSearch<nbrBlocks>, N> & ss, uint32_t needleLength)
+{
+    std::vector<uint32_t> blocklength(ss[0].pi.size());
+
+    // Set minimum length for each block considerung all searches.
+    uint8_t maxErrors = 0;
+    for (auto const & s : ss)
+        maxErrors = std::max(maxErrors, s.u.back());
+    // NOTE(cpockrandt): this enforces to be the needles much longer than necessary!
+    for (uint8_t i = 0; i < blocklength.size(); ++i)
+        blocklength[i] = maxErrors;
+    needleLength -= maxErrors * blocklength.size();
+
+    // Randomly distribute the rest on all blocks
+    while (needleLength > 0)
+    {
+        ++blocklength[std::rand() % blocklength.size()];
+        --needleLength;
+    }
+
+    _optimalSearchSchemeSetBlockLength(ss, blocklength);
+    _optimalSearchSchemeInit(ss);
+}
+
+template <typename TText, typename TIndex, typename TIndexSpec, size_t nbrBlocks, typename TDistanceTag>
+inline void testOptimalSearch(Iter<Index<TText, BidirectionalIndex<TIndex> >, VSTree<TopDown<TIndexSpec> > > it,
+                              OptimalSearch<nbrBlocks> const & s,
+                              OptimalSearch<nbrBlocks> const & os,
+                              unsigned const needleLength,
+                              std::vector<uint8_t> const & errorDistribution,
+                              time_t const seed,
+                              TDistanceTag const & /**/)
+{
+    typedef typename Value<TText>::Type TChar;
+    typedef Iter<Index<TText, BidirectionalIndex<TIndex> >, VSTree<TopDown<TIndexSpec> > >  TIt;
+
+    TText & text = indexText(container(it.fwdIter));
+
+    unsigned pos = std::rand() % (length(text) - needleLength + 1);
+    TText origNeedle(infix(text, pos, pos + needleLength));
+
+    // Modify needle s.t. it has errors matching errorDistribution.
+    TText needle(origNeedle);
+    uint32_t cumulativeBlocklength = 0;
+    for (uint8_t block = 0; block < s.pi.size(); ++block)
+    {
+        uint32_t blocklength = os.blocklength[block];
+        if (errorDistribution[block] > blocklength)
+        {
+            std::stringstream stream;
+            stream << "Error in block " << (unsigned) block << "(+ 1): "
+                   << (unsigned) errorDistribution[block]
+                   << " errors cannot fit into a block of length "
+                   << (unsigned) blocklength << "." << std::endl;
+            stream << "Error Distribution: ";
+            printVector(errorDistribution, stream);
+            printSearch(s, stream);
+            printSearch(os, stream);
+            SEQAN_ASSERT_FAIL(toCString(stream.str()));
+        }
+
+        // choose random positions in needle that will be a mismatch/indel
+        // repeat until all error positions are unique
+        std::vector<uint8_t> errorPositions(errorDistribution[block]);
+        do
+        {
+            clear(errorPositions);
+            for (uint8_t error = 0; error < errorDistribution[block]; ++error)
+                errorPositions.push_back(std::rand() % blocklength);
+            sort(errorPositions.begin(), errorPositions.end());
+        } while (adjacent_find(errorPositions.begin(), errorPositions.end()) != errorPositions.end());
+
+        // construct needle with chosen error positions
+        for (unsigned error = 0; error < errorPositions.size(); ++error)
+        {
+            unsigned pos = errorPositions[error] + cumulativeBlocklength;
+            TChar newChar;
+            do
+            {
+                newChar = TChar(std::rand() % ValueSize<TChar>::VALUE);
+            } while(needle[pos] == newChar);
+            needle[pos] = newChar;
+        }
+        cumulativeBlocklength += blocklength;
+    }
+
+    std::vector<unsigned> hits, expectedHitsSS, expectedHitsTrivial;
+    auto delegate = [&hits](TIt const & it, TText const & /*needle*/, uint8_t /*errors*/)
+    {
+        for (unsigned i = 0; i < length(getOccurrences(it)); ++i)
+            hits.push_back(getOccurrences(it)[i]);
+    };
+    auto delegateTrivial = [&hits](TIt const & it)
+    {
+        for (unsigned i = 0; i < length(getOccurrences(it)); ++i)
+            hits.push_back(getOccurrences(it)[i]);
+    };
+
+    // Find all hits using search schemes.
+    _optimalSearchScheme(delegate, it, needle, s, TDistanceTag());
+    for (unsigned hit : hits)
+        if (infix(text, hit, hit + needleLength) == origNeedle)
+            expectedHitsSS.push_back(hit);
+
+    // Find all hits using trivial backtracking.
+    clear(hits);
+    uint8_t maxErrors = s.u.back();
+    trivialSearch(delegateTrivial, it, needle, begin(needle, Standard()), maxErrors, std::is_same<TDistanceTag, EditDistance>::value);
+    for (unsigned hit : hits)
+    {
+        // filter only correct error distributions
+        if (origNeedle == infix(text, hit, hit + needleLength))
+        {
+            bool distributionOkay = true;
+            unsigned leftRange = 0, rightRange = 0;
+            for (unsigned block = 0; block < s.pi.size(); ++block)
+            {
+                rightRange += os.blocklength[block];
+
+                uint8_t errors = 0;
+                for (unsigned i = leftRange; i < rightRange; ++i)
+                    if (hit + i >= length(text))
+                        ++errors;
+                    else
+                        errors += !ordEqual(needle[i], text[hit + i]);
+                if (errors != errorDistribution[block])
+                    distributionOkay = false;
+                leftRange += os.blocklength[block];
+            }
+            if (distributionOkay || std::is_same<TDistanceTag, EditDistance>::value)
+                expectedHitsTrivial.push_back(hit);
+        }
+    }
+
+    // eliminate duplicates
+    sort(expectedHitsSS.begin(), expectedHitsSS.end());
+    sort(expectedHitsTrivial.begin(), expectedHitsTrivial.end());
+    expectedHitsSS.erase(unique(expectedHitsSS.begin(), expectedHitsSS.end()), expectedHitsSS.end());
+    expectedHitsTrivial.erase(unique(expectedHitsTrivial.begin(), expectedHitsTrivial.end()), expectedHitsTrivial.end());
+
+    if (expectedHitsSS != expectedHitsTrivial)
+    {
+        std::stringstream stream;
+        stream << "Seed: " << seed << std::endl
+               << "Text: " << text << std::endl
+               << "ErrorDistribution: ";
+        printVector(errorDistribution, stream);
+        stream << "Original: " << origNeedle << std::endl
+               << "Modified: " << needle << std::endl
+               << "ExpectedHitsSS: ";
+        printVector(expectedHitsSS, stream);
+        stream << "ExpectedHitsTrivial: ";
+        printVector(expectedHitsTrivial, stream);
+        printSearch(s, stream);
+        SEQAN_ASSERT_FAIL(toCString(stream.str()));
+    }
+}
+
+template <size_t nbrBlocks, size_t N, typename TDistanceTag>
+inline void testOptimalSearchScheme(std::array<OptimalSearch<nbrBlocks>, N> ss, TDistanceTag const & /**/)
+{
+    typedef DnaString TText;
+    typedef FastFMIndexConfig<void, uint32_t, 2, 1> TMyFastConfig;
+    typedef Index<TText, BidirectionalIndex<FMIndex<void, TMyFastConfig> > > TIndex;
+    typedef Iter<TIndex, VSTree<TopDown<> > > TIter;
+
+    time_t seed = std::time(nullptr);
+    std::srand(seed);
+
+    TText text;
+    std::array<OptimalSearch<nbrBlocks>, N> os;
+    std::vector<std::vector<std::vector<uint8_t> > > errorDistributions(ss.size());
+
+    // Calculate all error distributions and sort each of them (from left to right).
+    uint8_t errors = 0;
+    for (uint8_t schemeId = 0; schemeId < ss.size(); ++schemeId)
+    {
+        os[schemeId] = ss[schemeId];
+        getErrorDistributions(errorDistributions[schemeId], ss[schemeId]);
+        for (std::vector<uint8_t> & resElem : errorDistributions[schemeId])
+            orderVector(ss[schemeId], resElem);
+        errors = std::max(errors, ss[schemeId].u.back());
+    }
+
+    for (uint32_t textLength = 10; textLength < 10000; textLength *= 10)
+    {
+        generateText(text, textLength);
+        TIndex index(text);
+        TIter it(index);
+        for (uint16_t needleLength = std::max(static_cast<size_t>(5), ss[0].pi.size() * errors); needleLength < std::min(16u, textLength); ++needleLength)
+        {
+            setRandomBlockLength(ss, needleLength);
+
+            for (uint8_t schemeId = 0; schemeId < ss.size(); ++schemeId)
+                getOrderedSearch(ss[schemeId], os[schemeId]);
+
+            for (uint8_t schemeId = 0; schemeId < ss.size(); ++schemeId)
+                for (auto & errorDistribution : errorDistributions[schemeId])
+                    testOptimalSearch(it, ss[schemeId], os[schemeId], needleLength, errorDistribution, seed, TDistanceTag());
+        }
+    }
+}
+
+// ============================================================================
+// Tests
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// Test test_find2_index_approx_hamming
+// ----------------------------------------------------------------------------
+
+SEQAN_DEFINE_TEST(test_find2_index_approx_hamming)
+{
+    testOptimalSearchScheme(OptimalSearchSchemes<0, 0>::VALUE, HammingDistance());
+    testOptimalSearchScheme(OptimalSearchSchemes<0, 1>::VALUE, HammingDistance());
+    testOptimalSearchScheme(OptimalSearchSchemes<0, 2>::VALUE, HammingDistance());
+    testOptimalSearchScheme(OptimalSearchSchemes<0, 3>::VALUE, HammingDistance());
+    testOptimalSearchScheme(OptimalSearchSchemes<0, 4>::VALUE, HammingDistance());
+    testOptimalSearchScheme(OptimalSearchSchemes<1, 1>::VALUE, HammingDistance());
+    testOptimalSearchScheme(OptimalSearchSchemes<1, 2>::VALUE, HammingDistance());
+    testOptimalSearchScheme(OptimalSearchSchemes<1, 3>::VALUE, HammingDistance());
+    testOptimalSearchScheme(OptimalSearchSchemes<1, 4>::VALUE, HammingDistance());
+    testOptimalSearchScheme(OptimalSearchSchemes<2, 2>::VALUE, HammingDistance());
+    testOptimalSearchScheme(OptimalSearchSchemes<2, 3>::VALUE, HammingDistance());
+    testOptimalSearchScheme(OptimalSearchSchemes<2, 4>::VALUE, HammingDistance());
+    testOptimalSearchScheme(OptimalSearchSchemes<3, 3>::VALUE, HammingDistance());
+    testOptimalSearchScheme(OptimalSearchSchemes<3, 4>::VALUE, HammingDistance());
+    testOptimalSearchScheme(OptimalSearchSchemes<4, 4>::VALUE, HammingDistance());
+}
+
+// ----------------------------------------------------------------------------
+// Test test_find2_index_approx_edit
+// ----------------------------------------------------------------------------
+
+SEQAN_DEFINE_TEST(test_find2_index_approx_edit)
+{
+    testOptimalSearchScheme(OptimalSearchSchemes<0, 0>::VALUE, EditDistance());
+    testOptimalSearchScheme(OptimalSearchSchemes<0, 1>::VALUE, EditDistance());
+    testOptimalSearchScheme(OptimalSearchSchemes<0, 2>::VALUE, EditDistance());
+    testOptimalSearchScheme(OptimalSearchSchemes<0, 3>::VALUE, EditDistance());
+    testOptimalSearchScheme(OptimalSearchSchemes<0, 4>::VALUE, EditDistance());
+    testOptimalSearchScheme(OptimalSearchSchemes<1, 1>::VALUE, EditDistance());
+    testOptimalSearchScheme(OptimalSearchSchemes<1, 2>::VALUE, EditDistance());
+    testOptimalSearchScheme(OptimalSearchSchemes<1, 3>::VALUE, EditDistance());
+    testOptimalSearchScheme(OptimalSearchSchemes<1, 4>::VALUE, EditDistance());
+    testOptimalSearchScheme(OptimalSearchSchemes<2, 2>::VALUE, EditDistance());
+    testOptimalSearchScheme(OptimalSearchSchemes<2, 3>::VALUE, EditDistance());
+    testOptimalSearchScheme(OptimalSearchSchemes<2, 4>::VALUE, EditDistance());
+    testOptimalSearchScheme(OptimalSearchSchemes<3, 3>::VALUE, EditDistance());
+    testOptimalSearchScheme(OptimalSearchSchemes<3, 4>::VALUE, EditDistance());
+    testOptimalSearchScheme(OptimalSearchSchemes<4, 4>::VALUE, EditDistance());
+}
+
+SEQAN_DEFINE_TEST(test_find2_index_approx_small_test)
+{
+    DnaString genome(
+        "GAGAGGCCACTCGCAGGATTAAGTCAATAAGTTAATGGCGTCGGCTTCCTGGTATGTAGTACGACGCCCACAGTGACCTCATCGGTGCATTTCCTCATCGTAG"
+        "GCGGAACGGTAGACACAAGGCATGATGTCAAATCGCGACTCCAATCCCAAGGTCGCAAGCCTATATAGGAACCCGCTTATGCCCTCTAATCCCGGACAGACCC"
+        "CAAATATGGCATAGCTGGTTGGGGGTACCTACTAGGCACAGCCGGAAGCA");
+    StringSet<DnaString> needles;
+    appendValue(needles, "GGGGTTAT");
+    appendValue(needles, "CTAGCTAA");
+
+    std::set<unsigned> hits, expectedHits {186, 226, 227, 234};
+
+    std::mutex mtx;
+    auto delegate = [&hits, &mtx](auto & iter, DnaString const & /*pattern*/, uint8_t /*errors*/)
+    {
+        std::lock_guard<std::mutex> lck(mtx);
+        for (auto occ : getOccurrences(iter))
+            hits.insert(occ);
+    };
+    Index<DnaString, BidirectionalIndex<FMIndex<> > > index(genome);
+
+    find<1, 2>(delegate, index, needles, EditDistance(), Serial());
+    SEQAN_ASSERT(hits == expectedHits);
+
+    hits.clear();
+    find<1, 2>(delegate, index, needles, EditDistance(), Parallel());
+    SEQAN_ASSERT(hits == expectedHits);
+}
+
+#endif  // TESTS_FIND2_INDEX_APPROX_H_
diff --git a/tests/index/test_index_base.cpp b/tests/index/test_index_base.cpp
index 7639b1e..f9d674d 100644
--- a/tests/index/test_index_base.cpp
+++ b/tests/index/test_index_base.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/index/test_index_bifm.cpp b/tests/index/test_index_bifm.cpp
index 742835c..0f6bc97 100644
--- a/tests/index/test_index_bifm.cpp
+++ b/tests/index/test_index_bifm.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -32,8 +32,6 @@
 // Author: Christopher Pockrandt <christopher.pockrandt at fu-berlin.de>
 // ==========================================================================
 
-#include <seqan/basic.h>
-#include <seqan/reduced_aminoacid.h>
 #include <seqan/index.h>
 #include <ctime>
 
@@ -61,22 +59,14 @@ struct FMIndexWTConfig
     static const unsigned SAMPLING =                                        10;
 };
 
-typedef String<SimpleType<unsigned char, ReducedAminoAcid_<Murphy10> > > Murphy10String;
-
 typedef
     TagList<Index<String<bool>,   BidirectionalIndex<FMIndex<void, FMIndexConfigLevelsPrefix<> > > >,
     TagList<Index<DnaString,      BidirectionalIndex<FMIndex<void, FMIndexConfigLevelsPrefix<> > > >,
     TagList<Index<Dna5String,     BidirectionalIndex<FMIndex<void, FMIndexConfigLevelsPrefix<> > > >,
-    TagList<Index<Murphy10String, BidirectionalIndex<FMIndex<void, FMIndexConfigLevelsPrefix<> > > >,
-    TagList<Index<Peptide,        BidirectionalIndex<FMIndex<void, FMIndexConfigLevelsPrefix<> > > >,
-    TagList<Index<CharString,     BidirectionalIndex<FMIndex<void, FMIndexConfigLevelsPrefix<> > > >,
     TagList<Index<String<bool>,   BidirectionalIndex<FMIndex<void, FMIndexWTConfig<> > > >,
     TagList<Index<DnaString,      BidirectionalIndex<FMIndex<void, FMIndexWTConfig<> > > >,
-    TagList<Index<Dna5String,     BidirectionalIndex<FMIndex<void, FMIndexWTConfig<> > > >,
-    TagList<Index<Murphy10String, BidirectionalIndex<FMIndex<void, FMIndexWTConfig<> > > >,
-    TagList<Index<Peptide,        BidirectionalIndex<FMIndex<void, FMIndexWTConfig<> > > >,
-    TagList<Index<CharString,     BidirectionalIndex<FMIndex<void, FMIndexWTConfig<> > > >
-    > > > > > > > > > > > >
+    TagList<Index<Dna5String,     BidirectionalIndex<FMIndex<void, FMIndexWTConfig<> > > >
+    > > > > > >
     FMIndices;
 
 // ==========================================================================
@@ -172,6 +162,7 @@ SEQAN_TYPED_TEST(BidirectionalFMIndexTest, SearchInString)
     }
 }
 
+#ifndef __alpha__ // NOTE(h-2): fails on alpha for unknown reasons
 SEQAN_TYPED_TEST(BidirectionalFMIndexTest, SearchInStringSet)
 {
     typedef typename TestFixture::TIndex                        TIndex;
@@ -208,6 +199,7 @@ SEQAN_TYPED_TEST(BidirectionalFMIndexTest, SearchInStringSet)
         }
     }
 }
+#endif // __alpha__
 
 // ==========================================================================
 // Functions
diff --git a/tests/index/test_index_creation.cpp b/tests/index/test_index_creation.cpp
index 5ab8230..5088e19 100644
--- a/tests/index/test_index_creation.cpp
+++ b/tests/index/test_index_creation.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/index/test_index_creation.h b/tests/index/test_index_creation.h
index 97c622c..8fed5ae 100644
--- a/tests/index/test_index_creation.h
+++ b/tests/index/test_index_creation.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -138,7 +138,7 @@ SEQAN_DEFINE_TEST(testIndexCreation)
     TArray  child, childExt;
     TText   bwt;
 
-    std::string path = (std::string)SEQAN_PATH_TO_ROOT() + "/tests/index/m_tuberculosis_h37rv.fa";
+    std::string path = getAbsolutePath("/tests/index/m_tuberculosis_h37rv.fa");
 
     SeqFileIn inputFile(path.c_str());
     CharString id;
@@ -241,12 +241,12 @@ SEQAN_DEFINE_TEST(testIndexCreation)
 
     resize(child, size);
     for(unsigned i=0; i<size; ++i)
-        child[i] = maxValue<unsigned>();
+        child[i] = std::numeric_limits<unsigned>::max();
     createChildtab(child, lcp);
 
     unsigned undefs=0;
     for(unsigned i=0; i<size; ++i)
-        if (child[i] == maxValue<unsigned>()) ++undefs;
+        if (child[i] == std::numeric_limits<unsigned>::max()) ++undefs;
     if (undefs) std::cout << undefs << " undefined values";
 
     resize(childExt, size);
diff --git a/tests/index/test_index_crosscompare_char.cpp b/tests/index/test_index_crosscompare_char.cpp
index 8350538..b239051 100644
--- a/tests/index/test_index_crosscompare_char.cpp
+++ b/tests/index/test_index_crosscompare_char.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/index/test_index_crosscompare_char_dfi.cpp b/tests/index/test_index_crosscompare_char_dfi.cpp
index dc7c0da..ed8c498 100644
--- a/tests/index/test_index_crosscompare_char_dfi.cpp
+++ b/tests/index/test_index_crosscompare_char_dfi.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/index/test_index_crosscompare_dna.cpp b/tests/index/test_index_crosscompare_dna.cpp
index d760f6e..69a78e5 100644
--- a/tests/index/test_index_crosscompare_dna.cpp
+++ b/tests/index/test_index_crosscompare_dna.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/index/test_index_crosscompare_dna_dfi.cpp b/tests/index/test_index_crosscompare_dna_dfi.cpp
index ebe3c22..35f0eae 100644
--- a/tests/index/test_index_crosscompare_dna_dfi.cpp
+++ b/tests/index/test_index_crosscompare_dna_dfi.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/index/test_index_drawing.cpp b/tests/index/test_index_drawing.cpp
index ec597f0..bf55396 100644
--- a/tests/index/test_index_drawing.cpp
+++ b/tests/index/test_index_drawing.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/index/test_index_finder.cpp b/tests/index/test_index_finder.cpp
index 92c33df..2adcf59 100644
--- a/tests/index/test_index_finder.cpp
+++ b/tests/index/test_index_finder.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/index/test_index_fm.cpp b/tests/index/test_index_fm.cpp
index 66d94a4..78efb94 100644
--- a/tests/index/test_index_fm.cpp
+++ b/tests/index/test_index_fm.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/index/test_index_fm_rank_dictionary.cpp b/tests/index/test_index_fm_rank_dictionary.cpp
index a598235..3100973 100644
--- a/tests/index/test_index_fm_rank_dictionary.cpp
+++ b/tests/index/test_index_fm_rank_dictionary.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // Copyright (c) 2013 NVIDIA Corporation
 // All rights reserved.
 //
@@ -122,9 +122,14 @@ typedef
     TagList<RankDictionary<Dna5,            Default3Level>,
     TagList<RankDictionary<Dna5Q,           Default3Level>,
     TagList<RankDictionary<ReducedMurphy10, Default3Level>,
+#ifndef __alpha__ // NOTE(h-2): fails on alpha for unknown reasons
     TagList<RankDictionary<AminoAcid,       Default3Level>,
+#endif
     RankDictionaryPrefixSumTypes
-    > > > > > > > > > > > > > > > > > > >
+    > > > > > > > > > > > > > > > > > >
+#ifndef __alpha__
+    >
+#endif
     RankDictionaryAllTypes;
 
 // ==========================================================================
diff --git a/tests/index/test_index_fm_right_array_binary_tree.cpp b/tests/index/test_index_fm_right_array_binary_tree.cpp
index 54bbdb1..fd5b021 100644
--- a/tests/index/test_index_fm_right_array_binary_tree.cpp
+++ b/tests/index/test_index_fm_right_array_binary_tree.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/index/test_index_fm_right_array_binary_tree.h b/tests/index/test_index_fm_right_array_binary_tree.h
index a77e7d2..cd10cfe 100644
--- a/tests/index/test_index_fm_right_array_binary_tree.h
+++ b/tests/index/test_index_fm_right_array_binary_tree.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // Copyright (c) 2013 NVIDIA Corporation
 // All rights reserved.
 //
diff --git a/tests/index/test_index_fm_right_array_binary_tree_iterator.h b/tests/index/test_index_fm_right_array_binary_tree_iterator.h
index b31c156..beafb90 100644
--- a/tests/index/test_index_fm_right_array_binary_tree_iterator.h
+++ b/tests/index/test_index_fm_right_array_binary_tree_iterator.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // Copyright (c) 2013 NVIDIA Corporation
 // All rights reserved.
 //
diff --git a/tests/index/test_index_fm_sparse_string.cpp b/tests/index/test_index_fm_sparse_string.cpp
index 494d432..241e808 100644
--- a/tests/index/test_index_fm_sparse_string.cpp
+++ b/tests/index/test_index_fm_sparse_string.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // Copyright (c) 2013 NVIDIA Corporation
 // All rights reserved.
 //
diff --git a/tests/index/test_index_fm_stree.h b/tests/index/test_index_fm_stree.h
index c504c59..739c69d 100644
--- a/tests/index/test_index_fm_stree.h
+++ b/tests/index/test_index_fm_stree.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // Copyright (c) 2013 NVIDIA Corporation
 // All rights reserved.
 //
diff --git a/tests/index/test_index_helpers.h b/tests/index/test_index_helpers.h
index 9df599c..2f801aa 100644
--- a/tests/index/test_index_helpers.h
+++ b/tests/index/test_index_helpers.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -60,7 +60,7 @@ void generateText(TText & text, unsigned textLength = 100000)
 {
     typedef typename Value<TText>::Type TChar;
 
-    int minChar = MinValue<TChar>::VALUE;
+    int minChar = std::numeric_limits<TChar>::min();
     unsigned alphabetSize = ValueSize<TChar>::VALUE;
 
     std::mt19937 rng(time(nullptr));
@@ -96,7 +96,7 @@ void generateText(std::mt19937 & rng, TText & text, unsigned textLength = 100000
 {
     typedef typename Value<TText>::Type TChar;
 
-    int minChar = MinValue<TChar>::VALUE;
+    int minChar = std::numeric_limits<TChar>::min();
     unsigned alphabetSize = ValueSize<TChar>::VALUE;
 
     resize(text, textLength);
@@ -114,7 +114,7 @@ void generateText(StringSet<TText, TConfig> & text, unsigned numSeq = 1000, unsi
 {
     typedef typename Value<TText>::Type TChar;
 
-    int minChar = MinValue<TChar>::VALUE;
+    int minChar = std::numeric_limits<TChar>::min();
     unsigned alphabetSize = ValueSize<TChar>::VALUE;
 
     std::mt19937 rng(SEED);
@@ -138,7 +138,7 @@ void generatePattern(StringSet<TText> & pattern, TText const & text, unsigned pa
 {
     typedef typename Value<TText>::Type TChar;
 
-    int minChar = MinValue<TChar>::VALUE;
+    int minChar = std::numeric_limits<TChar>::min();
     unsigned alphabetSize = ValueSize<TChar>::VALUE;
 
     std::mt19937 rng(SEED);
diff --git a/tests/index/test_index_qgram.cpp b/tests/index/test_index_qgram.cpp
index c8b2875..21a0a0c 100644
--- a/tests/index/test_index_qgram.cpp
+++ b/tests/index/test_index_qgram.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/index/test_index_repeats.cpp b/tests/index/test_index_repeats.cpp
index 4e6920c..5342bfe 100644
--- a/tests/index/test_index_repeats.cpp
+++ b/tests/index/test_index_repeats.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/index/test_index_repeats.h b/tests/index/test_index_repeats.h
index c317196..7083fe6 100644
--- a/tests/index/test_index_repeats.h
+++ b/tests/index/test_index_repeats.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/index/test_index_sa_bwtwalk.cpp b/tests/index/test_index_sa_bwtwalk.cpp
index c31478e..4a774e4 100644
--- a/tests/index/test_index_sa_bwtwalk.cpp
+++ b/tests/index/test_index_sa_bwtwalk.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/index/test_index_shapes.cpp b/tests/index/test_index_shapes.cpp
index 18053de..a880383 100644
--- a/tests/index/test_index_shapes.cpp
+++ b/tests/index/test_index_shapes.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/index/test_index_stree_iterators.cpp b/tests/index/test_index_stree_iterators.cpp
index 1c1df97..8ffd056 100644
--- a/tests/index/test_index_stree_iterators.cpp
+++ b/tests/index/test_index_stree_iterators.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -57,6 +57,7 @@ SEQAN_BEGIN_TESTSUITE(test_index)
 	SEQAN_CALL_TEST(testEmptyIndex);
 	SEQAN_CALL_TEST(testIssue509);
 	SEQAN_CALL_TEST(testIssue509b);
+	SEQAN_CALL_TEST(goDownOnEmptyString);
 	SEQAN_CALL_TEST(testSTreeIterators_Wotd);
 	SEQAN_CALL_TEST(testSTreeIterators_WotdOriginal);
 	SEQAN_CALL_TEST(testSTreeIterators_Esa);
diff --git a/tests/index/test_index_vstree.cpp b/tests/index/test_index_vstree.cpp
index c0be3c5..38d5886 100644
--- a/tests/index/test_index_vstree.cpp
+++ b/tests/index/test_index_vstree.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/index/test_qgram_index.h b/tests/index/test_qgram_index.h
index 280d3af..fa07a7e 100644
--- a/tests/index/test_qgram_index.h
+++ b/tests/index/test_qgram_index.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -211,23 +211,18 @@ void testGappedQGramIndex()
 */
 SEQAN_DEFINE_TEST(testUngappedQGramIndex)
 {
-    String<Dna> text = "CTGAACCCTAAACCCT";
-    int q = 2;
-    Shape<Dna,SimpleShape> shape;
-    resize(shape, q);
+    typedef String<Dna> TString;
+    typedef Shape<Dna, UngappedShape<2> > TShape;
+    typedef Index<TString, IndexQGram<TShape> > TIndex;
+    typedef Position<TString>::Type TPosition;
 
-    typedef Position<String<Dna> >::Type TPosition;
-    String<TPosition> pos;
-    resize(pos, length(text) - q + 1);
+    TString text("CTGAACCCTAAACCCT");
 
-    String<TPosition> dir;
-    int pos_size = _intPow((unsigned)ValueSize<Dna>::VALUE, q);
-    pos_size += 1;
-    resize(dir, pos_size);
-
-    Nothing nothing;
-    createQGramIndex(pos, dir, nothing, text, shape, 1);
+    TIndex index(text);
+    indexCreate(index, QGramSADir());
 
+    String<TPosition> pos(getFibre(index, QGramSA()));
+    String<TPosition> dir(getFibre(index, QGramDir()));
 
     SEQAN_ASSERT(dir[0] == 0);
     SEQAN_ASSERT(dir[1] == 3);
diff --git a/tests/index/test_sa_bwtwalk.h b/tests/index/test_sa_bwtwalk.h
index 1691509..739c2f9 100644
--- a/tests/index/test_sa_bwtwalk.h
+++ b/tests/index/test_sa_bwtwalk.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -115,7 +115,7 @@ SEQAN_DEFINE_TEST(testBWTWalk)
 //#  endif
 //#endif
 
-    std::string path = (std::string)SEQAN_PATH_TO_ROOT() + "/tests/index/m_tuberculosis_h37rv.fa";
+    std::string path = getAbsolutePath("/tests/index/m_tuberculosis_h37rv.fa");
 
     SeqFileIn inputFile(path.c_str());
     CharString text, id;
diff --git a/tests/index/test_shapes.h b/tests/index/test_shapes.h
index f048bd8..2f89352 100644
--- a/tests/index/test_shapes.h
+++ b/tests/index/test_shapes.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/index/test_stree_iterators.h b/tests/index/test_stree_iterators.h
index 40468a8..99d7c1c 100644
--- a/tests/index/test_stree_iterators.h
+++ b/tests/index/test_stree_iterators.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -103,6 +103,24 @@ SEQAN_DEFINE_TEST(testIssue509b)
     SEQAN_ASSERT(goDown(iterator, seq));
 }
 
+SEQAN_DEFINE_TEST(goDownOnEmptyString)
+{
+    typedef Index<DnaString, FMIndex<> > TIndex;
+    typedef Iter<TIndex, VSTree<TopDown<> > > TIter;
+
+    DnaString text("GCCTC");
+    TIndex index(text);
+    TIter it(index);
+
+    goDown(it, "C");
+    goDown(it);
+    goDown(it, "");
+    goRight(it);
+    SEQAN_ASSERT_EQ(representative(it), DnaString("GC"));
+    goRight(it);
+    SEQAN_ASSERT_EQ(representative(it), DnaString("TC"));
+}
+
 SEQAN_DEFINE_TEST(testBuild)
 {
         typedef String<char> TText;
diff --git a/tests/journaled_set/test_journaled_set.cpp b/tests/journaled_set/test_journaled_set.cpp
index 5b50df5..6e65a7a 100644
--- a/tests/journaled_set/test_journaled_set.cpp
+++ b/tests/journaled_set/test_journaled_set.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/journaled_set/test_journaled_set.h b/tests/journaled_set/test_journaled_set.h
index d5f0dc8..9a75f44 100644
--- a/tests/journaled_set/test_journaled_set.h
+++ b/tests/journaled_set/test_journaled_set.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/journaled_string_tree/test_basic_observable.cpp b/tests/journaled_string_tree/test_basic_observable.cpp
index 33b83ab..59ed3eb 100644
--- a/tests/journaled_string_tree/test_basic_observable.cpp
+++ b/tests/journaled_string_tree/test_basic_observable.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/journaled_string_tree/test_basic_observable.h b/tests/journaled_string_tree/test_basic_observable.h
index 97133b6..42b41c8 100644
--- a/tests/journaled_string_tree/test_basic_observable.h
+++ b/tests/journaled_string_tree/test_basic_observable.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/journaled_string_tree/test_delta_map.cpp b/tests/journaled_string_tree/test_delta_map.cpp
index 4125e51..cdafdc8 100644
--- a/tests/journaled_string_tree/test_delta_map.cpp
+++ b/tests/journaled_string_tree/test_delta_map.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/journaled_string_tree/test_delta_map.h b/tests/journaled_string_tree/test_delta_map.h
index 95decc0..0d9d308 100644
--- a/tests/journaled_string_tree/test_delta_map.h
+++ b/tests/journaled_string_tree/test_delta_map.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -262,9 +262,9 @@ SEQAN_DEFINE_TEST(test_delta_map_find)
     DeltaMap<TestDeltaMapConfig> deltaMap;
     createMock(deltaMap);
 
-    SEQAN_ASSERT_EQ(value(find(deltaMap,  2, DeltaTypeSnp())), deltaMap._entries[3]);
-    SEQAN_ASSERT_EQ(value(find(deltaMap,  1, DeltaTypeSV())), deltaMap._entries[2]);
-    SEQAN_ASSERT_EQ(value(find(deltaMap,  20, DeltaTypeDel())), deltaMap._entries[8]);
+    SEQAN_ASSERT_EQ(*find(deltaMap,  2, DeltaTypeSnp()), deltaMap._entries[3]);
+    SEQAN_ASSERT_EQ(*find(deltaMap,  1, DeltaTypeSV()), deltaMap._entries[2]);
+    SEQAN_ASSERT_EQ(*find(deltaMap,  20, DeltaTypeDel()), deltaMap._entries[8]);
     SEQAN_ASSERT(find(deltaMap,  1, DeltaTypeIns()) == end(deltaMap, Standard()));
     SEQAN_ASSERT(find(deltaMap,  6, DeltaTypeSnp()) == end(deltaMap, Standard()));
 }
@@ -355,19 +355,19 @@ _testDeltaMapIterator(TMap & deltaMap)
 
     unsigned counter = 0;
     for (; it != end(deltaMap, Standard()); ++it, ++counter)
-        SEQAN_ASSERT_EQ(value(it), deltaMap._entries[counter]);
+        SEQAN_ASSERT_EQ(*(it), deltaMap._entries[counter]);
     SEQAN_ASSERT_EQ(counter, size(deltaMap));
 
     for (; it != begin(deltaMap, Standard()); --it, --counter)
-        SEQAN_ASSERT_EQ(value(it - 1), deltaMap._entries[counter - 1]);
+        SEQAN_ASSERT_EQ(*(it - 1), deltaMap._entries[counter - 1]);
     SEQAN_ASSERT_EQ(counter, 0u);
 
     for (; !(it == end(deltaMap, Standard())); it++, ++counter)
-        SEQAN_ASSERT_EQ(value(it), deltaMap._entries[counter]);
+        SEQAN_ASSERT_EQ(*(it), deltaMap._entries[counter]);
     SEQAN_ASSERT_EQ(counter, size(deltaMap));
 
     for (; !(it == begin(deltaMap, Standard())); it--, --counter)
-        SEQAN_ASSERT_EQ(value(it - 1), deltaMap._entries[counter - 1]);
+        SEQAN_ASSERT_EQ(*(it - 1), deltaMap._entries[counter - 1]);
     SEQAN_ASSERT_EQ(counter, 0u);
 
 }
diff --git a/tests/journaled_string_tree/test_delta_store.h b/tests/journaled_string_tree/test_delta_store.h
index c8a93b1..c30d76f 100644
--- a/tests/journaled_string_tree/test_delta_store.h
+++ b/tests/journaled_string_tree/test_delta_store.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/journaled_string_tree/test_journaled_string_tree.cpp b/tests/journaled_string_tree/test_journaled_string_tree.cpp
index 9e76100..d796c57 100644
--- a/tests/journaled_string_tree/test_journaled_string_tree.cpp
+++ b/tests/journaled_string_tree/test_journaled_string_tree.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/journaled_string_tree/test_journaled_string_tree.h b/tests/journaled_string_tree/test_journaled_string_tree.h
index 7d81e79..9bb18fb 100644
--- a/tests/journaled_string_tree/test_journaled_string_tree.h
+++ b/tests/journaled_string_tree/test_journaled_string_tree.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -290,7 +290,7 @@ SEQAN_DEFINE_TEST(test_journaled_string_tree_max_size)
     typedef typename Member<JournaledStringTree<Dna5String>, JstDeltaMapMember>::Type TDeltaMap;
     typedef typename Size<TDeltaMap>::Type TSize;
 
-    SEQAN_ASSERT_EQ(maxSize(jst), MaxValue<TSize>::VALUE);
+    SEQAN_ASSERT_EQ(maxSize(jst), std::numeric_limits<TSize>::max());
 }
 
 #endif // TESTS_JOURNALED_STRING_TREE_TEST_JOURNALED_STRING_TREE_H_
diff --git a/tests/journaled_string_tree/test_journaled_string_tree_find.cpp b/tests/journaled_string_tree/test_journaled_string_tree_find.cpp
index 17f1c45..d5145a1 100644
--- a/tests/journaled_string_tree/test_journaled_string_tree_find.cpp
+++ b/tests/journaled_string_tree/test_journaled_string_tree_find.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/journaled_string_tree/test_journaled_string_tree_find.h b/tests/journaled_string_tree/test_journaled_string_tree_find.h
index 64b1962..16a2842 100644
--- a/tests/journaled_string_tree/test_journaled_string_tree_find.h
+++ b/tests/journaled_string_tree/test_journaled_string_tree_find.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/journaled_string_tree/test_journaled_string_tree_mock.h b/tests/journaled_string_tree/test_journaled_string_tree_mock.h
index 2f6ab0b..c522b6b 100644
--- a/tests/journaled_string_tree/test_journaled_string_tree_mock.h
+++ b/tests/journaled_string_tree/test_journaled_string_tree_mock.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/journaled_string_tree/test_journaled_string_tree_traverser.cpp b/tests/journaled_string_tree/test_journaled_string_tree_traverser.cpp
index 5534716..99f7754 100644
--- a/tests/journaled_string_tree/test_journaled_string_tree_traverser.cpp
+++ b/tests/journaled_string_tree/test_journaled_string_tree_traverser.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -48,6 +48,7 @@ SEQAN_BEGIN_TESTSUITE(test_journaled_string_tree_traverser)
     SEQAN_CALL_TEST(test_journaled_string_tree_traverser_context_size);
     SEQAN_CALL_TEST(test_journaled_string_tree_traverser_branch_size);
     SEQAN_CALL_TEST(test_journaled_string_tree_traverser_at_end);
+    SEQAN_CALL_TEST(test_journaled_string_tree_traverser_is_base);
     SEQAN_CALL_TEST(test_journaled_string_tree_traverser_advance);
     SEQAN_CALL_TEST(test_journaled_string_tree_traverser_context_iterator);
 
diff --git a/tests/journaled_string_tree/test_journaled_string_tree_traverser.h b/tests/journaled_string_tree/test_journaled_string_tree_traverser.h
index 8b2feee..0306810 100644
--- a/tests/journaled_string_tree/test_journaled_string_tree_traverser.h
+++ b/tests/journaled_string_tree/test_journaled_string_tree_traverser.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -290,6 +290,22 @@ SEQAN_DEFINE_TEST(test_journaled_string_tree_traverser_at_end)
     SEQAN_ASSERT_EQ(atEnd(test), true);
 }
 
+SEQAN_DEFINE_TEST(test_journaled_string_tree_traverser_is_base)
+{
+    typedef JournaledStringTree<DnaString> TJst;
+    typedef TraverserImpl<TJst, JstTraversalSpec<> > TTraverser;
+
+    TJst jst = JstMockGenerator::_createSimpleJst<TJst>();
+    TTraverser test(jst, 1);
+
+    SEQAN_ASSERT(!isBase(test));
+    for (unsigned i = 0; i < 31; ++i)
+    {
+        advance(test, 1);
+    }
+    SEQAN_ASSERT(isBase(test));
+}
+
 SEQAN_DEFINE_TEST(test_journaled_string_tree_traverser_context_size)
 {
     typedef JournaledStringTree<DnaString> TJst;
diff --git a/tests/map/test_map.cpp b/tests/map/test_map.cpp
index 3577f70..ee85967 100644
--- a/tests/map/test_map.cpp
+++ b/tests/map/test_map.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/map/test_map_map.h b/tests/map/test_map_map.h
index 90d9864..33a920b 100644
--- a/tests/map/test_map_map.h
+++ b/tests/map/test_map_map.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/map/test_map_sumlist.h b/tests/map/test_map_sumlist.h
index 6dd98c4..4460951 100644
--- a/tests/map/test_map_sumlist.h
+++ b/tests/map/test_map_sumlist.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/misc/test_misc.cpp b/tests/misc/test_misc.cpp
index 63aff88..8be5c82 100644
--- a/tests/misc/test_misc.cpp
+++ b/tests/misc/test_misc.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -64,13 +64,13 @@ SEQAN_DEFINE_TEST(test_misc_terminal_get_terminal_size)
 {
     using namespace seqan;
     
-    unsigned cols = maxValue<unsigned>(), rows = maxValue<unsigned>();
+    unsigned cols = std::numeric_limits<unsigned>::max(), rows = std::numeric_limits<unsigned>::max();
     bool succ = getTerminalSize(cols, rows);
 
 #if !defined(STDLIB_VS)
     SEQAN_ASSERT(succ);
-    SEQAN_ASSERT_NEQ(cols, maxValue<unsigned>());
-    SEQAN_ASSERT_NEQ(rows, maxValue<unsigned>());
+    SEQAN_ASSERT_NEQ(cols, std::numeric_limits<unsigned>::max());
+    SEQAN_ASSERT_NEQ(rows, std::numeric_limits<unsigned>::max());
 #else  // #if !defined(STDLIB_VS)
     SEQAN_ASSERT_NOT(succ);
 #endif  // #if !defined(STDLIB_VS)
diff --git a/tests/misc/test_misc_accumulators.h b/tests/misc/test_misc_accumulators.h
index ac91367..6cb4533 100644
--- a/tests/misc/test_misc_accumulators.h
+++ b/tests/misc/test_misc_accumulators.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/misc/test_misc_bit_twiddling.h b/tests/misc/test_misc_bit_twiddling.h
index b28aabd..6867120 100644
--- a/tests/misc/test_misc_bit_twiddling.h
+++ b/tests/misc/test_misc_bit_twiddling.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/misc/test_misc_edit_environment.h b/tests/misc/test_misc_edit_environment.h
index df0a850..0d539c3 100644
--- a/tests/misc/test_misc_edit_environment.h
+++ b/tests/misc/test_misc_edit_environment.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/misc/test_misc_interval_tree.h b/tests/misc/test_misc_interval_tree.h
index 1fea460..55d0714 100644
--- a/tests/misc/test_misc_interval_tree.h
+++ b/tests/misc/test_misc_interval_tree.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/modifier/helpers.h b/tests/modifier/helpers.h
index bd05501..f4937a8 100644
--- a/tests/modifier/helpers.h
+++ b/tests/modifier/helpers.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/modifier/test_modifier.cpp b/tests/modifier/test_modifier.cpp
index 9b139a9..6389736 100644
--- a/tests/modifier/test_modifier.cpp
+++ b/tests/modifier/test_modifier.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -42,7 +42,7 @@
 #include "test_modifier_string_padding.h"
 
 
-SEQAN_BEGIN_TESTSUITE(test_modifier) 
+SEQAN_BEGIN_TESTSUITE(test_modifier)
 {
     // Test the modifier shortcuts.
     SEQAN_CALL_TEST(test_modifer_shortcuts_dna_string_reverse);
@@ -130,5 +130,6 @@ SEQAN_BEGIN_TESTSUITE(test_modifier)
     SEQAN_CALL_TEST(test_modified_string_padding_end);
     SEQAN_CALL_TEST(test_modified_string_padding_difference);
     SEQAN_CALL_TEST(test_modified_string_padding_iterator);
+    SEQAN_CALL_TEST(test_modified_string_padding_defect_2190);
 }
 SEQAN_END_TESTSUITE
diff --git a/tests/modifier/test_modifier_alphabet.h b/tests/modifier/test_modifier_alphabet.h
index e589d5b..95badd5 100644
--- a/tests/modifier/test_modifier_alphabet.h
+++ b/tests/modifier/test_modifier_alphabet.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/modifier/test_modifier_functors.h b/tests/modifier/test_modifier_functors.h
index ed6d9fa..ad4f93e 100644
--- a/tests/modifier/test_modifier_functors.h
+++ b/tests/modifier/test_modifier_functors.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/modifier/test_modifier_shortcuts.h b/tests/modifier/test_modifier_shortcuts.h
index d18e173..df5ffc4 100644
--- a/tests/modifier/test_modifier_shortcuts.h
+++ b/tests/modifier/test_modifier_shortcuts.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/modifier/test_modifier_string.h b/tests/modifier/test_modifier_string.h
index 15b460f..0acb68b 100644
--- a/tests/modifier/test_modifier_string.h
+++ b/tests/modifier/test_modifier_string.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/modifier/test_modifier_string_padding.h b/tests/modifier/test_modifier_string_padding.h
index 063b620..8071c08 100644
--- a/tests/modifier/test_modifier_string_padding.h
+++ b/tests/modifier/test_modifier_string_padding.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -181,4 +181,28 @@ SEQAN_DEFINE_TEST(test_modified_string_padding_iterator)
     SEQAN_ASSERT_EQ(*(it - 3), seq[12]);
 }
 
+SEQAN_DEFINE_TEST(test_modified_string_padding_defect_2190)
+{
+    using namespace seqan;
+
+    DnaString seq = "ACGTGGATAGCATCG";
+    auto seqInf = infix(seq, 0, length(seq));
+
+    auto test_const = [](auto const & modifier)
+    {
+        // using TRef = typename Reference<decltype(modifier)>::Type;
+        auto x = value(modifier, 1);
+        SEQAN_ASSERT_EQ(x, 'C');
+    };
+    { // Test working case, when reference of const modifier gives back a const reference to the value
+        ModifiedString<decltype(seq), ModPadding> modString(seq);
+        test_const(modString);
+    }
+
+    {  // Test defect, when reference of const modifier gives back a non-const reference to the value
+        ModifiedString<decltype(seqInf), ModPadding> modString(seqInf);
+        test_const(modString);
+    }
+}
+
 #endif  // #ifndef TESTS_MODIFIER_MODIFIER_STRING_PADDING_H_
diff --git a/tests/modifier/test_modifier_view.h b/tests/modifier/test_modifier_view.h
index 666a99e..9a8856f 100644
--- a/tests/modifier/test_modifier_view.h
+++ b/tests/modifier/test_modifier_view.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/modifier_cyclic_shape/test_cyclic_shape.h b/tests/modifier_cyclic_shape/test_cyclic_shape.h
index 61adf59..1c9e308 100644
--- a/tests/modifier_cyclic_shape/test_cyclic_shape.h
+++ b/tests/modifier_cyclic_shape/test_cyclic_shape.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/modifier_cyclic_shape/test_modifier_cyclic_shape.cpp b/tests/modifier_cyclic_shape/test_modifier_cyclic_shape.cpp
index 1318559..a7e32ae 100644
--- a/tests/modifier_cyclic_shape/test_modifier_cyclic_shape.cpp
+++ b/tests/modifier_cyclic_shape/test_modifier_cyclic_shape.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/modifier_cyclic_shape/test_modifier_cyclic_shape.h b/tests/modifier_cyclic_shape/test_modifier_cyclic_shape.h
index 8856dc4..f368c30 100644
--- a/tests/modifier_cyclic_shape/test_modifier_cyclic_shape.h
+++ b/tests/modifier_cyclic_shape/test_modifier_cyclic_shape.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/multiple_translation_units/test_multiple_translation_units.cpp b/tests/multiple_translation_units/test_multiple_translation_units.cpp
index 650820e..493b42d 100644
--- a/tests/multiple_translation_units/test_multiple_translation_units.cpp
+++ b/tests/multiple_translation_units/test_multiple_translation_units.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -34,6 +34,7 @@
 
 #include <seqan/align.h>
 #include <seqan/align_extend.h>
+#include <seqan/align_parallel.h>
 #include <seqan/align_profile.h>
 #include <seqan/align_split.h>
 #include <seqan/alignment_free.h>
diff --git a/tests/multiple_translation_units/test_multiple_translation_units_2.cpp b/tests/multiple_translation_units/test_multiple_translation_units_2.cpp
index 0040c65..1353590 100644
--- a/tests/multiple_translation_units/test_multiple_translation_units_2.cpp
+++ b/tests/multiple_translation_units/test_multiple_translation_units_2.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -36,6 +36,7 @@
 
 #include <seqan/align.h>
 #include <seqan/align_extend.h>
+#include <seqan/align_parallel.h>
 #include <seqan/align_profile.h>
 #include <seqan/align_split.h>
 #include <seqan/alignment_free.h>
diff --git a/tests/parallel/CMakeLists.txt b/tests/parallel/CMakeLists.txt
index 245675d..0df6d73 100644
--- a/tests/parallel/CMakeLists.txt
+++ b/tests/parallel/CMakeLists.txt
@@ -39,7 +39,9 @@ add_executable (test_parallel
                test_parallel_atomic_misc.h
                test_parallel_atomic_primitives.h
                test_parallel_splitting.h
-               test_parallel_queue.h)
+               test_parallel_queue.h
+               test_parallel_thread_pool.h
+               test_parallel_enumerable_thread_local.h)
 
 # Add dependencies found by find_package (SeqAn).
 target_link_libraries (test_parallel ${SEQAN_LIBRARIES})
diff --git a/tests/parallel/test_parallel.cpp b/tests/parallel/test_parallel.cpp
index 452cf2a..72efd93 100755
--- a/tests/parallel/test_parallel.cpp
+++ b/tests/parallel/test_parallel.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -47,6 +47,8 @@
 #include "test_parallel_splitting.h"
 #include "test_parallel_algorithms.h"
 #include "test_parallel_queue.h"
+#include "test_parallel_thread_pool.h"
+#include "test_parallel_enumerable_thread_local.h"
 
 SEQAN_BEGIN_TESTSUITE(test_parallel) {
 #if defined(_OPENMP)
@@ -96,5 +98,24 @@ SEQAN_BEGIN_TESTSUITE(test_parallel) {
 //        SEQAN_CALL_TEST(test_parallel_queue_mpmc_fixedsize);
 //        SEQAN_CALL_TEST(test_parallel_queue_mpmc_dynamicsize);
     }
+
+    // -----------------------------------------------------------------------
+    // Test thread pool.
+    // -----------------------------------------------------------------------
+
+    SEQAN_CALL_TEST(test_parallel_thread_pool_construct);
+    SEQAN_CALL_TEST(test_parallel_thread_pool_spawn);
+    SEQAN_CALL_TEST(test_parallel_thread_pool_join);
+    SEQAN_CALL_TEST(test_parallel_thread_pool_destruct);
+
+    // -----------------------------------------------------------------------
+    // Test Enumerable Thread Specific.
+    // -----------------------------------------------------------------------
+
+    SEQAN_CALL_TEST(test_parallel_enumerable_thread_local_construct);
+    SEQAN_CALL_TEST(test_parallel_enumerable_thread_local_local);
+    SEQAN_CALL_TEST(test_parallel_enumerable_thread_local_enumerate);
+    SEQAN_CALL_TEST(test_parallel_enumerable_thread_local_combine_unary);
+    SEQAN_CALL_TEST(test_parallel_enumerable_thread_local_combine_binary);
 }
 SEQAN_END_TESTSUITE
diff --git a/tests/parallel/test_parallel_algorithms.h b/tests/parallel/test_parallel_algorithms.h
index 2b40f77..c7611d2 100755
--- a/tests/parallel/test_parallel_algorithms.h
+++ b/tests/parallel/test_parallel_algorithms.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/parallel/test_parallel_atomic_misc.h b/tests/parallel/test_parallel_atomic_misc.h
index 01764b1..7d36448 100755
--- a/tests/parallel/test_parallel_atomic_misc.h
+++ b/tests/parallel/test_parallel_atomic_misc.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/parallel/test_parallel_atomic_primitives.h b/tests/parallel/test_parallel_atomic_primitives.h
index 785df47..7d2b1cd 100755
--- a/tests/parallel/test_parallel_atomic_primitives.h
+++ b/tests/parallel/test_parallel_atomic_primitives.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/parallel/test_parallel_enumerable_thread_local.h b/tests/parallel/test_parallel_enumerable_thread_local.h
new file mode 100644
index 0000000..74df785
--- /dev/null
+++ b/tests/parallel/test_parallel_enumerable_thread_local.h
@@ -0,0 +1,217 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Rene Rahn <rene.rahn at fu-berlin.de>
+// ==========================================================================
+
+#include <algorithm>
+
+#include <seqan/parallel.h>
+
+namespace test_align_parallel
+{
+struct TestValue
+{
+    std::string mMsg{"default constructed"};
+
+    //NOTE(rrahn) Bug in g++-4.9 prevents us from using as aggregate type.
+    TestValue() = default;
+
+    TestValue(std::string const _msg) : mMsg(std::move(_msg))
+    {}
+};
+
+template <typename TEtl>
+inline void
+run(TEtl & tls, size_t const threadCount)
+{
+    unsigned counter{0};
+    std::mutex mutexCout;
+    // spawn sveral threads that call for a number of repetitions the local variable.
+    auto task = [&counter, &mutexCout, &tls](unsigned const tid)
+    {
+        while (true)
+        {
+            auto & val = local(tls);
+            if (val.first == "master")
+            {
+                std::stringstream ss;
+                ss << "thread_" << tid;
+                val.first = ss.str();
+            }
+            {
+                std::lock_guard<std::mutex> lck(mutexCout);
+                if (counter == 1000)
+                    break;
+                ++counter;
+            }
+            --val.second;
+        }
+    };
+
+    std::vector<std::thread> pool;
+    for (unsigned tid = 0; tid < threadCount; ++tid)
+        pool.emplace_back(task, tid);
+
+    std::for_each(std::begin(pool), std::end(pool),
+                  [](auto & thread)
+                  {
+                      if (thread.joinable())
+                          thread.join();
+                  });
+}
+
+template <typename TEtl>
+void
+testEnumerate(TEtl & etl)
+{
+    unsigned count{0};
+
+    for (auto it = begin(etl); it != end(etl); ++it)
+    {
+        count += 1000 - it->second;
+    }
+    SEQAN_ASSERT_EQ(count, 1000u);
+}
+
+template <typename TEtl>
+void
+testEnumerateConst(TEtl const & etl)
+{
+    unsigned count{0};
+
+    for (auto it = begin(etl); it != end(etl); ++it)
+    {
+        count += 1000 - it->second;
+    }
+    SEQAN_ASSERT_EQ(count, 1000u);
+}
+
+}
+
+SEQAN_DEFINE_TEST(test_parallel_enumerable_thread_local_construct)
+{
+    using namespace seqan;
+
+    SEQAN_ASSERT(std::is_default_constructible<EnumerableThreadLocal<int>>::value);
+    SEQAN_ASSERT(!std::is_copy_constructible<EnumerableThreadLocal<int>>::value);
+    SEQAN_ASSERT(!std::is_move_constructible<EnumerableThreadLocal<int>>::value);
+    SEQAN_ASSERT(!std::is_copy_assignable<EnumerableThreadLocal<int>>::value);
+    SEQAN_ASSERT(!std::is_move_assignable<EnumerableThreadLocal<int>>::value);
+
+    {  // Default construction.
+        EnumerableThreadLocal<test_align_parallel::TestValue> tls;
+        SEQAN_ASSERT_EQ(tls._initValue.mMsg, "default constructed");
+    }
+
+    {  // Predefined initialization value.
+        EnumerableThreadLocal<test_align_parallel::TestValue> tls{test_align_parallel::TestValue{"predefined"}};
+        SEQAN_ASSERT_EQ(tls._initValue.mMsg, "predefined");
+    }
+}
+
+SEQAN_DEFINE_TEST(test_parallel_enumerable_thread_local_local)
+{
+    using namespace seqan;
+
+    using TPair = std::pair<std::string, unsigned>;
+    EnumerableThreadLocal<TPair> tls{TPair{"master", 1000}};
+
+    size_t threadCount = std::min(std::thread::hardware_concurrency(), static_cast<unsigned>(4));
+    test_align_parallel::run(tls, threadCount);
+
+    SEQAN_ASSERT_EQ(tls._map.size(), threadCount);
+
+    std::for_each(std::begin(tls._map), std::end(tls._map),
+    [](auto const & mapValue)
+    {
+        auto const& val = mapValue.second;
+        SEQAN_ASSERT_NEQ(val.first, "master");
+        SEQAN_ASSERT_LEQ(val.second, 1000u);
+        SEQAN_ASSERT_GEQ(val.second, 0u);
+    });
+}
+
+SEQAN_DEFINE_TEST(test_parallel_enumerable_thread_local_enumerate)
+{
+    using namespace seqan;
+
+    using TPair = std::pair<std::string, unsigned>;
+    EnumerableThreadLocal<TPair> tls{TPair{"master", 1000}};
+
+    size_t threadCount = std::min(std::thread::hardware_concurrency(), static_cast<unsigned>(4));
+    test_align_parallel::run(tls, threadCount);
+
+    SEQAN_ASSERT_EQ(tls._map.size(), threadCount);
+
+    test_align_parallel::testEnumerate(tls);
+    test_align_parallel::testEnumerateConst(tls);
+}
+
+SEQAN_DEFINE_TEST(test_parallel_enumerable_thread_local_combine_unary)
+{
+    using namespace seqan;
+
+    using TPair = std::pair<std::string, unsigned>;
+    EnumerableThreadLocal<TPair> tls{TPair{"master", 1000}};
+
+    size_t threadCount = std::min(std::thread::hardware_concurrency(), static_cast<unsigned>(4));
+    test_align_parallel::run(tls, threadCount);
+
+    SEQAN_ASSERT_EQ(tls._map.size(), threadCount);
+
+    unsigned count{0};
+    combineEach(tls, [&](TPair const & p)
+    {
+        count += 1000 - p.second;
+    });
+    SEQAN_ASSERT_EQ(count, 1000u);
+}
+
+SEQAN_DEFINE_TEST(test_parallel_enumerable_thread_local_combine_binary)
+{
+    using namespace seqan;
+
+    using TPair = std::pair<std::string, unsigned>;
+    EnumerableThreadLocal<TPair> tls{TPair{"master", 1000}};
+
+    size_t threadCount = std::min(std::thread::hardware_concurrency(), static_cast<unsigned>(4));
+    test_align_parallel::run(tls, threadCount);
+
+    SEQAN_ASSERT_EQ(tls._map.size(), threadCount);
+
+    TPair count = combine(tls, [](TPair const & initial, TPair const & val)
+                          {
+                              return TPair{initial.first, initial.second + (1000 - val.second)};
+                          });
+    SEQAN_ASSERT_EQ(count.first, "");
+    SEQAN_ASSERT_EQ(count.second, 1000u);
+}
diff --git a/tests/parallel/test_parallel_queue.h b/tests/parallel/test_parallel_queue.h
index 2f126a2..790ffe0 100755
--- a/tests/parallel/test_parallel_queue.h
+++ b/tests/parallel/test_parallel_queue.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/parallel/test_parallel_splitting.h b/tests/parallel/test_parallel_splitting.h
index 5f730f3..9bfe93a 100755
--- a/tests/parallel/test_parallel_splitting.h
+++ b/tests/parallel/test_parallel_splitting.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/parallel/test_parallel_thread_pool.h b/tests/parallel/test_parallel_thread_pool.h
new file mode 100644
index 0000000..309c131
--- /dev/null
+++ b/tests/parallel/test_parallel_thread_pool.h
@@ -0,0 +1,151 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: Rene Rahn <rene.rahn at fu-berlin.de>
+// ==========================================================================
+
+#include <seqan/parallel.h>
+
+SEQAN_DEFINE_TEST(test_parallel_thread_pool_construct)
+{
+    using namespace seqan;
+    // We need to be able to construct a thread pool.
+    SEQAN_ASSERT(std::is_default_constructible<ThreadPool>::value);
+    SEQAN_ASSERT(!std::is_copy_constructible<ThreadPool>::value);
+    SEQAN_ASSERT(!std::is_move_constructible<ThreadPool>::value);
+    SEQAN_ASSERT(!std::is_copy_assignable<ThreadPool>::value);
+    SEQAN_ASSERT(!std::is_move_assignable<ThreadPool>::value);
+}
+
+SEQAN_DEFINE_TEST(test_parallel_thread_pool_spawn)
+{
+    using namespace seqan;
+    // We need to be able to construct a thread pool
+    ThreadPool pool;
+    bool res = false;
+    auto masterId = std::this_thread::get_id();
+    spawn(pool, [=, &res]()
+    {
+        auto id = std::this_thread::get_id();
+        res = id != masterId;
+    });
+
+    join(pool);
+    SEQAN_ASSERT(res);
+}
+
+SEQAN_DEFINE_TEST(test_parallel_thread_pool_join)
+{
+    using namespace seqan;
+
+    ThreadPool pool;
+    std::vector<bool> res{false, false};
+    for (unsigned i = 0; i < res.size(); ++i)
+    {
+        auto f = [=, &res]
+        {
+            std::this_thread::sleep_for(std::chrono::seconds(i));
+            res[i] = true;
+        };
+        spawn(pool, f);
+    }
+
+    SEQAN_ASSERT_NOT(std::accumulate(std::begin(res), std::end(res), true,
+                                     [](bool const lhs, bool const rhs)
+                                     {
+                                         return lhs && rhs;
+                                     }));
+    join(pool);
+    SEQAN_ASSERT(std::accumulate(std::begin(res), std::end(res), true,
+                                 [](bool const lhs, bool const rhs)
+                                 {
+                                     return lhs && rhs;
+                                 }));
+}
+
+SEQAN_DEFINE_TEST(test_parallel_thread_pool_destruct)
+{
+    using namespace seqan;
+
+    { // Destructor.
+        void* buffer = malloc(sizeof(ThreadPool));
+        ThreadPool* poolPtr = new(buffer) ThreadPool();
+
+        bool res = false;
+        auto f = [&res]()
+        {
+            std::this_thread::sleep_for(std::chrono::seconds(1));
+            res = true;
+        };
+        spawn(*poolPtr, f);
+        SEQAN_ASSERT_NOT(res);
+
+        try
+        {
+            poolPtr->~ThreadPool();
+        }
+        catch(...)
+        {
+            SEQAN_ASSERT_FAIL("Could not savely destruct thread pool!");
+        }
+        SEQAN_ASSERT(res);
+
+        free(buffer);
+    }
+
+    {  // Destructor after join
+        void* buffer = malloc(sizeof(ThreadPool));
+        ThreadPool* poolPtr = new(buffer) ThreadPool();
+
+        bool res = false;
+        auto f = [&res]()
+        {
+            std::this_thread::sleep_for(std::chrono::seconds(1));
+            res = true;
+        };
+        spawn(*poolPtr, f);
+        SEQAN_ASSERT_NOT(res);
+        join(*poolPtr);
+        SEQAN_ASSERT(res);
+
+        try
+        {
+            poolPtr->~ThreadPool();
+        }
+        catch(...)
+        {
+            SEQAN_ASSERT_FAIL("Could not savely destruct thread pool!");
+        }
+        SEQAN_ASSERT(res);
+
+        free(buffer);
+    }
+}
diff --git a/tests/parse_lm/test_parse_lm.cpp b/tests/parse_lm/test_parse_lm.cpp
index 5fd58b2..336dfb3 100644
--- a/tests/parse_lm/test_parse_lm.cpp
+++ b/tests/parse_lm/test_parse_lm.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                                  parse_lm
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/parse_lm/test_parse_lm.h b/tests/parse_lm/test_parse_lm.h
index 5e4aada..aaeae2e 100644
--- a/tests/parse_lm/test_parse_lm.h
+++ b/tests/parse_lm/test_parse_lm.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                                  parse_lm
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -48,7 +48,7 @@ SEQAN_DEFINE_TEST(test_parse_lm_local_match_constructor)
     // Default constructor.
     {
         TLocalMatch localMatch;
-        unsigned const maxU = MaxValue<unsigned>::VALUE;
+        unsigned const maxU = std::numeric_limits<unsigned>::max();
 
         SEQAN_ASSERT_EQ(maxU, localMatch.id);
         SEQAN_ASSERT_EQ(maxU, localMatch.subjectId);
diff --git a/tests/pipe/test_pipe.cpp b/tests/pipe/test_pipe.cpp
index 0fcac33..0426d79 100644
--- a/tests/pipe/test_pipe.cpp
+++ b/tests/pipe/test_pipe.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/pipe/test_pipe.h b/tests/pipe/test_pipe.h
index ce79893..aa4e68a 100644
--- a/tests/pipe/test_pipe.h
+++ b/tests/pipe/test_pipe.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/platform/test_platform.cpp b/tests/platform/test_platform.cpp
index 1df7589..871891c 100644
--- a/tests/platform/test_platform.cpp
+++ b/tests/platform/test_platform.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/platform/test_platform_range_based_for_loops.h b/tests/platform/test_platform_range_based_for_loops.h
index 260e67e..e4d8fe4 100644
--- a/tests/platform/test_platform_range_based_for_loops.h
+++ b/tests/platform/test_platform_range_based_for_loops.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/random/test_random.cpp b/tests/random/test_random.cpp
index 3e650bc..f9f47fb 100644
--- a/tests/random/test_random.cpp
+++ b/tests/random/test_random.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/random/test_random_basic.h b/tests/random/test_random_basic.h
index ca5f45e..49ed4aa 100644
--- a/tests/random/test_random_basic.h
+++ b/tests/random/test_random_basic.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/random/test_random_beta.h b/tests/random/test_random_beta.h
index bb1b87e..e0bc19f 100644
--- a/tests/random/test_random_beta.h
+++ b/tests/random/test_random_beta.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/random/test_random_util.h b/tests/random/test_random_util.h
index 7741f0c..cbe91f8 100644
--- a/tests/random/test_random_util.h
+++ b/tests/random/test_random_util.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/realign/test_realign.cpp b/tests/realign/test_realign.cpp
index 5bce55e..41d0035 100644
--- a/tests/realign/test_realign.cpp
+++ b/tests/realign/test_realign.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/reduced_aminoacid/test_reduced_aminoacid.cpp b/tests/reduced_aminoacid/test_reduced_aminoacid.cpp
index 66bb7c6..6bca707 100644
--- a/tests/reduced_aminoacid/test_reduced_aminoacid.cpp
+++ b/tests/reduced_aminoacid/test_reduced_aminoacid.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -42,6 +42,11 @@
 SEQAN_BEGIN_TESTSUITE(test_reduced_aminoacid)
 {
 //     SEQAN_CALL_TEST(test_reduced_aminoacid_cluster_red);
+    SEQAN_CALL_TEST(test_reduced_aminoacid_buchfink11);
+    SEQAN_CALL_TEST(test_reduced_aminoacid_cannata10);
+    SEQAN_CALL_TEST(test_reduced_aminoacid_li10);
+    SEQAN_CALL_TEST(test_reduced_aminoacid_solis10);
+    SEQAN_CALL_TEST(test_reduced_aminoacid_murphy5);
     SEQAN_CALL_TEST(test_reduced_aminoacid_murphy10);
     SEQAN_CALL_TEST(test_reduced_aminoacid_murphy10_moditerators);
     SEQAN_CALL_TEST(test_reduced_aminoacid_murphy10_modview_fmindex);
diff --git a/tests/reduced_aminoacid/test_reduced_aminoacid.h b/tests/reduced_aminoacid/test_reduced_aminoacid.h
index 97158e0..c147f77 100644
--- a/tests/reduced_aminoacid/test_reduced_aminoacid.h
+++ b/tests/reduced_aminoacid/test_reduced_aminoacid.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -92,6 +92,101 @@ SEQAN_DEFINE_TEST(test_reduced_aminoacid_cluster_red)
 }
 #endif
 
+SEQAN_DEFINE_TEST(test_reduced_aminoacid_buchfink11)
+{
+    typedef SimpleType<unsigned char, ReducedAminoAcid_<Buchfink11> >
+            ReducedAminoAcidBuchfink11;
+
+    CharString str = "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz*+#";
+    String<AminoAcid> aas = "ABCDEFGHIJKLMNOPQRSTUVWYZX*";
+
+    // N = 11
+    {
+        String<ReducedAminoAcidBuchfink11> conv = str;
+        SEQAN_ASSERT_EQ(
+            CharString(conv),
+            "AABBCCBBBBFFGGHHIIIIBBIIMMBBBBPPBBBBAAAACCIIWWAAYYBBFAA");
+        conv = aas;
+        SEQAN_ASSERT_EQ(CharString(conv), "ABCBBFGHIIBIMBBPBBAACIWYBAF");
+    }
+}
+
+SEQAN_DEFINE_TEST(test_reduced_aminoacid_cannata10)
+{
+    typedef SimpleType<unsigned char, ReducedAminoAcid_<Cannata10> >
+            ReducedAminoAcidCannata10;
+
+    CharString str = "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz*+#";
+    String<AminoAcid> aas = "ABCDEFGHIJKLMNOPQRSTUVWYZX*";
+
+    // N = 10
+    {
+        String<ReducedAminoAcidCannata10> conv = str;
+        SEQAN_ASSERT_EQ(
+            CharString(conv),
+            "AABBCCBBEEFFAAHHIIIIKKIIIIBBKKPPEEKKAAAACCIIWWAAFFEEFAA");
+        conv = aas;
+        SEQAN_ASSERT_EQ(CharString(conv), "ABCBEFAHIIKIIBKPEKAACIWFEAF");
+    }
+}
+
+SEQAN_DEFINE_TEST(test_reduced_aminoacid_li10)
+{
+    typedef SimpleType<unsigned char, ReducedAminoAcid_<Li10> >
+            ReducedAminoAcidLi10;
+
+    CharString str = "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz*+#";
+    String<AminoAcid> aas = "ABCDEFGHIJKLMNOPQRSTUVWYZX*";
+
+    // N = 10
+    {
+        String<ReducedAminoAcidLi10> conv = str;
+        SEQAN_ASSERT_EQ(
+            CharString(conv),
+            "AABBCCBBBBFFGGHHIIJJKKJJJJHHKKPPBBKKAAAACCIIFFAAFFBBFAA");
+        conv = aas;
+        SEQAN_ASSERT_EQ(CharString(conv), "ABCBBFGHIJKJJHKPBKAACIFFBAF");
+    }
+}
+
+SEQAN_DEFINE_TEST(test_reduced_aminoacid_solis10)
+{
+    typedef SimpleType<unsigned char, ReducedAminoAcid_<Solis10> >
+            ReducedAminoAcidSolis10;
+
+    CharString str = "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz*+#";
+    String<AminoAcid> aas = "ABCDEFGHIJKLMNOPQRSTUVWYZX*";
+
+    // N = 10
+    {
+        String<ReducedAminoAcidSolis10> conv = str;
+        SEQAN_ASSERT_EQ(
+            CharString(conv),
+            "AABBCCBBBBFFGGHHIIIIKKIIIIGGHHPPGGHHGGPPCCIIWWAAWWBBFAA");
+        conv = aas;
+        SEQAN_ASSERT_EQ(CharString(conv), "ABCBBFGHIIKIIGHPGHGPCIWWBAF");
+    }
+}
+
+SEQAN_DEFINE_TEST(test_reduced_aminoacid_murphy5)
+{
+    typedef SimpleType<unsigned char, ReducedAminoAcid_<Murphy5> >
+            ReducedAminoAcidMurphy5;
+
+    CharString str = "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz*+#";
+    String<AminoAcid> aas = "ABCDEFGHIJKLMNOPQRSTUVWYZX*";
+
+    // N = 5
+    {
+        String<ReducedAminoAcidMurphy5> conv = str;
+        SEQAN_ASSERT_EQ(
+            CharString(conv),
+            "AABBCCBBBBFFAAHHCCCCHHCCCCBBHHAABBHHAAAACCCCFFAAFFBBFAA");
+        conv = aas;
+        SEQAN_ASSERT_EQ(CharString(conv), "ABCBBFAHCCHCCBHABHAACCFFBAF");
+    }
+}
+
 SEQAN_DEFINE_TEST(test_reduced_aminoacid_murphy10)
 {
     typedef SimpleType<unsigned char, ReducedAminoAcid_<Murphy10> >
diff --git a/tests/rna_io/CMakeLists.txt b/tests/rna_io/CMakeLists.txt
index d450d1e..fb2e9a7 100644
--- a/tests/rna_io/CMakeLists.txt
+++ b/tests/rna_io/CMakeLists.txt
@@ -15,7 +15,9 @@ message (STATUS "Configuring tests/rna_io")
 # ----------------------------------------------------------------------------
 
 # Search SeqAn and select dependencies.
-find_package (SeqAn REQUIRED)
+if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP")
+    find_package (SeqAn REQUIRED)
+endif ()
 
 # ----------------------------------------------------------------------------
 # Build Setup
diff --git a/tests/rna_io/test_rna_io.cpp b/tests/rna_io/test_rna_io.cpp
index fcbd9ab..2951d7b 100644
--- a/tests/rna_io/test_rna_io.cpp
+++ b/tests/rna_io/test_rna_io.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/rna_io/test_rna_io.h b/tests/rna_io/test_rna_io.h
index 593d01c..2131c84 100644
--- a/tests/rna_io/test_rna_io.h
+++ b/tests/rna_io/test_rna_io.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/roi_io/test_roi_io.cpp b/tests/roi_io/test_roi_io.cpp
index a671ffa..4b743bf 100644
--- a/tests/roi_io/test_roi_io.cpp
+++ b/tests/roi_io/test_roi_io.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -90,8 +90,7 @@ SEQAN_DEFINE_TEST(test_roi_write_roi_record)
 
 SEQAN_DEFINE_TEST(test_roi_roi_file_read)
 {
-    seqan::CharString inPath = SEQAN_PATH_TO_ROOT();
-    append(inPath, "/tests/roi_io/example.roi");
+    seqan::CharString inPath = seqan::getAbsolutePath("/tests/roi_io/example.roi");
 
     seqan::RoiFileIn roiFileIn(toCString(inPath));
 
@@ -129,7 +128,7 @@ SEQAN_DEFINE_TEST(test_roi_roi_file_read)
 
 SEQAN_DEFINE_TEST(test_roi_roi_file_write)
 {
-    seqan::CharString tmpPath = SEQAN_PATH_TO_ROOT();
+    seqan::CharString tmpPath = SEQAN_TEMP_FILENAME();
     append(tmpPath, ".roi");
 
     seqan::RoiFileOut roiFileOut(toCString(tmpPath));
@@ -162,8 +161,7 @@ SEQAN_DEFINE_TEST(test_roi_roi_file_write)
 
     close(roiFileOut);
 
-    seqan::CharString goldPath(SEQAN_PATH_TO_ROOT());
-    append(goldPath, "/tests/roi_io/example.roi");
+    seqan::CharString goldPath(seqan::getAbsolutePath("/tests/roi_io/example.roi"));
     SEQAN_ASSERT(seqan::_compareTextFiles(toCString(tmpPath), toCString(goldPath)));
 }
 
diff --git a/tests/score/test_score.cpp b/tests/score/test_score.cpp
index 9dc358a..82a1c53 100644
--- a/tests/score/test_score.cpp
+++ b/tests/score/test_score.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -125,8 +125,7 @@ SEQAN_DEFINE_TEST(test_score_matrix) {
 
     // Define path to BLOSUM62 matrix that we want to load.
     // TODO(holtgrew): It should be easier to construct these paths.
-    String<char> pathToTestSrc = SEQAN_PATH_TO_ROOT();
-    append(pathToTestSrc, "/tests/score/");
+    String<char> pathToTestSrc = getAbsolutePath("/tests/score/");
     String<char> pathToBlosum62(pathToTestSrc);
     append(pathToBlosum62, "BLOSUM62");
 
@@ -251,8 +250,7 @@ SEQAN_DEFINE_TEST(test_score_matrix) {
 SEQAN_DEFINE_TEST(test_score_matrix_file) {
     // TODO(holtgrew): It should be easier to construct these paths.
     // The path to the directory with the test's sources and fixtures.
-    String<char> pathToTestSrc = SEQAN_PATH_TO_ROOT();
-    append(pathToTestSrc, "/tests/score/");
+    String<char> pathToTestSrc = getAbsolutePath("/tests/score/");
 
     // Load fixture BLOSUM62 matrix.
     // TODO(holtgrew): Should be done in a function.
@@ -479,8 +477,7 @@ SEQAN_DEFINE_TEST(test_score_matrix_data) {
     typedef Score<TValue, ScoreMatrix<AminoAcid, ScoreMatrixFile> > TScore;
 
     // TODO(holtgrew): It should be easier to construct these paths.
-    String<char> pathToTestSrc = SEQAN_PATH_TO_ROOT();
-    append(pathToTestSrc, "/tests/score/");
+    String<char> pathToTestSrc = getAbsolutePath("/tests/score/");
 
     // Test with BLOSUM30.
     {
diff --git a/tests/seeds/seed_set_test_helpers.h b/tests/seeds/seed_set_test_helpers.h
index 0a85280..5bc261e 100644
--- a/tests/seeds/seed_set_test_helpers.h
+++ b/tests/seeds/seed_set_test_helpers.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/seeds/test_align_banded_chain_impl.cpp b/tests/seeds/test_align_banded_chain_impl.cpp
index af04e69..b3118da 100644
--- a/tests/seeds/test_align_banded_chain_impl.cpp
+++ b/tests/seeds/test_align_banded_chain_impl.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -66,7 +66,7 @@ void testBandedChainAlignmentEmptyChain(TGapCosts const &)
         scoreScheme = Score<int,Simple>(5, -3, -1, -5);
 
     int score = bandedChainAlignment(align, seedSet, scoreScheme, alignConfig, 5);
-    SEQAN_ASSERT_EQ(score, MinValue<int>::VALUE);
+    SEQAN_ASSERT_EQ(score, std::numeric_limits<int>::min());
     SEQAN_ASSERT_EQ(row(align,0), seqH);
     SEQAN_ASSERT_EQ(row(align,1), seqV);
 }
diff --git a/tests/seeds/test_banded_chain_alignment_interface.cpp b/tests/seeds/test_banded_chain_alignment_interface.cpp
index ac2d187..f4a887d 100644
--- a/tests/seeds/test_banded_chain_alignment_interface.cpp
+++ b/tests/seeds/test_banded_chain_alignment_interface.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/seeds/test_seeds_combination.cpp b/tests/seeds/test_seeds_combination.cpp
index 698e863..4aebb33 100644
--- a/tests/seeds/test_seeds_combination.cpp
+++ b/tests/seeds/test_seeds_combination.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/seeds/test_seeds_extension.cpp b/tests/seeds/test_seeds_extension.cpp
index 16ecf9d..e8a6ce6 100644
--- a/tests/seeds/test_seeds_extension.cpp
+++ b/tests/seeds/test_seeds_extension.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/seeds/test_seeds_global_chaining.cpp b/tests/seeds/test_seeds_global_chaining.cpp
index 3cb5b82..e8b510e 100644
--- a/tests/seeds/test_seeds_global_chaining.cpp
+++ b/tests/seeds/test_seeds_global_chaining.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -116,6 +116,32 @@ SEQAN_DEFINE_TEST(test_seeds_global_chaining_sparse_length)
         SEQAN_ASSERT_EQ(1u, length(result));
         SEQAN_ASSERT_EQ(TSeed(0, 93, 281, 342), result[0]);
     }
+
+    { // Issue #2082
+       TSeedSet seedSet;
+
+       addSeed(seedSet, TSeed(0, 0, 3), Single());
+       addSeed(seedSet, TSeed(2, 3, 2), Single());
+
+       TSeedChain result;
+       chainSeedsGlobally(result, seedSet, SparseChaining());
+
+       SEQAN_ASSERT_EQ(1u, length(result));
+       SEQAN_ASSERT_EQ(TSeed(0, 0, 3), result[0]);
+   }
+
+   { // Issue #2082
+        TSeedSet seedSet;
+
+        addSeed(seedSet, TSeed(0, 0, 100), Single());
+        addSeed(seedSet, TSeed(95, 95, 10), Single());
+
+        TSeedChain result;
+        chainSeedsGlobally(result, seedSet, SparseChaining());
+
+        SEQAN_ASSERT_EQ(1u, length(result));
+        SEQAN_ASSERT_EQ(TSeed(0, 0, 100), result[0]);
+    }
 }
 
 SEQAN_BEGIN_TESTSUITE(test_seeds_global_chaining)
diff --git a/tests/seeds/test_seeds_seed_base.cpp b/tests/seeds/test_seeds_seed_base.cpp
index 2df58fa..7c9db86 100644
--- a/tests/seeds/test_seeds_seed_base.cpp
+++ b/tests/seeds/test_seeds_seed_base.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/seeds/test_seeds_seed_chained.cpp b/tests/seeds/test_seeds_seed_chained.cpp
index e814753..a5f5a13 100644
--- a/tests/seeds/test_seeds_seed_chained.cpp
+++ b/tests/seeds/test_seeds_seed_chained.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/seeds/test_seeds_seed_diagonal.cpp b/tests/seeds/test_seeds_seed_diagonal.cpp
index 7bad054..9928b40 100644
--- a/tests/seeds/test_seeds_seed_diagonal.cpp
+++ b/tests/seeds/test_seeds_seed_diagonal.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/seeds/test_seeds_seed_set_base.cpp b/tests/seeds/test_seeds_seed_set_base.cpp
index e71b22f..b6078aa 100644
--- a/tests/seeds/test_seeds_seed_set_base.cpp
+++ b/tests/seeds/test_seeds_seed_set_base.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/seeds/test_seeds_seed_set_unordered.cpp b/tests/seeds/test_seeds_seed_set_unordered.cpp
index 273e2dc..4dffc1d 100644
--- a/tests/seeds/test_seeds_seed_set_unordered.cpp
+++ b/tests/seeds/test_seeds_seed_set_unordered.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/seeds/test_seeds_seed_simple.cpp b/tests/seeds/test_seeds_seed_simple.cpp
index c52bdde..7299273 100644
--- a/tests/seeds/test_seeds_seed_simple.cpp
+++ b/tests/seeds/test_seeds_seed_simple.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/seq_io/test_fai_index.h b/tests/seq_io/test_fai_index.h
index c05984b..77a6978 100644
--- a/tests/seq_io/test_fai_index.h
+++ b/tests/seq_io/test_fai_index.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -39,8 +39,7 @@
 
 SEQAN_DEFINE_TEST(test_seq_io_genomic_fai_index_build)
 {
-    seqan::CharString filePath = SEQAN_PATH_TO_ROOT();
-    append(filePath, "/tests/seq_io/adeno_genome.fa");
+    seqan::CharString filePath = getAbsolutePath("/tests/seq_io/adeno_genome.fa");
 
     seqan::FaiIndex faiIndex;
     SEQAN_ASSERT_EQ(build(faiIndex, toCString(filePath)), true);
@@ -54,8 +53,7 @@ SEQAN_DEFINE_TEST(test_seq_io_genomic_fai_index_build)
 
 SEQAN_DEFINE_TEST(test_seq_io_genomic_fai_index_write)
 {
-    seqan::CharString filePath = SEQAN_PATH_TO_ROOT();
-    append(filePath, "/tests/seq_io/adeno_genome.fa");
+    seqan::CharString filePath = getAbsolutePath("/tests/seq_io/adeno_genome.fa");
 
     seqan::FaiIndex faiIndex;
     SEQAN_ASSERT_EQ(build(faiIndex, toCString(filePath)), true);
@@ -64,15 +62,13 @@ SEQAN_DEFINE_TEST(test_seq_io_genomic_fai_index_write)
     seqan::CharString tmpOut = SEQAN_TEMP_FILENAME();
     SEQAN_ASSERT_EQ(save(faiIndex, toCString(tmpOut)), true);
 
-    seqan::CharString pathToExpected = SEQAN_PATH_TO_ROOT();
-    append(pathToExpected, "/tests/seq_io/adeno_genome.fa.fai");
+    seqan::CharString pathToExpected = getAbsolutePath("/tests/seq_io/adeno_genome.fa.fai");
     SEQAN_ASSERT_MSG(seqan::_compareTextFiles(toCString(pathToExpected), toCString(tmpOut)), "Output should match example.");
 }
 
 SEQAN_DEFINE_TEST(test_seq_io_genomic_fai_index_read)
 {
-    seqan::CharString filePath = SEQAN_PATH_TO_ROOT();
-    append(filePath, "/tests/seq_io/adeno_genome.fa");
+    seqan::CharString filePath = getAbsolutePath("/tests/seq_io/adeno_genome.fa");
 
     seqan::FaiIndex faiIndex;
     SEQAN_ASSERT_EQ(open(faiIndex, toCString(filePath)), true);
@@ -86,8 +82,7 @@ SEQAN_DEFINE_TEST(test_seq_io_genomic_fai_index_read)
 
 SEQAN_DEFINE_TEST(test_seq_io_genomic_fai_index_read_sequence)
 {
-    seqan::CharString filePath = SEQAN_PATH_TO_ROOT();
-    append(filePath, "/tests/seq_io/adeno_genome.fa");
+    seqan::CharString filePath = getAbsolutePath("/tests/seq_io/adeno_genome.fa");
 
     seqan::FaiIndex faiIndex;
     SEQAN_ASSERT_EQ(open(faiIndex, toCString(filePath)), true);
@@ -102,8 +97,7 @@ SEQAN_DEFINE_TEST(test_seq_io_genomic_fai_index_read_region)
 {
     // From integers.
     {
-        seqan::CharString filePath = SEQAN_PATH_TO_ROOT();
-        append(filePath, "/tests/seq_io/adeno_genome.fa");
+        seqan::CharString filePath = getAbsolutePath("/tests/seq_io/adeno_genome.fa");
 
         seqan::FaiIndex faiIndex;
         SEQAN_ASSERT_EQ(open(faiIndex, toCString(filePath)), true);
@@ -114,8 +108,7 @@ SEQAN_DEFINE_TEST(test_seq_io_genomic_fai_index_read_region)
     }
     // From integers, over the end of the sequence.
     {
-        seqan::CharString filePath = SEQAN_PATH_TO_ROOT();
-        append(filePath, "/tests/seq_io/adeno_genome.fa");
+        seqan::CharString filePath = getAbsolutePath("/tests/seq_io/adeno_genome.fa");
 
         seqan::FaiIndex faiIndex;
         SEQAN_ASSERT_EQ(open(faiIndex, toCString(filePath)), true);
@@ -126,8 +119,7 @@ SEQAN_DEFINE_TEST(test_seq_io_genomic_fai_index_read_region)
     }
     // From GenomicRegion.
     {
-        seqan::CharString filePath = SEQAN_PATH_TO_ROOT();
-        append(filePath, "/tests/seq_io/adeno_genome.fa");
+        seqan::CharString filePath = getAbsolutePath("/tests/seq_io/adeno_genome.fa");
 
         seqan::FaiIndex faiIndex;
         SEQAN_ASSERT_EQ(open(faiIndex, toCString(filePath)), true);
diff --git a/tests/seq_io/test_genomic_region.h b/tests/seq_io/test_genomic_region.h
index a8bbf6e..e13dd12 100644
--- a/tests/seq_io/test_genomic_region.h
+++ b/tests/seq_io/test_genomic_region.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/seq_io/test_read_bam.h b/tests/seq_io/test_read_bam.h
index 4a28a24..43030a2 100644
--- a/tests/seq_io/test_read_bam.h
+++ b/tests/seq_io/test_read_bam.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/seq_io/test_seq_io.cpp b/tests/seq_io/test_seq_io.cpp
index 8aa3d4f..67aec3e 100644
--- a/tests/seq_io/test_seq_io.cpp
+++ b/tests/seq_io/test_seq_io.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/seq_io/test_seq_io_generic.h b/tests/seq_io/test_seq_io_generic.h
index 318db0b..6afbe39 100644
--- a/tests/seq_io/test_seq_io_generic.h
+++ b/tests/seq_io/test_seq_io_generic.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/seq_io/test_sequence_file.h b/tests/seq_io/test_sequence_file.h
index ccd0712..81285fb 100644
--- a/tests/seq_io/test_sequence_file.h
+++ b/tests/seq_io/test_sequence_file.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -47,8 +47,7 @@ SEQAN_DEFINE_TEST(test_seq_io_sequence_file_recognize_file_type_gz_fasta)
 {
 #if SEQAN_HAS_ZLIB
     // Build path to file.
-    seqan::CharString filePath = SEQAN_PATH_TO_ROOT();
-    append(filePath, "/tests/seq_io/test_dna.fa.gz");
+    seqan::CharString filePath = getAbsolutePath("/tests/seq_io/test_dna.fa.gz");
 
     // Create SequenceStream object.
     SeqFileIn seqIO(toCString(filePath));
@@ -62,8 +61,7 @@ SEQAN_DEFINE_TEST(test_seq_io_sequence_file_recognize_file_type_bz2_fasta)
 {
 #if SEQAN_HAS_BZIP2
     // Build path to file.
-    seqan::CharString filePath = SEQAN_PATH_TO_ROOT();
-    append(filePath, "/tests/seq_io/test_dna.fa.bz2");
+    seqan::CharString filePath = getAbsolutePath("/tests/seq_io/test_dna.fa.bz2");
 
     // Create SequenceStream object.
     SeqFileIn seqIO(toCString(filePath));
@@ -80,8 +78,7 @@ SEQAN_DEFINE_TEST(test_seq_io_sequence_file_recognize_file_type_bz2_fasta)
 SEQAN_DEFINE_TEST(test_seq_io_sequence_file_recognize_file_format_text_fasta)
 {
     // Build path to file.
-    seqan::CharString filePath = SEQAN_PATH_TO_ROOT();
-    append(filePath, "/tests/seq_io/test_dna.fa");
+    seqan::CharString filePath = getAbsolutePath("/tests/seq_io/test_dna.fa");
 
     // Create SequenceStream object.
     SeqFileIn seqIO(toCString(filePath));
@@ -93,8 +90,7 @@ SEQAN_DEFINE_TEST(test_seq_io_sequence_file_recognize_file_format_text_fasta)
 SEQAN_DEFINE_TEST(test_seq_io_sequence_file_recognize_file_format_text_fastq)
 {
     // Build path to file.
-    seqan::CharString filePath = SEQAN_PATH_TO_ROOT();
-    append(filePath, "/tests/seq_io/test_dna.fq");
+    seqan::CharString filePath = getAbsolutePath("/tests/seq_io/test_dna.fq");
 
     // Create SequenceStream object.
     SeqFileIn seqIO(toCString(filePath));
@@ -111,8 +107,7 @@ template <typename TId, typename TSeq>
 void testSeqIOSequenceFileReadRecordTextFasta()
 {
     // Build path to file.
-    seqan::CharString filePath = SEQAN_PATH_TO_ROOT();
-    append(filePath, "/tests/seq_io/test_dna.fa");
+    seqan::CharString filePath = getAbsolutePath("/tests/seq_io/test_dna.fa");
 
     // Create SequenceStream object.
     SeqFileIn seqIO(toCString(filePath));
@@ -147,8 +142,7 @@ SEQAN_DEFINE_TEST(test_seq_io_sequence_file_read_record_text_fasta)
 SEQAN_DEFINE_TEST(test_seq_io_sequence_file_read_all_text_fasta)
 {
     // Build path to file.
-    seqan::CharString filePath = SEQAN_PATH_TO_ROOT();
-    append(filePath, "/tests/seq_io/test_dna.fa");
+    seqan::CharString filePath = getAbsolutePath("/tests/seq_io/test_dna.fa");
 
     // Create SequenceStream object.
     SeqFileIn seqIO(toCString(filePath));
@@ -196,8 +190,7 @@ SEQAN_DEFINE_TEST(test_seq_io_sequence_file_write_record_text_fasta)
 
     close(seqIO);  // Make sure we can read this later.
 
-    seqan::CharString pathToExpected = SEQAN_PATH_TO_ROOT();
-    append(pathToExpected, "/tests/seq_io/test_dna.fa");
+    seqan::CharString pathToExpected = getAbsolutePath("/tests/seq_io/test_dna.fa");
     SEQAN_ASSERT_MSG(seqan::_compareTextFilesAlt(toCString(pathToExpected), toCString(filePath)), "Output should match example.");
 }
 
@@ -224,8 +217,7 @@ SEQAN_DEFINE_TEST(test_seq_io_sequence_file_write_all_text_fasta)
 
     close(seqIO);  // Make sure we can read this later.
 
-    seqan::CharString pathToExpected = SEQAN_PATH_TO_ROOT();
-    append(pathToExpected, "/tests/seq_io/test_dna.fa");
+    seqan::CharString pathToExpected = getAbsolutePath("/tests/seq_io/test_dna.fa");
     SEQAN_ASSERT_MSG(seqan::_compareTextFilesAlt(toCString(pathToExpected), toCString(filePath)), "Output should match example.");
 }
 
@@ -234,8 +226,7 @@ SEQAN_DEFINE_TEST(test_seq_io_sequence_file_write_record_text_fastq_no_qual)
     // Build path to file.
     seqan::CharString filePath = SEQAN_TEMP_FILENAME();
     append(filePath, ".fq");
-    seqan::CharString pathToExpected = SEQAN_PATH_TO_ROOT();
-    append(pathToExpected, "/tests/seq_io/test_dna.fq");
+    seqan::CharString pathToExpected = getAbsolutePath("/tests/seq_io/test_dna.fq");
 
     // Create SequenceStream object.
     SeqFileIn seqIn(toCString(pathToExpected));
@@ -281,8 +272,7 @@ SEQAN_DEFINE_TEST(test_seq_io_sequence_file_write_record_text_fastq_with_qual)
 
     close(seqIO);  // Make sure we can read this later.
 
-    seqan::CharString pathToExpected = SEQAN_PATH_TO_ROOT();
-    append(pathToExpected, "/tests/seq_io/test_dna.fq");
+    seqan::CharString pathToExpected = getAbsolutePath("/tests/seq_io/test_dna.fq");
     SEQAN_ASSERT_MSG(seqan::_compareTextFilesAlt(toCString(pathToExpected), toCString(filePath)), "Output should match example.");
 }
 
@@ -309,8 +299,7 @@ SEQAN_DEFINE_TEST(test_seq_io_sequence_file_write_all_text_fastq_no_qual)
 
     close(seqIO);  // Make sure we can read this later.
 
-    seqan::CharString pathToExpected = SEQAN_PATH_TO_ROOT();
-    append(pathToExpected, "/tests/seq_io/test_dna.fq");
+    seqan::CharString pathToExpected = getAbsolutePath("/tests/seq_io/test_dna.fq");
     SEQAN_ASSERT_MSG(seqan::_compareTextFilesAlt(toCString(pathToExpected), toCString(filePath)), "Output should match example.");
 }
 
@@ -341,8 +330,7 @@ SEQAN_DEFINE_TEST(test_seq_io_sequence_file_write_all_text_fastq_with_qual)
 
     close(seqIO);  // Make sure we can read this later.
 
-    seqan::CharString pathToExpected = SEQAN_PATH_TO_ROOT();
-    append(pathToExpected, "/tests/seq_io/test_dna.fq");
+    seqan::CharString pathToExpected = getAbsolutePath("/tests/seq_io/test_dna.fq");
     SEQAN_ASSERT_MSG(seqan::_compareTextFilesAlt(toCString(pathToExpected), toCString(filePath)), "Output should match example.");
 }
 
diff --git a/tests/seq_io/test_stream_read_embl.h b/tests/seq_io/test_stream_read_embl.h
index b9045d5..e9c6f53 100644
--- a/tests/seq_io/test_stream_read_embl.h
+++ b/tests/seq_io/test_stream_read_embl.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/seq_io/test_stream_read_genbank.h b/tests/seq_io/test_stream_read_genbank.h
index 18612f5..3202999 100644
--- a/tests/seq_io/test_stream_read_genbank.h
+++ b/tests/seq_io/test_stream_read_genbank.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/seq_io/test_stream_record_reader_fasta.h b/tests/seq_io/test_stream_record_reader_fasta.h
index fa2fbf0..fdf6c31 100644
--- a/tests/seq_io/test_stream_record_reader_fasta.h
+++ b/tests/seq_io/test_stream_record_reader_fasta.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/seq_io/test_stream_write_fasta.h b/tests/seq_io/test_stream_write_fasta.h
index b53d90f..5fd1a3c 100644
--- a/tests/seq_io/test_stream_write_fasta.h
+++ b/tests/seq_io/test_stream_write_fasta.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/seq_io/test_tag_select_intersect.h b/tests/seq_io/test_tag_select_intersect.h
index e29ea56..46797fb 100644
--- a/tests/seq_io/test_tag_select_intersect.h
+++ b/tests/seq_io/test_tag_select_intersect.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/seq_io/test_write_bam.h b/tests/seq_io/test_write_bam.h
index 0047d13..816ac71 100644
--- a/tests/seq_io/test_write_bam.h
+++ b/tests/seq_io/test_write_bam.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/sequence/test_segment.h b/tests/sequence/test_segment.h
index 31d6545..0cdcf7f 100644
--- a/tests/sequence/test_segment.h
+++ b/tests/sequence/test_segment.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/sequence/test_segment_beta.h b/tests/sequence/test_segment_beta.h
index 40a3515..16c5f13 100755
--- a/tests/sequence/test_segment_beta.h
+++ b/tests/sequence/test_segment_beta.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/sequence/test_sequence.cpp b/tests/sequence/test_sequence.cpp
index 6bc826e..54d0c6e 100644
--- a/tests/sequence/test_sequence.cpp
+++ b/tests/sequence/test_sequence.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/sequence/test_sequence.h b/tests/sequence/test_sequence.h
index d8dc2c6..7f6d2e5 100755
--- a/tests/sequence/test_sequence.h
+++ b/tests/sequence/test_sequence.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -1400,39 +1400,20 @@ std::cout << __LINE__ << std::endl;
 std::cout << __LINE__ << std::endl;
 }
 
-// Test of getValue().
-template <typename TString>
-void testSequenceGetValue(TString & /*Tag*/)
-{
-    typedef typename Value<TString>::Type TValue;
-
-     // In contrast to value(), getValue() does not return a reference but a copy.
-     // We test this using the variable value_.
-    TString string;
-    assign(string, "ACGT");
-    TValue dummy_ = 'T';
-    TValue & value_ = dummy_;
-    SEQAN_ASSERT_EQ(value_, TValue('T'));
-
-    value_ = getValue(string, 0);
-    SEQAN_ASSERT_EQ(value_, TValue('A'));
-
-    value_ = 'T';
-    SEQAN_ASSERT_EQ(getValue(string, 0), TValue('A'));
-}
-
 SEQAN_TYPED_TEST(StringTestCommon, GetValue)
 {
-    CountingChar::clear();
-
-    typename TestFixture::TString str;
-    testSequenceGetValue(str);
-
-    //TODO
-//     typename TestFixture::TString const constStr;
-//     testSequenceGetValue(constStr);
+    SEQAN_SKIP_TEST; // getValue() is deprecated.
 
-    testConstructDeconstruct(str);
+//    CountingChar::clear();
+//
+//    typename TestFixture::TString str;
+//    testSequenceGetValue(str);
+//
+//    //TODO
+////     typename TestFixture::TString const constStr;
+////     testSequenceGetValue(constStr);
+//
+//    testConstructDeconstruct(str);
 }
 
 // Test of insert().
@@ -1536,9 +1517,9 @@ void testSequenceIter(TString & /*Tag*/)
         TIterator iterator = iter(string, 0);
         TStandardIterator standardIterator = iter(string, 0);
         TRootedIterator rootedIterator = iter(string, 0);
-        SEQAN_ASSERT_EQ(getValue(iterator), getValue(string, 0));
-        SEQAN_ASSERT_EQ(getValue(standardIterator), getValue(string, 0));
-        SEQAN_ASSERT_EQ(getValue(rootedIterator), getValue(string, 0));
+        SEQAN_ASSERT_EQ(*iterator, getValue(string, 0));
+        SEQAN_ASSERT_EQ(*standardIterator, getValue(string, 0));
+        SEQAN_ASSERT_EQ(*rootedIterator, getValue(string, 0));
     }
 
     // Test on a non empty string.
@@ -1548,9 +1529,9 @@ void testSequenceIter(TString & /*Tag*/)
         TIterator iterator = iter(string, 3);
         TStandardIterator standardIterator = iter(string, 3);
         TRootedIterator rootedIterator = iter(string, 3);
-        SEQAN_ASSERT_EQ(getValue(iterator), getValue(string, 3));
-        SEQAN_ASSERT_EQ(getValue(standardIterator), getValue(string, 3));
-        SEQAN_ASSERT_EQ(getValue(rootedIterator), getValue(string, 3));
+        SEQAN_ASSERT_EQ(*iterator, getValue(string, 3));
+        SEQAN_ASSERT_EQ(*standardIterator, getValue(string, 3));
+        SEQAN_ASSERT_EQ(*rootedIterator, getValue(string, 3));
     }
 }
 
diff --git a/tests/sequence/test_sequence_std_adaptions.h b/tests/sequence/test_sequence_std_adaptions.h
index 6563545..71b4508 100644
--- a/tests/sequence/test_sequence_std_adaptions.h
+++ b/tests/sequence/test_sequence_std_adaptions.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/sequence/test_sequence_v2.cpp b/tests/sequence/test_sequence_v2.cpp
index 87f1ce7..52c1fb8 100755
--- a/tests/sequence/test_sequence_v2.cpp
+++ b/tests/sequence/test_sequence_v2.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/sequence/test_string.h b/tests/sequence/test_string.h
index 72ed4e5..eb0497e 100644
--- a/tests/sequence/test_string.h
+++ b/tests/sequence/test_string.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/sequence/test_string_packed_extension.h b/tests/sequence/test_string_packed_extension.h
index e91005b..f538293 100644
--- a/tests/sequence/test_string_packed_extension.h
+++ b/tests/sequence/test_string_packed_extension.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -628,7 +628,7 @@ void testStringPackedExtensionBitScanForward()
 
     {
         TBitString str;
-        SEQAN_ASSERT_EQ(bitScanForward(str), MaxValue<TPosition>::VALUE);
+        SEQAN_ASSERT_EQ(bitScanForward(str), std::numeric_limits<TPosition>::max());
     }
 }
 
@@ -662,7 +662,7 @@ void testStringPackedExtensionBitScanReverse()
 
     {
         TBitString str;
-        SEQAN_ASSERT_EQ(bitScanForward(str), MaxValue<TPosition>::VALUE);
+        SEQAN_ASSERT_EQ(bitScanForward(str), std::numeric_limits<TPosition>::max());
     }
 }
 
diff --git a/tests/sequence/test_string_set.h b/tests/sequence/test_string_set.h
index 4b7c313..5cf4acc 100755
--- a/tests/sequence/test_string_set.h
+++ b/tests/sequence/test_string_set.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -1353,50 +1353,19 @@ SEQAN_TYPED_TEST(StringSetTestCommon, Front)
 //    testConstructDeconstruct(strSet);
 }
 
-// Test of getValue().
-template <typename TStringSet>
-void testStringSetGetValue(TStringSet & /*Tag*/)
-{
-    using namespace seqan;
-
-    typedef typename RemoveConst<TStringSet>::Type TNonConstStringSet;
-    typedef typename TestStringSetValue_<TStringSet>::Type TString;
-
-     // In contrast to value(), getValue() does not return a reference but a copy.
-     // We test this using the variable value_.
-    TString str("CG");
-    TString str2("ACGT");
-    TString str3("CGACGT");
-
-    TNonConstStringSet nonConstStringSet;
-    appendValue(nonConstStringSet, str);
-    appendValue(nonConstStringSet, str2);
-    appendValue(nonConstStringSet, str3);
-    TStringSet stringSet(nonConstStringSet);
-    SEQAN_ASSERT(TString(getValue(stringSet, 1)) == TString(str2));
-}
-
-// TODO(singer): No appendValue for string sets of packed strings
-template <typename TValue, typename TStringSetSpec>
-void testStringSetGetValue(StringSet<String<TValue, Packed<> >, TStringSetSpec> & /*Tag*/) {}
-template <typename TValue, typename TStringSetSpec>
-void testStringSetGetValue(StringSet<String<TValue, Packed<> >, TStringSetSpec> const & /*Tag*/) {}
-template <typename TValue, typename TStringSetSpec>
-void testStringSetGetValue(StringSet<String<TValue, Array<100> >, TStringSetSpec> & /*Tag*/) {}
-template <typename TValue, typename TStringSetSpec>
-void testStringSetGetValue(StringSet<String<TValue, Array<100> >, TStringSetSpec> const & /*Tag*/) {}
-
 SEQAN_TYPED_TEST(StringSetTestCommon, GetValue)
 {
-    CountingChar::clear();
+    SEQAN_SKIP_TEST; // getValue() is deprecated.
 
-    typename TestFixture::TStringSet strSet;
-    testStringSetGetValue(strSet);
-
-    typename TestFixture::TStringSet const constStrSet;
-    testStringSetGetValue(constStrSet);
-
-//    testConstructDeconstruct(strSet);
+//    CountingChar::clear();
+//
+//    typename TestFixture::TStringSet strSet;
+//    testStringSetGetValue(strSet);
+//
+//    typename TestFixture::TStringSet const constStrSet;
+//    testStringSetGetValue(constStrSet);
+//
+////    testConstructDeconstruct(strSet);
 }
 
 // TODO (singer): not defined for const string sets.
@@ -1544,10 +1513,10 @@ void testStringSetIter(TStringSet & /*Tag*/)
         TIterator iterator = iter(stringSet, 0);
         TStandardIterator standardIterator = iter(stringSet, 0);
         TRootedIterator rootedIterator = iter(stringSet, 0);
-        SEQAN_ASSERT(TString(getValue(iterator)) == "AAAA");
-        SEQAN_ASSERT(getValue(iterator) == getValue(stringSet, 0));
-        SEQAN_ASSERT(getValue(standardIterator) == getValue(stringSet, 0));
-        SEQAN_ASSERT(getValue(rootedIterator) == getValue(stringSet, 0));
+        SEQAN_ASSERT(TString(*iterator) == "AAAA");
+        SEQAN_ASSERT(*iterator == getValue(stringSet, 0));
+        SEQAN_ASSERT(*standardIterator == getValue(stringSet, 0));
+        SEQAN_ASSERT(*rootedIterator == getValue(stringSet, 0));
     }
 
     // Test on a non empty stringSet.
@@ -1565,10 +1534,10 @@ void testStringSetIter(TStringSet & /*Tag*/)
         TIterator iterator = iter(stringSet, 3);
         TStandardIterator standardIterator = iter(stringSet, 3);
         TRootedIterator rootedIterator = iter(stringSet, 3);
-        SEQAN_ASSERT(TString(getValue(iterator)) == "TTTT");
-        SEQAN_ASSERT(getValue(iterator) == getValue(stringSet, 3));
-        SEQAN_ASSERT(getValue(standardIterator) == getValue(stringSet, 3));
-        SEQAN_ASSERT(getValue(rootedIterator) == getValue(stringSet, 3));
+        SEQAN_ASSERT(TString(*iterator) == "TTTT");
+        SEQAN_ASSERT(*iterator == getValue(stringSet, 3));
+        SEQAN_ASSERT(*standardIterator == getValue(stringSet, 3));
+        SEQAN_ASSERT(*rootedIterator == getValue(stringSet, 3));
     }
 }
 
diff --git a/tests/sequence/test_stringset.h b/tests/sequence/test_stringset.h
index f7808cd..1dbdc70 100644
--- a/tests/sequence/test_stringset.h
+++ b/tests/sequence/test_stringset.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/sequence/test_stringset_v2.cpp b/tests/sequence/test_stringset_v2.cpp
index 5fe7859..2338bbd 100644
--- a/tests/sequence/test_stringset_v2.cpp
+++ b/tests/sequence/test_stringset_v2.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/sequence_journaled/test_sequence_journaled.cpp b/tests/sequence_journaled/test_sequence_journaled.cpp
index ff77333..09a4bab 100755
--- a/tests/sequence_journaled/test_sequence_journaled.cpp
+++ b/tests/sequence_journaled/test_sequence_journaled.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/sequence_journaled/test_sequence_journaled.h b/tests/sequence_journaled/test_sequence_journaled.h
index 00123fc..2d297e7 100755
--- a/tests/sequence_journaled/test_sequence_journaled.h
+++ b/tests/sequence_journaled/test_sequence_journaled.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/sequence_journaled/test_sequence_journaled_iterator.h b/tests/sequence_journaled/test_sequence_journaled_iterator.h
index 6309037..606415d 100644
--- a/tests/sequence_journaled/test_sequence_journaled_iterator.h
+++ b/tests/sequence_journaled/test_sequence_journaled_iterator.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/rna_io/CMakeLists.txt b/tests/simd/CMakeLists.txt
similarity index 68%
copy from tests/rna_io/CMakeLists.txt
copy to tests/simd/CMakeLists.txt
index d450d1e..030c4ca 100644
--- a/tests/rna_io/CMakeLists.txt
+++ b/tests/simd/CMakeLists.txt
@@ -1,21 +1,25 @@
 # ===========================================================================
 #                  SeqAn - The Library for Sequence Analysis
 # ===========================================================================
-# File: /tests/rna_io/CMakeLists.txt
+# File: /tests/basic/CMakeLists.txt
 #
-# CMakeLists.txt file for the rna_io module tests.
+# CMakeLists.txt file for the basic module tests.
 # ===========================================================================
 
 cmake_minimum_required (VERSION 3.0.0)
-project (seqan_tests_rna_io CXX)
-message (STATUS "Configuring tests/rna_io")
+project (seqan_tests_simd CXX)
+message (STATUS "Configuring tests/simd")
 
 # ----------------------------------------------------------------------------
 # Dependencies
 # ----------------------------------------------------------------------------
 
 # Search SeqAn and select dependencies.
-find_package (SeqAn REQUIRED)
+if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP")
+    find_package (SeqAn REQUIRED)
+endif ()
+
+include (SeqAnSimdUtility)
 
 # ----------------------------------------------------------------------------
 # Build Setup
@@ -28,12 +32,14 @@ include_directories (${SEQAN_INCLUDE_DIRS})
 add_definitions (${SEQAN_DEFINITIONS})
 
 # Update the list of file names below if you add source files to your test.
-add_executable (test_rna_io
-                test_rna_io.cpp
-                test_rna_io.h)
-
-# Add dependencies found by find_package (SeqAn).
-target_link_libraries (test_rna_io ${SEQAN_LIBRARIES})
+add_executable (
+  test_simd_vector
+  test_simd_vector.cpp
+  test_simd_vector.h)
+target_link_libraries (test_simd_vector ${SEQAN_LIBRARIES})
+if (COMPILER_CLANG)
+  target_compile_options(test_simd_vector PRIVATE -ftemplate-depth=1024)
+endif()
 
 # Add CXX flags found by find_package (SeqAn).
 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SEQAN_CXX_FLAGS}")
@@ -42,4 +48,4 @@ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SEQAN_CXX_FLAGS}")
 # Register with CTest
 # ----------------------------------------------------------------------------
 
-add_test (NAME test_test_rna_io COMMAND $<TARGET_FILE:test_rna_io>)
+add_simd_platform_tests(test_simd_vector)
diff --git a/tests/basic/test_basic_simd_vector.cpp b/tests/simd/test_simd_vector.cpp
similarity index 76%
rename from tests/basic/test_basic_simd_vector.cpp
rename to tests/simd/test_simd_vector.cpp
index 94b6979..a7d83b7 100644
--- a/tests/basic/test_basic_simd_vector.cpp
+++ b/tests/simd/test_simd_vector.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -30,26 +30,26 @@
 //
 // ==========================================================================
 // Author: David Weese <david.weese at fu-berlin.de>
+//         Marcel Ehrhardt <marcel.ehrhardt at fu-berlin.de>
 // ==========================================================================
 // Tests for SIMD vectors.
 // ==========================================================================
 
 #include <seqan/basic.h>
-#include "test_basic_simd_vector.h"
+#include "test_simd_vector.h"
 
-SEQAN_BEGIN_TESTSUITE(test_basic_simd_vector)
+SEQAN_BEGIN_TESTSUITE(test_simd_vector)
 {
-#ifdef SEQAN_SIMD_ENABLED
-#ifdef SEQAN_SSE4
-    SEQAN_CALL_TEST(test_basic_simd_shuffle);
-    SEQAN_CALL_TEST(test_basic_simd_transpose_8x8);
-    SEQAN_CALL_TEST(test_basic_simd_transpose_16x16);
-#ifdef __AVX2__
-    SEQAN_CALL_TEST(test_basic_simd_shuffle_avx);
-    SEQAN_CALL_TEST(test_basic_simd_transpose_32x32);
-#endif  // #ifdef __AVX2__
-#endif  // #ifdef SEQAN_SSE4
-#endif
+#if defined(SEQAN_SEQANSIMD_ENABLED) && defined(__SSE4_1__)
+    SEQAN_CALL_TEST(test_simd_transpose_8x8);
+    SEQAN_CALL_TEST(test_simd_transpose_16x16);
+    SEQAN_CALL_TEST(test_simd_types);
+#endif  // defined(SEQAN_SEQANSIMD_ENABLED) && defined(__SSE4_1__)
+
+#if defined(SEQAN_SEQANSIMD_ENABLED) && defined(__AVX2__)
+    SEQAN_CALL_TEST(test_simd_transpose_32x32);
+#endif  // defined(SEQAN_SEQANSIMD_ENABLED) && defined(__AVX2__)
+
+    return seqan::TestSystem::runAll();
 }
 SEQAN_END_TESTSUITE
-
diff --git a/tests/simd/test_simd_vector.h b/tests/simd/test_simd_vector.h
new file mode 100644
index 0000000..dc4ec7e
--- /dev/null
+++ b/tests/simd/test_simd_vector.h
@@ -0,0 +1,979 @@
+// ==========================================================================
+//                 SeqAn - The Library for Sequence Analysis
+// ==========================================================================
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above copyright
+//       notice, this list of conditions and the following disclaimer in the
+//       documentation and/or other materials provided with the distribution.
+//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+//       its contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+// DAMAGE.
+//
+// ==========================================================================
+// Author: David Weese <david.weese at fu-berlin.de>
+//         Marcel Ehrhardt <marcel.ehrhardt at fu-berlin.de>
+// ==========================================================================
+// Tests for SIMD vectors.
+// ==========================================================================
+
+#ifndef SEQAN_CORE_TESTS_SIMD_TEST_SIMD_VECTOR_H_
+#define SEQAN_CORE_TESTS_SIMD_TEST_SIMD_VECTOR_H_
+
+#include <seqan/simd.h>
+#include <random>
+#include <seqan/sequence.h>
+#include <seqan/misc/bit_twiddling.h>
+
+#if defined(SEQAN_SIMD_ENABLED)
+namespace seqan {
+
+template <int ROWS, typename TVector>
+inline void test_matrix_transpose()
+{
+    typedef typename Value<TVector>::Type TValue;
+    typedef TVector TMatrix[LENGTH<TVector>::VALUE];
+    const int COLS = LENGTH<TVector>::VALUE;
+
+    String<TValue> random;
+    resize(random, ROWS * COLS);
+
+    std::mt19937 rng;
+    // http://stackoverflow.com/questions/31460733/why-arent-stduniform-int-distributionuint8-t-and-stduniform-int-distri
+    std::uniform_int_distribution<uint64_t> pdf(0, MaxValue<TValue>::VALUE);
+    for (unsigned i = 0; i < length(random); ++i)
+        random[i] = static_cast<TValue>(pdf(rng));
+
+    TMatrix tmp;
+    for (int i = 0; i < ROWS; ++i)
+        for (int j = 0; j < COLS; ++j)
+            tmp[i][j] = random[i * COLS + j];
+
+//    for(int i=0;i<ROWS;++i)
+//        print(std::cout, tmp[i]) << std::endl;
+
+    transpose<ROWS>(tmp);
+
+//    std::cout << std::endl;
+//    std::cout << std::endl;
+//    for(int i=0;i<DIM;++i)
+//        print(std::cout, tmp[i]) << std::endl;
+#if defined(__x86_64__) || defined(__amd64__)
+    _mm_empty();  // Fixes icpc warning #13203: No EMMS instruction before call to function
+#endif // defined(__x86_64__) || defined(__amd64__)
+    for (int i = 0; i < ROWS; ++i)
+        for (int j = 0; j < COLS; ++j)
+            SEQAN_ASSERT_EQ(tmp[i][j], random[j * ROWS + i]);
+}
+
+template <typename TSimdVector>
+void fillVectors(TSimdVector & a, TSimdVector & b)
+{
+    using namespace seqan;
+    constexpr auto length = LENGTH<TSimdVector>::VALUE;
+
+    for (auto i = 0; i < length; ++i)
+    {
+        a[i] = (i - 1) * 3;
+        b[i] = length - i;
+    }
+}
+
+template <typename TSimdVector, typename TSize>
+void reverseIndexSequence(TSimdVector & idx, TSize length)
+{
+    for (auto i = 0; i < length; ++i)
+    {
+        // note: umesimd swizzle interface has no a[i] = i; support.
+        assignValue(idx, i, length - i - 1);
+    }
+}
+
+template <typename TSimdVector>
+constexpr auto trueValue()
+{
+    using TSimdMaskVector = typename SimdMaskVector<TSimdVector>::Type;
+    using TValue = typename Value<TSimdMaskVector>::Type;
+    return static_cast<TValue>(-1);
+}
+
+} // namespace seqan
+
+// ----------------------------------------------------------------------------
+// Configuration of typed tests for simd vectors.
+// ----------------------------------------------------------------------------
+
+template <typename TSimdVector_>
+class SimdVectorTestCommon : public seqan::Test
+{
+public:
+    using TValue = typename seqan::Value<TSimdVector_>::Type;
+    constexpr static auto const LENGTH = seqan::LENGTH<TSimdVector_>::VALUE;
+    using TSimdVector = TSimdVector_;
+};
+
+template <typename TSimdVector_>
+class SimdVectorTestGather : public seqan::Test
+{
+public:
+    using TValue = typename seqan::Value<TSimdVector_>::Type;
+    constexpr static auto const LENGTH = seqan::LENGTH<TSimdVector_>::VALUE;
+    using TSimdVector = TSimdVector_;
+};
+
+typedef
+        seqan::TagList<seqan::SimdVector<int8_t, 16>::Type,
+        seqan::TagList<seqan::SimdVector<int16_t, 8>::Type,
+        seqan::TagList<seqan::SimdVector<int32_t, 4>::Type,
+        seqan::TagList<seqan::SimdVector<int64_t, 2>::Type,
+        seqan::TagList<seqan::SimdVector<uint8_t, 16>::Type,
+        seqan::TagList<seqan::SimdVector<uint16_t, 8>::Type,
+        seqan::TagList<seqan::SimdVector<uint32_t, 4>::Type,
+        seqan::TagList<seqan::SimdVector<uint64_t, 2>::Type
+        #if SEQAN_SIZEOF_MAX_VECTOR >= 32
+        , // Extension of the list above
+        seqan::TagList<seqan::SimdVector<int8_t,  32>::Type,
+        seqan::TagList<seqan::SimdVector<int16_t, 16>::Type,
+        seqan::TagList<seqan::SimdVector<int32_t,  8>::Type,
+        seqan::TagList<seqan::SimdVector<int64_t,  4>::Type,
+        seqan::TagList<seqan::SimdVector<uint8_t,  32>::Type,
+        seqan::TagList<seqan::SimdVector<uint16_t, 16>::Type,
+        seqan::TagList<seqan::SimdVector<uint32_t,  8>::Type,
+        seqan::TagList<seqan::SimdVector<uint64_t,  4>::Type
+        #if SEQAN_SIZEOF_MAX_VECTOR >= 64
+        , // Extension of the list above
+        seqan::TagList<seqan::SimdVector<int8_t,  64>::Type,
+        seqan::TagList<seqan::SimdVector<int16_t, 32>::Type,
+        seqan::TagList<seqan::SimdVector<int32_t, 16>::Type,
+        seqan::TagList<seqan::SimdVector<int64_t,  8>::Type,
+        seqan::TagList<seqan::SimdVector<uint8_t,  64>::Type,
+        seqan::TagList<seqan::SimdVector<uint16_t, 32>::Type,
+        seqan::TagList<seqan::SimdVector<uint32_t, 16>::Type,
+        seqan::TagList<seqan::SimdVector<uint64_t,  8>::Type
+        > > > > > > > >
+        #endif
+        > > > > > > > >
+        #endif
+        > > > > > > > >
+        SimdVectorCommonCommonTypes;
+
+SEQAN_TYPED_TEST_CASE(SimdVectorTestCommon, SimdVectorCommonCommonTypes);
+SEQAN_TYPED_TEST_CASE(SimdVectorTestGather, SimdVectorCommonCommonTypes);
+
+SEQAN_DEFINE_TEST(test_simd_types)
+{
+    using namespace seqan;
+
+    // SimdVector16Char
+    static_assert(std::is_same<SimdVector<int8_t, 16>::Type,  SimdVector16SChar>::value, "should be the same type");
+    static_assert(std::is_same<SimdVector<int16_t, 8>::Type,  SimdVector8Short>::value, "should be the same type");
+    static_assert(std::is_same<SimdVector<int32_t, 4>::Type,  SimdVector4Int>::value, "should be the same type");
+    static_assert(std::is_same<SimdVector<int64_t, 2>::Type,  SimdVector2Int64>::value, "should be the same type");
+    static_assert(std::is_same<SimdVector<uint8_t, 16>::Type, SimdVector16UChar>::value, "should be the same type");
+    static_assert(std::is_same<SimdVector<uint16_t, 8>::Type, SimdVector8UShort>::value, "should be the same type");
+    static_assert(std::is_same<SimdVector<uint32_t, 4>::Type, SimdVector4UInt>::value, "should be the same type");
+    static_assert(std::is_same<SimdVector<uint64_t, 2>::Type, SimdVector2UInt64>::value, "should be the same type");
+
+    static_assert(LENGTH<SimdVector4UInt>::VALUE == 4, "128bit register fits 4 int's");
+    static_assert(LENGTH<SimdVector<uint32_t, 4>::Type>::VALUE == 4, "128bit register fits 4 int's");
+    SimdVector<uint32_t, 4>::Type a128 = {0, 1, 2, 3};
+    for (uint32_t i = 0; i < 4; ++i) {
+        // std::cout << "DEBUG: " << i << ": " << a128[i] << " = " << i << std::endl;
+        SEQAN_ASSERT_EQ(a128[i], i);
+    }
+
+    // SimdVector32Char
+#if SEQAN_SIZEOF_MAX_VECTOR >= 32
+    static_assert(std::is_same<SimdVector<int8_t,  32>::Type,  SimdVector32SChar>::value, "should be the same type");
+    static_assert(std::is_same<SimdVector<int16_t, 16>::Type,  SimdVector16Short>::value, "should be the same type");
+    static_assert(std::is_same<SimdVector<int32_t,  8>::Type,  SimdVector8Int>::value, "should be the same type");
+    static_assert(std::is_same<SimdVector<int64_t,  4>::Type,  SimdVector4Int64>::value, "should be the same type");
+    static_assert(std::is_same<SimdVector<uint8_t,  32>::Type, SimdVector32UChar>::value, "should be the same type");
+    static_assert(std::is_same<SimdVector<uint16_t, 16>::Type, SimdVector16UShort>::value, "should be the same type");
+    static_assert(std::is_same<SimdVector<uint32_t,  8>::Type, SimdVector8UInt>::value, "should be the same type");
+    static_assert(std::is_same<SimdVector<uint64_t,  4>::Type, SimdVector4UInt64>::value, "should be the same type");
+
+    static_assert(LENGTH<SimdVector8UInt>::VALUE == 8, "256bit register fits 8 int's");
+    static_assert(LENGTH<SimdVector<uint32_t, 8>::Type>::VALUE == 8, "256bit register fits 8 int's");
+    SimdVector<uint32_t, 8>::Type a256 = {0, 1, 2, 3, 4, 5, 6, 7};
+    for (uint32_t i = 0; i < 8; ++i) {
+        // std::cout << "DEBUG: " << i << ": " << a256[i] << " = " << i << std::endl;
+        SEQAN_ASSERT_EQ(a256[i], i);
+    }
+#endif
+
+#if SEQAN_SIZEOF_MAX_VECTOR >= 64
+    static_assert(std::is_same<SimdVector<int8_t,  64>::Type,  SimdVector64SChar>::value, "should be the same type");
+    static_assert(std::is_same<SimdVector<int16_t, 32>::Type,  SimdVector32Short>::value, "should be the same type");
+    static_assert(std::is_same<SimdVector<int32_t, 16>::Type,  SimdVector16Int>::value, "should be the same type");
+    static_assert(std::is_same<SimdVector<int64_t,  8>::Type,  SimdVector8Int64>::value, "should be the same type");
+    static_assert(std::is_same<SimdVector<uint8_t,  64>::Type, SimdVector64UChar>::value, "should be the same type");
+    static_assert(std::is_same<SimdVector<uint16_t, 32>::Type, SimdVector32UShort>::value, "should be the same type");
+    static_assert(std::is_same<SimdVector<uint32_t, 16>::Type, SimdVector16UInt>::value, "should be the same type");
+    static_assert(std::is_same<SimdVector<uint64_t,  8>::Type, SimdVector8UInt64>::value, "should be the same type");
+
+    static_assert(LENGTH<SimdVector16UInt>::VALUE == 16, "512bit register fits 16 int's");
+    static_assert(LENGTH<SimdVector<uint32_t, 16>::Type>::VALUE == 16, "512bit register fits 16 int's");
+    SimdVector<uint32_t, 16>::Type a512 = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
+    for (uint32_t i = 0; i < 16; ++i) {
+        // std::cout << "DEBUG: " << i << ": " << a512[i] << " = " << i << std::endl;
+        SEQAN_ASSERT_EQ(a512[i], i);
+    }
+#endif
+}
+
+SEQAN_TYPED_TEST(SimdVectorTestCommon, MetaFunctions)
+{
+    using namespace seqan;
+    using TSimdVector = typename TestFixture::TSimdVector;
+
+    // NOTE(marehr): explicit namespace is necessary for msvc 2015:
+    // error C2039: 'VALUE': is not a member of '`global namespace''
+    constexpr auto length = seqan::LENGTH<TSimdVector>::VALUE;
+    using TValue = typename Value<TSimdVector>::Type;
+    typedef typename SimdVector<TValue, length>::Type TSimdVectorNew;
+
+    bool sameType = IsSameType<TSimdVector, TSimdVectorNew>::VALUE;
+    SEQAN_ASSERT(sameType);
+}
+
+SEQAN_TYPED_TEST(SimdVectorTestCommon, SizeOf)
+{
+    using namespace seqan;
+    using TSimdVector = typename TestFixture::TSimdVector;
+    using TValue = typename TestFixture::TValue;
+    constexpr auto length = TestFixture::LENGTH;
+
+    TSimdVector a{0u};
+
+    // only on windows are the values unequal
+    SEQAN_ASSERT_GEQ(sizeof(a), sizeof(TValue) * length);
+
+    // on linux we assume that the sizes are equal
+#ifndef STDLIB_VS
+    SEQAN_ASSERT_EQ(sizeof(a), sizeof(TValue) * length);
+#endif
+}
+
+SEQAN_TYPED_TEST(SimdVectorTestCommon, SubscriptType)
+{
+    using namespace seqan;
+    using TSimdVector = typename TestFixture::TSimdVector;
+    using TValue = typename TestFixture::TValue;
+
+    TSimdVector a{0u}, b{0u};
+    fillVectors(a, b);
+    TValue c = a[0];
+
+    bool sameType = IsSameType<TValue, decltype(c)>::VALUE;
+    SEQAN_ASSERT(sameType);
+}
+
+SEQAN_TYPED_TEST(SimdVectorTestCommon, ClearVector)
+{
+    using namespace seqan;
+    using TSimdVector = typename TestFixture::TSimdVector;
+    using TValue = typename TestFixture::TValue;
+    constexpr auto length = TestFixture::LENGTH;
+
+    auto zero = static_cast<TValue>(0);
+    TSimdVector a{0u}, b{0u};
+    fillVectors(a, b);
+
+    clearVector(a);
+
+    for (auto i = 0; i < length; ++i)
+    {
+        // std::cout << "DEBUG: " << i << " / " << length << ": " << (int)a[i] << " = " << 0 << std::endl;
+        SEQAN_ASSERT_EQ(a[i], zero);
+    }
+}
+
+SEQAN_TYPED_TEST(SimdVectorTestCommon, CreateVector)
+{
+    using namespace seqan;
+    using TSimdVector = typename TestFixture::TSimdVector;
+    using TValue = typename TestFixture::TValue;
+    constexpr auto length = TestFixture::LENGTH;
+
+    auto scalar = static_cast<TValue>(23);
+    auto a = createVector<TSimdVector>(scalar);
+
+    for (auto i = 0; i < length; ++i)
+    {
+        // std::cout << "DEBUG: " << i << " / " << length << ": " << (int)a[i] << " = " << 23 << std::endl;
+        SEQAN_ASSERT_EQ(a[i], scalar);
+    }
+}
+
+SEQAN_TYPED_TEST(SimdVectorTestCommon, FillVectorConstant)
+{
+    using namespace seqan;
+    using TSimdVector = typename TestFixture::TSimdVector;
+    using TValue = typename TestFixture::TValue;
+    constexpr auto length = TestFixture::LENGTH;
+
+    TSimdVector a{0u};
+
+    fillVector(a, 5);
+
+    for (auto i = 0; i < length; ++i)
+    {
+        // std::cout << "DEBUG: " << i << " / " << length << ": " << (int)a[i] << " = " << i << std::endl;
+        SEQAN_ASSERT_EQ(a[i], static_cast<TValue>(5));
+    }
+}
+
+template <typename TSimdVector, std::size_t... index >
+inline void
+call_fill_vector(TSimdVector & a, std::index_sequence<index...>)
+{
+    seqan::fillVector(a, index...);
+}
+
+SEQAN_TYPED_TEST(SimdVectorTestCommon, FillVector)
+{
+    using namespace seqan;
+    using TSimdVector = typename TestFixture::TSimdVector;
+    using TValue = typename TestFixture::TValue;
+    constexpr auto length = TestFixture::LENGTH;
+
+    TSimdVector a{0u};
+
+    // calls seqan::fillVector(a, 0, 1, 2, 3, ..., length-1);
+    call_fill_vector(a, std::make_index_sequence<length>{});
+
+    for (auto i = 0; i < length; ++i)
+    {
+        // std::cout << "DEBUG: " << i << " / " << length << ": " << (int)a[i] << " = " << i << std::endl;
+        SEQAN_ASSERT_EQ(a[i], static_cast<TValue>(i));
+    }
+}
+
+SEQAN_TYPED_TEST(SimdVectorTestCommon, CmpEqual)
+{
+    using namespace seqan;
+    using TSimdVector = typename TestFixture::TSimdVector;
+    using TSimdMaskVector = typename SimdMaskVector<TSimdVector>::Type;
+    using TValue = typename TestFixture::TValue;
+    using TBoolValue = decltype(trueValue<TSimdVector>());
+    constexpr auto length = TestFixture::LENGTH;
+
+    TBoolValue false_ = 0,
+               true_ = trueValue<TSimdVector>();
+
+    TSimdVector a{0u}, b{0u};
+    fillVectors(a, b);
+
+    // There is never a match for the most instantiations of this test.
+    a[1] = 23;
+    b[1] = 23;
+
+    TSimdMaskVector c = cmpEq(a, b);
+
+    for (auto i = 0; i < length; ++i)
+    {
+        TValue a_i = (i == 1) ? 23 : (-3 + i * 3);
+        TValue b_i = (i == 1) ? 23 : (length - i);
+        // std::cout << "DEBUG: " << i << " / " << length << ": " << (int)c[i] << " = " << (int)a[i] << " == " << (int)b[i] << std::endl;
+        SEQAN_ASSERT_EQ(c[i], a[i] == b[i] ? true_ : false_);
+        SEQAN_ASSERT_EQ(c[i], a_i == b_i ? true_ : false_);
+    }
+}
+
+SEQAN_TYPED_TEST(SimdVectorTestCommon, CmpGt)
+{
+    using namespace seqan;
+    using TSimdVector = typename TestFixture::TSimdVector;
+    using TSimdMaskVector = typename SimdMaskVector<TSimdVector>::Type;
+    using TValue = typename TestFixture::TValue;
+    using TBoolValue = decltype(trueValue<TSimdVector>());
+    constexpr auto length = TestFixture::LENGTH;
+
+    TBoolValue false_ = 0,
+               true_ = trueValue<TSimdVector>();
+
+    TSimdVector a{0u}, b{0u};
+    fillVectors(a, b);
+
+    TSimdMaskVector c = cmpGt(a, b);
+
+    for (auto i = 0; i < length; ++i)
+    {
+        TValue a_i = -3 + i * 3, b_i = length - i;
+        // std::cout << "DEBUG: " << i << " / " << length << ": " << (int)c[i] << " = " << (int)a[i] << " > " << (int)b[i] << std::endl;
+        SEQAN_ASSERT_EQ(c[i], a[i] > b[i] ? true_ : false_);
+        SEQAN_ASSERT_EQ(c[i], a_i > b_i ? true_ : false_);
+    }
+}
+
+SEQAN_TYPED_TEST(SimdVectorTestCommon, Max)
+{
+    using namespace seqan;
+    using TSimdVector = typename TestFixture::TSimdVector;
+    using TValue = typename TestFixture::TValue;
+    constexpr auto length = TestFixture::LENGTH;
+
+    TSimdVector a{0u}, b{0u};
+    fillVectors(a, b);
+
+    auto c = max(a, b);
+
+    for (auto i = 0; i < length; ++i)
+    {
+        TValue a_i = -3 + i * 3, b_i = length - i;
+        // std::cout << "DEBUG: " << i << " / " << length << ": " << (int)c[i] << " = max (" << (int)a[i] << ", " << (int)b[i] << ")" << std::endl;
+        SEQAN_ASSERT_EQ(c[i], std::max(a[i], b[i]));
+        SEQAN_ASSERT_EQ(c[i], std::max(a_i, b_i));
+    }
+}
+
+SEQAN_TYPED_TEST(SimdVectorTestCommon, Min)
+{
+    using namespace seqan;
+    using TSimdVector = typename TestFixture::TSimdVector;
+    using TValue = typename TestFixture::TValue;
+    constexpr auto length = TestFixture::LENGTH;
+
+    TSimdVector a{0u}, b{0u};
+    fillVectors(a, b);
+
+    auto c = min(a, b);
+
+    for (auto i = 0; i < length; ++i)
+    {
+        TValue a_i = -3 + i * 3, b_i = length - i;
+        // std::cout << "DEBUG: " << i << " / " << length << ": " << (int)c[i] << " = min (" << (int)a[i] << ", " << (int)b[i] << ")" << std::endl;
+        SEQAN_ASSERT_EQ(c[i], std::min(a[i], b[i]));
+        SEQAN_ASSERT_EQ(c[i], std::min(a_i, b_i));
+    }
+}
+
+SEQAN_TYPED_TEST(SimdVectorTestCommon, BitwiseOr)
+{
+    using namespace seqan;
+    using TSimdVector = typename TestFixture::TSimdVector;
+    using TValue = typename TestFixture::TValue;
+    constexpr auto length = TestFixture::LENGTH;
+
+    TSimdVector a{0u}, b{0u};
+    fillVectors(a, b);
+
+    auto c = a | b;
+
+    for (auto i = 0; i < length; ++i)
+    {
+        TValue a_i = -3 + i * 3, b_i = length - i;
+        // std::cout << "DEBUG: " << i << " / " << length << ": " << (int)c[i] << " = " << (int)a[i] << " | " << (int)b[i] << std::endl;
+        SEQAN_ASSERT_EQ(c[i], a[i] | b[i]);
+        SEQAN_ASSERT_EQ(c[i], static_cast<TValue>(a_i | b_i));
+    }
+}
+
+SEQAN_TYPED_TEST(SimdVectorTestCommon, BitwiseOrAssign)
+{
+    using namespace seqan;
+    using TSimdVector = typename TestFixture::TSimdVector;
+    using TValue = typename TestFixture::TValue;
+    constexpr auto length = TestFixture::LENGTH;
+
+    TSimdVector a{0u}, b{0u}, c{0u};
+    fillVectors(a, b);
+
+    c = a;
+    c |= b;
+
+    for (auto i = 0; i < length; ++i)
+    {
+        TValue a_i = -3 + i * 3, b_i = length - i;
+        // std::cout << "DEBUG: " << i << " / " << length << ": " << (int)c[i] << " = " << (int)a[i] << " | " << (int)b[i] << std::endl;
+        SEQAN_ASSERT_EQ(c[i], a[i] | b[i]);
+        SEQAN_ASSERT_EQ(c[i], static_cast<TValue>(a_i | b_i));
+    }
+}
+
+SEQAN_TYPED_TEST(SimdVectorTestCommon, BitwiseAnd)
+{
+    using namespace seqan;
+    using TSimdVector = typename TestFixture::TSimdVector;
+    using TValue = typename TestFixture::TValue;
+    constexpr auto length = TestFixture::LENGTH;
+
+    TSimdVector a{0u}, b{0u};
+    fillVectors(a, b);
+
+    auto c = a & b;
+
+    for (auto i = 0; i < length; ++i)
+    {
+        TValue a_i = -3 + i * 3, b_i = length - i;
+        // std::cout << "DEBUG: " << i << " / " << length << ": " << (int)c[i] << " = " << (int)a[i] << " & " << (int)b[i] << std::endl;
+        SEQAN_ASSERT_EQ(c[i], a[i] & b[i]);
+        SEQAN_ASSERT_EQ(c[i], static_cast<TValue>(a_i & b_i));
+    }
+}
+
+SEQAN_TYPED_TEST(SimdVectorTestCommon, BitwiseAndAssign)
+{
+    using namespace seqan;
+    using TSimdVector = typename TestFixture::TSimdVector;
+    using TValue = typename TestFixture::TValue;
+    constexpr auto length = TestFixture::LENGTH;
+
+    TSimdVector a{0u}, b{0u}, c{0u};
+    fillVectors(a, b);
+
+    c = a;
+    c &= b;
+
+    for (auto i = 0; i < length; ++i)
+    {
+        TValue a_i = -3 + i * 3, b_i = length - i;
+        // std::cout << "DEBUG: " << i << " / " << length << ": " << (int)c[i] << " = " << (int)a[i] << " & " << (int)b[i] << std::endl;
+        SEQAN_ASSERT_EQ(c[i], a[i] & b[i]);
+        SEQAN_ASSERT_EQ(c[i], static_cast<TValue>(a_i & b_i));
+    }
+}
+
+SEQAN_TYPED_TEST(SimdVectorTestCommon, BitwiseNot)
+{
+    using namespace seqan;
+    using TSimdVector = typename TestFixture::TSimdVector;
+    using TValue = typename TestFixture::TValue;
+    constexpr auto length = TestFixture::LENGTH;
+
+    TSimdVector a{0u}, b{0u};
+    fillVectors(a, b);
+
+    auto c = ~a;
+
+    for (auto i = 0; i < length; ++i)
+    {
+        TValue a_i = -3 + i * 3;
+        // std::cout << "DEBUG: " << i << " / " << length << ": " << (int)c[i] << " = ~" << (int)a[i] << std::endl;
+        SEQAN_ASSERT_EQ(c[i], static_cast<TValue>(~a[i]));
+        SEQAN_ASSERT_EQ(c[i], static_cast<TValue>(~a_i));
+    }
+}
+
+SEQAN_TYPED_TEST(SimdVectorTestCommon, Addition)
+{
+    using namespace seqan;
+    using TSimdVector = typename TestFixture::TSimdVector;
+    using TValue = typename TestFixture::TValue;
+    constexpr auto length = TestFixture::LENGTH;
+
+    TSimdVector a{0u}, b{0u};
+    fillVectors(a, b);
+
+    auto c = a + b;
+
+    for (auto i = 0; i < length; ++i)
+    {
+        TValue a_i = -3 + i * 3, b_i = length - i;
+        // std::cout << "DEBUG: " << i << " / " << length << ": " << (int)c[i] << " = " << (int)a[i] << " + " << (int)b[i] << std::endl;
+        SEQAN_ASSERT_EQ(c[i], static_cast<TValue>(a[i] + b[i]));
+        SEQAN_ASSERT_EQ(c[i], static_cast<TValue>(a_i + b_i));
+    }
+}
+
+SEQAN_TYPED_TEST(SimdVectorTestCommon, Subtraction)
+{
+    using namespace seqan;
+    using TSimdVector = typename TestFixture::TSimdVector;
+    using TValue = typename TestFixture::TValue;
+    constexpr auto length = TestFixture::LENGTH;
+
+    TSimdVector a{0u}, b{0u};
+    fillVectors(a, b);
+
+    auto c = a - b;
+
+    for (auto i = 0; i < length; ++i)
+    {
+        TValue a_i = -3 + i * 3, b_i = length - i;
+        // std::cout << "DEBUG: " << i << " / " << length << ": " << (int)c[i] << " = " << (int)a[i] << " - " << (int)b[i] << std::endl;
+        SEQAN_ASSERT_EQ(c[i], static_cast<TValue>(a[i] - b[i]));
+        SEQAN_ASSERT_EQ(c[i], static_cast<TValue>(a_i - b_i));
+    }
+}
+
+SEQAN_TYPED_TEST(SimdVectorTestCommon, Multiplication)
+{
+    using namespace seqan;
+    using TSimdVector = typename TestFixture::TSimdVector;
+    using TValue = typename TestFixture::TValue;
+    constexpr auto length = TestFixture::LENGTH;
+
+    TSimdVector a{0u}, b{0u};
+    fillVectors(a, b);
+
+    auto c = a * b;
+
+    for (size_t i = 0; i < length; ++i)
+    {
+        TValue a_i = -3 + i * 3, b_i = length - i;
+        // std::cout << "DEBUG: " << i << " / " << length << ": " << (int)c[i] << " = " << (int)a[i] << " * " << (int)b[i] << std::endl;
+        SEQAN_ASSERT_EQ(c[i], static_cast<TValue>(a[i] * b[i]));
+        SEQAN_ASSERT_EQ(c[i], static_cast<TValue>(a_i * b_i));
+    }
+}
+
+SEQAN_TYPED_TEST(SimdVectorTestCommon, Division)
+{
+    using namespace seqan;
+    using TSimdVector = typename TestFixture::TSimdVector;
+    using TValue = typename TestFixture::TValue;
+    constexpr auto length = TestFixture::LENGTH;
+
+    TSimdVector a{0u}, b{0u};
+    fillVectors(a, b);
+
+    auto c = a / b;
+
+    for (auto i = 0; i < length; ++i)
+    {
+        TValue a_i = -3 + i * 3, b_i = length - i;
+        // std::cout << "DEBUG: " << i << " / " << length << ": " << (int)c[i] << " = " << (int)a[i] << " / " << (int)b[i] << std::endl;
+        SEQAN_ASSERT_EQ(c[i], a[i] / b[i]);
+        SEQAN_ASSERT_EQ(c[i], a_i / b_i);
+    }
+}
+
+SEQAN_TYPED_TEST(SimdVectorTestCommon, BitwiseAndNot)
+{
+    using namespace seqan;
+    using TSimdVector = typename TestFixture::TSimdVector;
+    using TValue = typename TestFixture::TValue;
+    constexpr auto length = TestFixture::LENGTH;
+
+    TSimdVector a{0u}, b{0u};
+    fillVectors(a, b);
+
+    auto c = andNot(a, b);
+
+    for (auto i = 0; i < length; ++i)
+    {
+        // std::cout << "DEBUG: " << i << " / " << length << ": " << (int)c[i] << " = (~" << (int)a[i] << ") & " << (int)b[i] << std::endl;
+        SEQAN_ASSERT_EQ(c[i], static_cast<TValue>(~a[i] & b[i]));
+        SEQAN_ASSERT_EQ(c[i], static_cast<TValue>(~(-3 + i * 3) & (length - i)));
+    }
+}
+
+SEQAN_TYPED_TEST(SimdVectorTestCommon, ShiftRightLogical)
+{
+    using namespace seqan;
+    using TSimdVector = typename TestFixture::TSimdVector;
+    using TValue = typename TestFixture::TValue;
+    constexpr auto length = TestFixture::LENGTH;
+
+    TSimdVector a{0u}, b{0u};
+    fillVectors(a, b);
+
+    // ensure that a >= 0, because (-3) >> 2 has undefined behavior according to
+    // C++ 11 standard.
+    a = a + createVector<TSimdVector>(3);
+
+    auto c = shiftRightLogical(a, 2);
+
+    for (auto i = 0; i < length; ++i)
+    {
+        TValue a_i = i * 3;
+        // std::cout << "DEBUG: " << i << " / " << length << ": " << (int)c[i] << " = " << (int)a[i] << " >> " << (int)2 << std::endl;
+        SEQAN_ASSERT_EQ(c[i], a[i] >> 2);
+        SEQAN_ASSERT_EQ(c[i], static_cast<TValue>(a_i >> 2));
+    }
+}
+
+SEQAN_TYPED_TEST(SimdVectorTestCommon, Blend)
+{
+    using namespace seqan;
+    using TSimdVector = typename TestFixture::TSimdVector;
+    using TValue = typename TestFixture::TValue;
+    constexpr auto length = TestFixture::LENGTH;
+
+    TSimdVector a{0u}, b{0u};
+    fillVectors(a, b);
+
+    auto c = blend(b, a, cmpGt(a, b));
+
+    for (auto i = 0; i < length; ++i)
+    {
+        TValue a_i = -3 + i * 3, b_i = length - i;
+        // std::cout << "DEBUG: " << i << " / " << length << ": " << (int)c[i] << " = " << (int)a[i] << " > " << (int)b[i] << " ? " << (int)a[i] << " : " << (int)b[i] << std::endl;
+        SEQAN_ASSERT_EQ(c[i], a[i] > b[i] ? (TValue)a[i] : (TValue)b[i]);
+        SEQAN_ASSERT_EQ(c[i], a_i > b_i ? a_i : b_i);
+    }
+}
+
+SEQAN_TYPED_TEST(SimdVectorTestCommon, Storeu)
+{
+    using namespace seqan;
+    using TSimdVector = typename TestFixture::TSimdVector;
+    using TValue = typename TestFixture::TValue;
+    constexpr auto length = TestFixture::LENGTH;
+
+    TSimdVector a{0u}, b{0u};
+    fillVectors(a, b);
+
+    TValue c[length];
+    storeu(c, a);
+
+    for (auto i = 0; i < length; ++i)
+    {
+        // std::cout << "DEBUG: " << i << " / " << length << ": " << (int)c[i] << " = " << (int)a[i] << std::endl;
+        SEQAN_ASSERT_EQ(c[i], a[i]);
+        SEQAN_ASSERT_EQ(c[i], static_cast<TValue>(-3 + i * 3));
+    }
+}
+
+SEQAN_TYPED_TEST(SimdVectorTestCommon, Load)
+{
+    using namespace seqan;
+    using TSimdVector = typename TestFixture::TSimdVector;
+    using TValue = typename TestFixture::TValue;
+    constexpr auto length = TestFixture::LENGTH;
+
+    TSimdVector a{0u}, c{0u};
+    fillVectors(a, c);
+
+    alignas(TSimdVector) TValue b[length];
+    storeu(b, a);
+    c = load<TSimdVector>(b);
+
+    for (auto i = 0; i < length; ++i)
+    {
+        // std::cout << "DEBUG: " << i << " / " << length << ": " << (int)c[i] << " = " << (int)a[i] << std::endl;
+        SEQAN_ASSERT_EQ(c[i], a[i]);
+        SEQAN_ASSERT_EQ(c[i], static_cast<TValue>(-3 + i * 3));
+    }
+}
+
+SEQAN_TYPED_TEST(SimdVectorTestCommon, Gather)
+{
+    using namespace seqan;
+    using TSimdVector = typename TestFixture::TSimdVector;
+    using TValue = typename TestFixture::TValue;
+    constexpr auto length = TestFixture::LENGTH;
+
+    TSimdVector a{0u}, idx{0u};
+    fillVectors(a, idx);
+    reverseIndexSequence(idx, length);
+
+    TValue b[length];
+    storeu(b, a);
+    auto c = gather(b, idx);
+
+    for (auto i = 0; i < length; ++i)
+    {
+        // std::cout << "DEBUG: " << i << " / " << length << ": " << (int)c[i] << " = " << (int)a[idx[i]] << std::endl;
+        SEQAN_ASSERT_EQ(c[i], a[idx[i]]);
+        SEQAN_ASSERT_EQ(c[i], a[length - i - 1]);
+    }
+}
+
+SEQAN_TYPED_TEST(SimdVectorTestCommon, ShuffleConstant1)
+{
+    using namespace seqan;
+    using TSimdVector = typename TestFixture::TSimdVector;
+    constexpr auto length = TestFixture::LENGTH;
+    typedef typename SimdSwizzleVector<TSimdVector>::Type TSimdSwizzleVector;
+
+    TSimdVector a{0u}, b{0u};
+    auto idx = createVector<TSimdSwizzleVector>(1);
+    fillVectors(a, b);
+
+    auto c = shuffleVector(a, idx);
+
+    for (auto i = 0; i < length; ++i)
+    {
+        // std::cout << "DEBUG: " << i << " / " << length << ": " << (int)c[i] << " = " << (int)a[idx[i]] << ", idx: " << (int)idx[i] << std::endl;
+        SEQAN_ASSERT_EQ(c[i], a[idx[i]]);
+        SEQAN_ASSERT_EQ(c[i], a[1]);
+    }
+}
+
+SEQAN_TYPED_TEST(SimdVectorTestCommon, ShuffleConstant2)
+{
+    using namespace seqan;
+    using TSimdVector = typename TestFixture::TSimdVector;
+    constexpr auto length = TestFixture::LENGTH;
+    typedef typename SimdSwizzleVector<TSimdVector>::Type TSimdSwizzleVector;
+
+    TSimdVector a{0u}, b{0u};
+    auto idx = createVector<TSimdSwizzleVector>(length - 2);
+    fillVectors(a, b);
+
+    auto c = shuffleVector(a, idx);
+
+    for (auto i = 0; i < length; ++i)
+    {
+        // std::cout << "DEBUG: " << i << " / " << length << ": " << (int)c[i] << " = " << (int)a[idx[i]] << ", idx: " << (int)idx[i] << std::endl;
+        SEQAN_ASSERT_EQ(c[i], a[idx[i]]);
+        SEQAN_ASSERT_EQ(c[i], a[length-2]);
+    }
+}
+
+SEQAN_TYPED_TEST(SimdVectorTestCommon, Shuffle)
+{
+    using namespace seqan;
+    using TSimdVector = typename TestFixture::TSimdVector;
+    constexpr auto length = TestFixture::LENGTH;
+    typedef typename SimdSwizzleVector<TSimdVector>::Type TSimdSwizzleVector;
+
+    TSimdVector a{0u}, b{0u};
+    TSimdSwizzleVector idx{0u};
+    fillVectors(a, b);
+    reverseIndexSequence(idx, length);
+
+    auto c = shuffleVector(a, idx);
+
+    for (auto i = 0; i < length; ++i)
+    {
+        // std::cout << "DEBUG: " << i << " / " << length << ": " << (int)c[i] << " = " << (int)a[idx[i]] << ", idx: " << (int)idx[i] << std::endl;
+        SEQAN_ASSERT_EQ(c[i], a[idx[i]]);
+        SEQAN_ASSERT_EQ(c[i], a[length - i - 1]);
+    }
+}
+
+template <typename TSimdVector, typename TValue, typename TArrayValue>
+inline void test_gather_array()
+{
+    using namespace seqan;
+    constexpr auto length = LENGTH<TSimdVector>::VALUE;
+
+    TSimdVector idx{0u};
+    reverseIndexSequence(idx, length);
+
+    TArrayValue a[2*length];
+
+    // fill gather array
+    for (auto i = 0; i < 2*length; ++i)
+    {
+        a[i] = (i-1)*3;
+    }
+
+    auto c = gather(a, idx);
+
+    for (auto i = 0; i < length; ++i)
+    {
+        // std::cout << "DEBUG: " << i << " / " << length << ": " << (TValue)c[i] << " = " << (TValue)a[idx[i]] << std::endl;
+        SEQAN_ASSERT_EQ(c[i], static_cast<TValue>(a[idx[i]]));
+        SEQAN_ASSERT_EQ(c[i], static_cast<TValue>(a[length - i - 1]));
+    }
+}
+
+SEQAN_TYPED_TEST(SimdVectorTestGather, CharArray)
+{
+    test_gather_array<
+        typename TestFixture::TSimdVector,
+        typename TestFixture::TValue,
+        int8_t
+    >();
+}
+
+SEQAN_TYPED_TEST(SimdVectorTestGather, ShortArray)
+{
+    test_gather_array<
+        typename TestFixture::TSimdVector,
+        typename TestFixture::TValue,
+        int16_t
+    >();
+}
+
+SEQAN_TYPED_TEST(SimdVectorTestGather, IntArray)
+{
+    test_gather_array<
+        typename TestFixture::TSimdVector,
+        typename TestFixture::TValue,
+        int32_t
+    >();
+}
+
+SEQAN_TYPED_TEST(SimdVectorTestGather, LongArray)
+{
+    test_gather_array<
+        typename TestFixture::TSimdVector,
+        typename TestFixture::TValue,
+        int64_t
+    >();
+}
+
+SEQAN_TYPED_TEST(SimdVectorTestGather, UCharArray)
+{
+    test_gather_array<
+        typename TestFixture::TSimdVector,
+        typename TestFixture::TValue,
+        uint8_t
+    >();
+}
+
+SEQAN_TYPED_TEST(SimdVectorTestGather, UShortArray)
+{
+    test_gather_array<
+        typename TestFixture::TSimdVector,
+        typename TestFixture::TValue,
+        uint16_t
+    >();
+}
+
+SEQAN_TYPED_TEST(SimdVectorTestGather, UIntArray)
+{
+    test_gather_array<
+        typename TestFixture::TSimdVector,
+        typename TestFixture::TValue,
+        uint32_t
+    >();
+}
+
+SEQAN_TYPED_TEST(SimdVectorTestGather, ULongArray)
+{
+    test_gather_array<
+        typename TestFixture::TSimdVector,
+        typename TestFixture::TValue,
+        uint64_t
+    >();
+}
+
+#ifdef __SSE4_1__
+
+SEQAN_DEFINE_TEST(test_simd_transpose_8x8)
+{
+    seqan::test_matrix_transpose<8, seqan::SimdVector<unsigned char, 8>::Type>();
+}
+
+SEQAN_DEFINE_TEST(test_simd_transpose_16x16)
+{
+    seqan::test_matrix_transpose<16, seqan::SimdVector<unsigned char, 16>::Type>();
+}
+
+#endif  // #ifdef __SSE4_1__
+#ifdef __AVX2__
+
+SEQAN_DEFINE_TEST(test_simd_transpose_32x32)
+{
+    seqan::test_matrix_transpose<32, seqan::SimdVector<unsigned char, 32>::Type >();
+}
+
+#endif  // #ifdef __AVX2__
+#endif  // SEQAN_SIMD_ENABLED
+
+#endif  // #ifndef SEQAN_CORE_TESTS_SIMD_TEST_SIMD_VECTOR_H_
diff --git a/tests/simple_intervals_io/test_simple_intervals_io.cpp b/tests/simple_intervals_io/test_simple_intervals_io.cpp
index d351b38..129b66e 100644
--- a/tests/simple_intervals_io/test_simple_intervals_io.cpp
+++ b/tests/simple_intervals_io/test_simple_intervals_io.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/statistics/test_statistics.cpp b/tests/statistics/test_statistics.cpp
index d9d1442..478ed11 100644
--- a/tests/statistics/test_statistics.cpp
+++ b/tests/statistics/test_statistics.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/statistics/test_statistics_base.h b/tests/statistics/test_statistics_base.h
index ec27381..87f27d5 100644
--- a/tests/statistics/test_statistics_base.h
+++ b/tests/statistics/test_statistics_base.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -159,8 +159,7 @@ SEQAN_DEFINE_TEST(test_statistics_statistics)
     MarkovModel<TAlphabet> mmNew(1);
 
 
-    std::string buffer = SEQAN_PATH_TO_ROOT();
-    buffer +="/tests/statistics/zscore_human_mm.3";
+    std::string buffer = getAbsolutePath("/tests/statistics/zscore_human_mm.3");
     FILE *fd = fopen(buffer.c_str(), "r");
     read(fd, mm);
     fclose(fd);
diff --git a/tests/statistics/test_statistics_markov_model.h b/tests/statistics/test_statistics_markov_model.h
index b22bedb..245ad0e 100644
--- a/tests/statistics/test_statistics_markov_model.h
+++ b/tests/statistics/test_statistics_markov_model.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/store/test_store.cpp b/tests/store/test_store.cpp
index 2f57b3b..b3ce1da 100644
--- a/tests/store/test_store.cpp
+++ b/tests/store/test_store.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/store/test_store_io.h b/tests/store/test_store_io.h
index 358c636..95f30d4 100644
--- a/tests/store/test_store_io.h
+++ b/tests/store/test_store_io.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -45,8 +45,7 @@ SEQAN_DEFINE_TEST(test_store_io_read_ucsc_known_genes)
 {
     // The file contains 13 annotations in total which will be checked line
     // after line.
-    seqan::CharString ucscPath = SEQAN_PATH_TO_ROOT();
-    append(ucscPath, "/tests/store/example_knownGene.txt");
+    seqan::CharString ucscPath = seqan::getAbsolutePath("/tests/store/example_knownGene.txt");
 
     UcscFileIn fin(toCString(ucscPath));
     seqan::FragmentStore<> store;
@@ -56,10 +55,10 @@ SEQAN_DEFINE_TEST(test_store_io_read_ucsc_known_genes)
     it = begin(store, AnnotationTree<>());
 
     SEQAN_ASSERT_EQ(getType(it), "<root>");
-    SEQAN_ASSERT_EQ(getAnnotation(it).beginPos, maxValue(getAnnotation(it).beginPos));
-    SEQAN_ASSERT_EQ(getAnnotation(it).endPos, maxValue(getAnnotation(it).endPos));
+    SEQAN_ASSERT_EQ(getAnnotation(it).beginPos, std::numeric_limits<decltype(getAnnotation(it).beginPos)>::max());
+    SEQAN_ASSERT_EQ(getAnnotation(it).endPos, std::numeric_limits<decltype(getAnnotation(it).endPos)>::max());
     SEQAN_ASSERT_EQ(value(it), 0u);
-    SEQAN_ASSERT_EQ(getAnnotation(it).parentId, maxValue(getAnnotation(it).parentId));
+    SEQAN_ASSERT_EQ(getAnnotation(it).parentId, std::numeric_limits<decltype(getAnnotation(it).parentId)>::max());
     SEQAN_ASSERT_EQ(getParentName(it), "<root>");
     goNext(it);
 
@@ -166,10 +165,8 @@ SEQAN_DEFINE_TEST(test_store_io_read_ucsc_known_genes_and_isoforms)
 {
     // The file contains 13 annotations in total which will be checked line
     // after line.
-    seqan::CharString ucscGenesPath = SEQAN_PATH_TO_ROOT();
-    append(ucscGenesPath, "/tests/store/example_knownGene.txt");
-    seqan::CharString ucscIsoformsPath = SEQAN_PATH_TO_ROOT();
-    append(ucscIsoformsPath, "/tests/store/example_knownIsoforms.txt");
+    seqan::CharString ucscGenesPath = getAbsolutePath("/tests/store/example_knownGene.txt");
+    seqan::CharString ucscIsoformsPath = getAbsolutePath("/tests/store/example_knownIsoforms.txt");
 
     UcscFileIn finGenes(toCString(ucscGenesPath));
     UcscFileIn finIsoforms(toCString(ucscIsoformsPath));
@@ -181,10 +178,10 @@ SEQAN_DEFINE_TEST(test_store_io_read_ucsc_known_genes_and_isoforms)
     it = begin(store, AnnotationTree<>());
 
     SEQAN_ASSERT_EQ(getType(it), "<root>");
-    SEQAN_ASSERT_EQ(getAnnotation(it).beginPos, maxValue(getAnnotation(it).beginPos));
-    SEQAN_ASSERT_EQ(getAnnotation(it).endPos, maxValue(getAnnotation(it).endPos));
+    SEQAN_ASSERT_EQ(getAnnotation(it).beginPos, std::numeric_limits<decltype(getAnnotation(it).beginPos)>::max());
+    SEQAN_ASSERT_EQ(getAnnotation(it).endPos, std::numeric_limits<decltype(getAnnotation(it).endPos)>::max());
     SEQAN_ASSERT_EQ(value(it), 0u);
-    SEQAN_ASSERT_EQ(getAnnotation(it).parentId, maxValue(getAnnotation(it).parentId));
+    SEQAN_ASSERT_EQ(getAnnotation(it).parentId, std::numeric_limits<decltype(getAnnotation(it).parentId)>::max());
     SEQAN_ASSERT_EQ(getParentName(it), "<root>");
     goNext(it);
 
@@ -325,8 +322,7 @@ SEQAN_DEFINE_TEST(test_store_io_read_ucsc_known_genes_and_isoforms)
 
 SEQAN_DEFINE_TEST(test_store_io_write_ucsc_known_genes)
 {
-    seqan::CharString ucscPath = SEQAN_PATH_TO_ROOT();
-    append(ucscPath, "/tests/store/example_knownGene.txt");
+    seqan::CharString ucscPath = getAbsolutePath("/tests/store/example_knownGene.txt");
 
     UcscFileIn fin(toCString(ucscPath));
     seqan::FragmentStore<> store;
@@ -338,16 +334,14 @@ SEQAN_DEFINE_TEST(test_store_io_write_ucsc_known_genes)
     writeRecords(fout, store);
     close(fout);
 
-    seqan::CharString goldPath = SEQAN_PATH_TO_ROOT();
-    append(goldPath, "/tests/store/example_knownGene.txt");
+    seqan::CharString goldPath = getAbsolutePath("/tests/store/example_knownGene.txt");
 
     SEQAN_ASSERT(seqan::_compareTextFilesAlt(toCString(outPath), toCString(goldPath)));
 }
 
 SEQAN_DEFINE_TEST(test_store_io_read_gff)
 {
-    seqan::CharString gffPath = SEQAN_PATH_TO_ROOT();
-    append(gffPath, "/tests/store/example.gff");
+    seqan::CharString gffPath = getAbsolutePath("/tests/store/example.gff");
 
     GffFileIn f(toCString(gffPath));
     typedef typename seqan::FragmentStore<>::TAnnotationStoreElement::TId TId;
@@ -360,10 +354,10 @@ SEQAN_DEFINE_TEST(test_store_io_read_gff)
     it = begin(store, AnnotationTree<>());
 
     SEQAN_ASSERT_EQ(getType(it), "<root>");
-    SEQAN_ASSERT_EQ(getAnnotation(it).beginPos, maxValue(getAnnotation(it).beginPos));
-    SEQAN_ASSERT_EQ(getAnnotation(it).endPos, maxValue(getAnnotation(it).endPos));
+    SEQAN_ASSERT_EQ(getAnnotation(it).beginPos, std::numeric_limits<decltype(getAnnotation(it).beginPos)>::max());
+    SEQAN_ASSERT_EQ(getAnnotation(it).endPos, std::numeric_limits<decltype(getAnnotation(it).endPos)>::max());
     SEQAN_ASSERT_EQ(value(it), 0u);
-    SEQAN_ASSERT_EQ(getAnnotation(it).parentId, maxValue<TId>());
+    SEQAN_ASSERT_EQ(getAnnotation(it).parentId, std::numeric_limits<TId>::max());
     SEQAN_ASSERT_EQ(getParentName(it), "<root>");
     goNext(it);
 
@@ -393,8 +387,7 @@ SEQAN_DEFINE_TEST(test_store_io_read_gff)
 
 SEQAN_DEFINE_TEST(test_store_io_write_gff)
 {
-    seqan::CharString goldPath = SEQAN_PATH_TO_ROOT();
-    append(goldPath, "/tests/store/example.gff");
+    seqan::CharString goldPath = getAbsolutePath("/tests/store/example.gff");
 
     GffFileIn fin(toCString(goldPath));
     seqan::FragmentStore<> store;
@@ -413,8 +406,7 @@ SEQAN_DEFINE_TEST(test_store_io_read_gtf)
 {
     typedef typename seqan::FragmentStore<>::TAnnotationStoreElement::TId TId;
 
-    seqan::CharString gtfPath = SEQAN_PATH_TO_ROOT();
-    append(gtfPath, "/tests/store/example.gtf");
+    seqan::CharString gtfPath = getAbsolutePath("/tests/store/example.gtf");
 
     GffFileIn fin(toCString(gtfPath));
     seqan::FragmentStore<> store;
@@ -424,10 +416,10 @@ SEQAN_DEFINE_TEST(test_store_io_read_gtf)
     it = begin(store, AnnotationTree<>());
 
     SEQAN_ASSERT_EQ(getType(it), "<root>");
-    SEQAN_ASSERT_EQ(getAnnotation(it).beginPos, maxValue(getAnnotation(it).beginPos));
-    SEQAN_ASSERT_EQ(getAnnotation(it).endPos, maxValue(getAnnotation(it).endPos));
+    SEQAN_ASSERT_EQ(getAnnotation(it).beginPos, std::numeric_limits<decltype(getAnnotation(it).beginPos)>::max());
+    SEQAN_ASSERT_EQ(getAnnotation(it).endPos, std::numeric_limits<decltype(getAnnotation(it).endPos)>::max());
     SEQAN_ASSERT_EQ(value(it), 0u);
-    SEQAN_ASSERT_EQ(getAnnotation(it).parentId, maxValue<TId>());
+    SEQAN_ASSERT_EQ(getAnnotation(it).parentId, std::numeric_limits<TId>::max());
     SEQAN_ASSERT_EQ(getParentName(it), "<root>");
     goNext(it);
 
@@ -529,8 +521,7 @@ SEQAN_DEFINE_TEST(test_store_io_read_gtf)
 
 SEQAN_DEFINE_TEST(test_store_io_write_gtf)
 {
-    seqan::CharString goldPath = SEQAN_PATH_TO_ROOT();
-    append(goldPath, "/tests/store/example.gtf");
+    seqan::CharString goldPath = getAbsolutePath("/tests/store/example.gtf");
 
     GffFileIn fin(toCString(goldPath));
     seqan::FragmentStore<> store;
@@ -551,11 +542,11 @@ SEQAN_DEFINE_TEST(test_store_io_sam)
     FragmentStore<> store;
 
     // 1. LOAD CONTIGS
-    std::string goldPathRef = (std::string)SEQAN_PATH_TO_ROOT() + "/tests/store/ex1.fa";
+    std::string goldPathRef = getAbsolutePath("/tests/store/ex1.fa");
     loadContigs(store, toCString(goldPathRef));
 
     // 2. LOAD SAM ALIGNMENTS
-    std::string goldPathSam = (std::string)SEQAN_PATH_TO_ROOT() + "/tests/store/ex1.copy.sam";
+    std::string goldPathSam = getAbsolutePath("/tests/store/ex1.copy.sam");
     BamFileIn inFile(toCString(goldPathSam));
     readRecords(store, inFile);
 
@@ -573,11 +564,11 @@ SEQAN_DEFINE_TEST(test_store_io_sam2)
     FragmentStore<> store;
 
     // 1. LOAD CONTIGS
-    std::string goldPathRef = (std::string)SEQAN_PATH_TO_ROOT() + "/tests/store/ex1.fa";
+    std::string goldPathRef = getAbsolutePath("/tests/store/ex1.fa");
     loadContigs(store, toCString(goldPathRef));
 
     // 2. LOAD SAM ALIGNMENTS
-    std::string goldPathSam = (std::string)SEQAN_PATH_TO_ROOT() + "/tests/store/ex1.copy.sam";
+    std::string goldPathSam = getAbsolutePath("/tests/store/ex1.copy.sam");
     BamFileIn inFile(toCString(goldPathSam));
     readRecords(store, inFile);
 
@@ -595,7 +586,7 @@ void _appendReadAlignments(TFragStore &store, char const *fileName)
 {
     using namespace seqan;
 
-    std::string str = (std::string)SEQAN_PATH_TO_ROOT() + fileName;
+    std::string str = getAbsolutePath(fileName);
     BamFileIn inFile(str.c_str());
     readRecords(store, inFile);
   }
@@ -612,7 +603,8 @@ void _writeStore(TFragStore &store, std::string const &outPath, char const *suff
     printAlignment(file, layout, store, 1, 0, 1030, 0, 36);
     file.close();
 
-    std::string goldPathTxt = (std::string)SEQAN_PATH_TO_ROOT() + "/tests/store/ex1.splitmerge" + suffix;
+    std::string goldFileName = (std::string)"/tests/store/ex1.splitmerge" + (std::string)suffix;
+    std::string goldPathTxt = seqan::getAbsolutePath(goldFileName.c_str());
     SEQAN_ASSERT(seqan::_compareTextFilesAlt(toCString(outPathTxt), toCString(goldPathTxt)));
 }
 
@@ -623,7 +615,7 @@ SEQAN_DEFINE_TEST(test_store_io_split_sam)
     FragmentStore<> store;
 
     // 1. LOAD CONTIGS
-    std::string fastaFileName = (std::string)SEQAN_PATH_TO_ROOT() + "/tests/store/ex1.fa";
+    std::string fastaFileName = seqan::getAbsolutePath("/tests/store/ex1.fa");
     loadContigs(store, toCString(fastaFileName));
 
     std::string outPath = (std::string)SEQAN_TEMP_FILENAME();
@@ -642,7 +634,7 @@ SEQAN_DEFINE_TEST(test_store_io_split_sam)
     writeRecords(outFile, store);
     close(outFile);
 
-    std::string goldPathSam = (std::string)SEQAN_PATH_TO_ROOT() + "/tests/store/ex1.splitmerge.sam";
+    std::string goldPathSam = seqan::getAbsolutePath("/tests/store/ex1.splitmerge.sam");
     SEQAN_ASSERT(seqan::_compareTextFilesAlt(toCString(outPathSam), toCString(goldPathSam)));
 }
 
@@ -654,11 +646,11 @@ SEQAN_DEFINE_TEST(test_store_io_read_bam)
     FragmentStore<> store;
 
     // 1. LOAD CONTIGS
-    std::string fastaFileName = (std::string)SEQAN_PATH_TO_ROOT() + "/tests/store/ex1.fa";
+    std::string fastaFileName = seqan::getAbsolutePath("/tests/store/ex1.fa");
     loadContigs(store, toCString(fastaFileName));
 
     // 2. LOAD BAM ALIGNMENTS
-    std::string bamFileName = (std::string)SEQAN_PATH_TO_ROOT() + "/tests/store/ex1.bam";
+    std::string bamFileName = seqan::getAbsolutePath("/tests/store/ex1.bam");
 
     // Read reference Sam from file.
     {
@@ -678,8 +670,7 @@ SEQAN_DEFINE_TEST(test_store_io_read_bam)
     close(outFile);
 
     // 4. COMPARE BOTH SAM FILES
-    CharString samFileName = SEQAN_PATH_TO_ROOT();
-    append(samFileName, "/tests/store/ex1.copy.sam");
+    CharString samFileName = seqan::getAbsolutePath("/tests/store/ex1.copy.sam");
     SEQAN_ASSERT(seqan::_compareTextFilesAlt(toCString(samFileName), toCString(outFileName)));
 }
 
@@ -690,7 +681,7 @@ SEQAN_DEFINE_TEST(test_store_io_read_bam)
 SEQAN_DEFINE_TEST(test_store_io_read_amos)
 {
     // Get path to input file.
-    std::string inPath = (std::string)SEQAN_PATH_TO_ROOT() + "/tests/store/toy.amos";
+    std::string inPath = seqan::getAbsolutePath("/tests/store/toy.amos");
     // Get path to temporary file.
     std::string outPathSam = (std::string)SEQAN_TEMP_FILENAME() + ".sam";
     std::string outPathFasta = (std::string)SEQAN_TEMP_FILENAME() + ".fa";
@@ -718,11 +709,9 @@ SEQAN_DEFINE_TEST(test_store_io_read_amos)
     SEQAN_ASSERT_EQ(length(store.matePairStore), 1u);
     SEQAN_ASSERT_EQ(length(store.alignedReadStore), 12u);
 
-    seqan::CharString goldPathSam = SEQAN_PATH_TO_ROOT();
-    append(goldPathSam, "/tests/store/amos_to_sam_result.sam");
+    seqan::CharString goldPathSam = seqan::getAbsolutePath("/tests/store/amos_to_sam_result.sam");
     SEQAN_ASSERT(seqan::_compareTextFilesAlt(toCString(outPathSam), toCString(goldPathSam)));
-    seqan::CharString goldPathFasta = SEQAN_PATH_TO_ROOT();
-    append(goldPathFasta, "/tests/store/amos_to_sam_result.fasta");
+    seqan::CharString goldPathFasta = seqan::getAbsolutePath("/tests/store/amos_to_sam_result.fasta");
 
 
     SEQAN_ASSERT(seqan::_compareTextFilesAlt(toCString(outPathFasta), toCString(goldPathFasta)));
@@ -732,8 +721,8 @@ SEQAN_DEFINE_TEST(test_store_io_read_amos)
 SEQAN_DEFINE_TEST(test_store_io_write_amos)
 {
     // Get path to input files.
-    std::string inPathSam = (std::string)SEQAN_PATH_TO_ROOT() + "/tests/store/ex1.copy.sam";
-    std::string inPathFasta = (std::string)SEQAN_PATH_TO_ROOT() + "/tests/store/ex1.fa";
+    std::string inPathSam = seqan::getAbsolutePath("/tests/store/ex1.copy.sam");
+    std::string inPathFasta = seqan::getAbsolutePath("/tests/store/ex1.fa");
     // Get path to temporary file.
     std::string outPathAmos = SEQAN_TEMP_FILENAME();
 
@@ -749,8 +738,7 @@ SEQAN_DEFINE_TEST(test_store_io_write_amos)
     fAmosOut.close();
 
     // Compare result.
-    seqan::CharString goldPathAmos = SEQAN_PATH_TO_ROOT();
-    append(goldPathAmos, "/tests/store/sam_to_amos_result.amos");
+    seqan::CharString goldPathAmos = seqan::getAbsolutePath("/tests/store/sam_to_amos_result.amos");
     SEQAN_ASSERT(seqan::_compareTextFilesAlt(toCString(outPathAmos), toCString(goldPathAmos)));
 }
 
@@ -758,7 +746,7 @@ SEQAN_DEFINE_TEST(test_store_io_write_amos)
 SEQAN_DEFINE_TEST(test_store_io_readwrite_amos)
 {
     // Get path to input files.
-    std::string goldPathAmos = (std::string)SEQAN_PATH_TO_ROOT() + "/tests/store/toy.amos";
+    std::string goldPathAmos = seqan::getAbsolutePath("/tests/store/toy.amos");
     // Get path to temporary file.
     std::string outPathAmos = SEQAN_TEMP_FILENAME();
 
diff --git a/tests/store/test_store_io_bam.h b/tests/store/test_store_io_bam.h
index 0489589..934e961 100644
--- a/tests/store/test_store_io_bam.h
+++ b/tests/store/test_store_io_bam.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -44,15 +44,15 @@ SEQAN_DEFINE_TEST(test_store_io_bam_read)
   /*
     // Construct name to reference FASTA files.
     char fastaBuffer[1023];
-    strcpy(fastaBuffer, SEQAN_PATH_TO_ROOT());
+    strcpy(fastaBuffer, getAbsolutePath(""));
     strcat(fastaBuffer, "/projects/tests/store/toy.fa");
     // Construct file name to SAM file.
     char samBuffer[1023];
-    strcpy(samBuffer, SEQAN_PATH_TO_ROOT());
+    strcpy(samBuffer, getAbsolutePath(""));
     strcat(samBuffer, "/projects/tests/store/toy.sam");
     // Construct file name to BAM file.
     char bamBuffer[1023];
-    strcpy(bamBuffer, SEQAN_PATH_TO_ROOT());
+    strcpy(bamBuffer, getAbsolutePath(""));
     strcat(bamBuffer, "/projects/tests/store/toy.bam");
 
     // Load FragmentStore from SAM and BAM file.
@@ -117,12 +117,12 @@ SEQAN_DEFINE_TEST(test_store_io_bam_write)
 {
     // Construct name to reference FASTA files.
     char fastaBuffer[1023];
-    strcpy(fastaBuffer, SEQAN_PATH_TO_ROOT());
+    strcpy(fastaBuffer, getAbsolutePath(""));
     strcat(fastaBuffer, "/projects/tests/store/toy.fa");
     // strcat(fastaBuffer, "/projects/tests/store/ex1.fa");
     // Construct file name to SAM file.
     char samBuffer[1023];
-    strcpy(samBuffer, SEQAN_PATH_TO_ROOT());
+    strcpy(samBuffer, getAbsolutePath(""));
     strcat(samBuffer, "/projects/tests/store/toy.sam");
     // strcat(samBuffer, "/projects/tests/store/ex1.sam");
     // Construct path to a temporary output file.
diff --git a/tests/stream/test_stream.cpp b/tests/stream/test_stream.cpp
index f4d645d..302f108 100644
--- a/tests/stream/test_stream.cpp
+++ b/tests/stream/test_stream.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/stream/test_stream_file_stream.h b/tests/stream/test_stream_file_stream.h
index b9bc574..6ae05af 100644
--- a/tests/stream/test_stream_file_stream.h
+++ b/tests/stream/test_stream_file_stream.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/stream/test_stream_generic.h b/tests/stream/test_stream_generic.h
index e8006cd..2f46551 100644
--- a/tests/stream/test_stream_generic.h
+++ b/tests/stream/test_stream_generic.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/stream/test_stream_lexical_cast.h b/tests/stream/test_stream_lexical_cast.h
index f8c40f9..4e6c483 100644
--- a/tests/stream/test_stream_lexical_cast.h
+++ b/tests/stream/test_stream_lexical_cast.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -197,7 +197,7 @@ SEQAN_TYPED_TEST(LexicalCastTest, FloatingPointSource)
 
     assign(this->source, "-123.45");
     bool success = lexicalCast(this->target, this->source);
-    SEQAN_ASSERT(success ^ IsIntegral<typename TestFixture::TTarget>::VALUE);
+    SEQAN_ASSERT(success ^ Is<IntegerConcept<typename TestFixture::TTarget> >::Type::VALUE);
     if (success) SEQAN_ASSERT_LT(this->target + reciprocal, epsilon);
 }
 
@@ -232,7 +232,7 @@ SEQAN_TYPED_TEST(LexicalCastTest, Exception)
     {
         this->target = lexicalCast<typename TestFixture::TTarget>(this->source);
     }
-    catch (BadLexicalCast)
+    catch (BadLexicalCast &)
     {
         return;
     }
diff --git a/tests/stream/test_stream_tokenization.h b/tests/stream/test_stream_tokenization.h
index 4fdcece..836f04d 100644
--- a/tests/stream/test_stream_tokenization.h
+++ b/tests/stream/test_stream_tokenization.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -203,7 +203,7 @@ SEQAN_TYPED_TEST(TokenizationTest, read)
     // check EOF-handling
     clear(buf);
     readUntil(buf, ctx.iter, EqualsChar<'*'>());
-    SEQAN_ASSERT_EQ(value(ctx.iter), '*');
+    SEQAN_ASSERT_EQ(*(ctx.iter), '*');
 
     clear(buf);
     SEQAN_ASSERT_EQ(read(buf,ctx.iter, 3), 1);
@@ -222,14 +222,14 @@ SEQAN_TYPED_TEST(TokenizationTest, ReadIgnoring)
 
     // skip to where we want to go
     readUntil(buf, ctx.iter, IsInAlphabet<Dna5>());
-    SEQAN_ASSERT_EQ(value(ctx.iter), 'A');
+    SEQAN_ASSERT_EQ(*(ctx.iter), 'A');
 
     readUntil(buf2, ctx.iter, NotFunctor<OrFunctor<IsInAlphabet<Dna5>, IsWhitespace> >(), IsWhitespace());
     SEQAN_ASSERT_EQ(buf2, "AAAACCCGGGTTTTCG");
-    SEQAN_ASSERT_EQ(value(ctx.iter), 'f');
+    SEQAN_ASSERT_EQ(*(ctx.iter), 'f');
 
     readUntil(buf, ctx.iter, IsInAlphabet<Dna5>());
-    SEQAN_ASSERT_EQ(value(ctx.iter), 'A');
+    SEQAN_ASSERT_EQ(*(ctx.iter), 'A');
 
     clear(buf2);
     readUntil(buf2, ctx.iter, EqualsChar<'_'>(), NotFunctor<IsInAlphabet<Dna5> >());
@@ -246,16 +246,16 @@ SEQAN_TYPED_TEST(TokenizationTest, ReadUntil_ReadLine)
     CharString buf;
     // skip to where we want to go
     readUntil(buf, ctx.iter, EqualsChar<'A'>());
-    SEQAN_ASSERT_EQ(value(ctx.iter), 'A');
+    SEQAN_ASSERT_EQ(*(ctx.iter), 'A');
 
     clear(buf);
     readLine(buf, ctx.iter);
     SEQAN_ASSERT_EQ(buf, "AAAACCCGGGTTT");
-    SEQAN_ASSERT_EQ(value(ctx.iter), ' ');
+    SEQAN_ASSERT_EQ(*(ctx.iter), ' ');
 
     clear(buf);
     readLine(buf, ctx.iter);
-    SEQAN_ASSERT_EQ(value(ctx.iter), '\a');
+    SEQAN_ASSERT_EQ(*(ctx.iter), '\a');
 
     clear(buf);
     readUntil(buf, ctx.iter, EqualsChar<'1'>());
@@ -263,12 +263,12 @@ SEQAN_TYPED_TEST(TokenizationTest, ReadUntil_ReadLine)
     clear(buf);
     readLine(buf, ctx.iter);
     SEQAN_ASSERT_EQ(buf, "123gogogo ");
-    SEQAN_ASSERT_EQ(value(ctx.iter), 'T');
+    SEQAN_ASSERT_EQ(*(ctx.iter), 'T');
 
     // check EOF-handling
     clear(buf);
     readUntil(buf, ctx.iter, EqualsChar<'*'>());
-    SEQAN_ASSERT_EQ(value(ctx.iter), '*');
+    SEQAN_ASSERT_EQ(*(ctx.iter), '*');
 
     clear(buf);
     readLine(buf, ctx.iter);
@@ -283,35 +283,35 @@ SEQAN_TYPED_TEST(TokenizationTest, SkipUntil)
     SEQAN_ASSERT_NOT(atEnd(ctx.iter));
 
     skipUntil(ctx.iter, EqualsChar<'.'>());
-    SEQAN_ASSERT_EQ(value(ctx.iter), '.');
+    SEQAN_ASSERT_EQ(*(ctx.iter), '.');
 
     skipUntil(ctx.iter, IsBlank());
-    SEQAN_ASSERT_EQ(value(ctx.iter), ' ');
+    SEQAN_ASSERT_EQ(*(ctx.iter), ' ');
 
     skipUntil(ctx.iter, EqualsChar<'A'>());
-    SEQAN_ASSERT_EQ(value(ctx.iter), 'A');
+    SEQAN_ASSERT_EQ(*(ctx.iter), 'A');
 
     skipUntil(ctx.iter, IsWhitespace());
-    SEQAN_ASSERT_EQ(value(ctx.iter), '\n');
+    SEQAN_ASSERT_EQ(*(ctx.iter), '\n');
 
     skipUntil(ctx.iter, EqualsChar<'A'>());
-    SEQAN_ASSERT_EQ(value(ctx.iter), 'A');
+    SEQAN_ASSERT_EQ(*(ctx.iter), 'A');
 
     skipUntil(ctx.iter, IsBlank());
-    SEQAN_ASSERT_EQ(value(ctx.iter), ' ');
+    SEQAN_ASSERT_EQ(*(ctx.iter), ' ');
 
     skipUntil(ctx.iter, EqualsChar<'A'>());
-    SEQAN_ASSERT_EQ(value(ctx.iter), 'A');
+    SEQAN_ASSERT_EQ(*(ctx.iter), 'A');
 
     skipUntil(ctx.iter, IsWhitespace());
-    SEQAN_ASSERT_EQ(value(ctx.iter), '\n');
+    SEQAN_ASSERT_EQ(*(ctx.iter), '\n');
 
     skipUntil(ctx.iter, IsGraph()); // skip over \a
-    SEQAN_ASSERT_EQ(value(ctx.iter), '1');
+    SEQAN_ASSERT_EQ(*(ctx.iter), '1');
 
     // check EOF-handling
     skipUntil(ctx.iter, EqualsChar<'*'>());
-    SEQAN_ASSERT_EQ(value(ctx.iter), '*');
+    SEQAN_ASSERT_EQ(*(ctx.iter), '*');
 
     skipUntil(ctx.iter, IsWhitespace());
     SEQAN_ASSERT(atEnd(ctx.iter));
@@ -324,37 +324,37 @@ SEQAN_TYPED_TEST(TokenizationTest, SkipLine)
     SEQAN_ASSERT_NOT(atEnd(ctx.iter));
 
     skipLine(ctx.iter);
-    SEQAN_ASSERT_EQ(value(ctx.iter), ' ');
+    SEQAN_ASSERT_EQ(*(ctx.iter), ' ');
 
     skipLine(ctx.iter);
-    SEQAN_ASSERT_EQ(value(ctx.iter), '\a');
+    SEQAN_ASSERT_EQ(*(ctx.iter), '\a');
 
     skipLine(ctx.iter);
-    SEQAN_ASSERT_EQ(value(ctx.iter), 'T');
+    SEQAN_ASSERT_EQ(*(ctx.iter), 'T');
 
     skipLine(ctx.iter);
-    SEQAN_ASSERT_EQ(value(ctx.iter), 'e');
+    SEQAN_ASSERT_EQ(*(ctx.iter), 'e');
 
     skipLine(ctx.iter);
-    SEQAN_ASSERT_EQ(value(ctx.iter), 'e');
+    SEQAN_ASSERT_EQ(*(ctx.iter), 'e');
 
     skipLine(ctx.iter);
-    SEQAN_ASSERT_EQ(value(ctx.iter), '\n');
+    SEQAN_ASSERT_EQ(*(ctx.iter), '\n');
 
     skipLine(ctx.iter);
-    SEQAN_ASSERT_EQ(value(ctx.iter), '\v');
+    SEQAN_ASSERT_EQ(*(ctx.iter), '\v');
 
     skipLine(ctx.iter);
-    SEQAN_ASSERT_EQ(value(ctx.iter), '\r');
+    SEQAN_ASSERT_EQ(*(ctx.iter), '\r');
 
     skipLine(ctx.iter);
-    SEQAN_ASSERT_EQ(value(ctx.iter), 'A');
+    SEQAN_ASSERT_EQ(*(ctx.iter), 'A');
 
     skipLine(ctx.iter);
-    SEQAN_ASSERT_EQ(value(ctx.iter), '\n');
+    SEQAN_ASSERT_EQ(*(ctx.iter), '\n');
 
     skipLine(ctx.iter);
-    SEQAN_ASSERT_EQ(value(ctx.iter), 'A');
+    SEQAN_ASSERT_EQ(*(ctx.iter), 'A');
 
     skipLine(ctx.iter);
     SEQAN_ASSERT(atEnd(ctx.iter));
diff --git a/tests/stream/test_stream_virtual_stream.h b/tests/stream/test_stream_virtual_stream.h
index 81d0bc3..c0bc509 100644
--- a/tests/stream/test_stream_virtual_stream.h
+++ b/tests/stream/test_stream_virtual_stream.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -76,8 +76,7 @@ IIIIIIII\n";
 
 SEQAN_TYPED_TEST(VStreamTest, Construct)
 {
-    CharString fileName = SEQAN_PATH_TO_ROOT();
-    append(fileName, "/tests/seq_io/test_dna.fq");
+    CharString fileName = getAbsolutePath("/tests/seq_io/test_dna.fq");
     append(fileName, FileExtensions<typename TestFixture::Type>::VALUE[0]);
     VirtualStream<char, Input> vstream(toCString(fileName), OPEN_RDONLY);
     SEQAN_ASSERT((bool)vstream);
@@ -89,8 +88,7 @@ SEQAN_TYPED_TEST(VStreamTest, Construct)
 
 SEQAN_TYPED_TEST(VStreamTest, OpenClose)
 {
-    CharString fileName = SEQAN_PATH_TO_ROOT();
-    append(fileName, "/tests/seq_io/test_dna.fq");
+    CharString fileName = getAbsolutePath("/tests/seq_io/test_dna.fq");
     append(fileName, FileExtensions<typename TestFixture::Type>::VALUE[0]);
     VirtualStream<char, Input> vstream;
 
@@ -111,8 +109,7 @@ SEQAN_TYPED_TEST(VStreamTest, OpenClose)
 SEQAN_TYPED_TEST(VStreamTest, Decompression)
 {
     typedef typename TestFixture::Type TCompressionTag;
-    CharString fileName = SEQAN_PATH_TO_ROOT();
-    append(fileName, "/tests/seq_io/test_dna.fq");
+    CharString fileName = getAbsolutePath("/tests/seq_io/test_dna.fq");
     append(fileName, FileExtensions<TCompressionTag>::VALUE[0]);
     VirtualStream<char, Input> vstream(toCString(fileName), OPEN_RDONLY);
     SEQAN_ASSERT((bool)vstream);
@@ -123,8 +120,7 @@ SEQAN_TYPED_TEST(VStreamTest, Decompression)
     close(vstream);
     SEQAN_ASSERT_NOT((bool)vstream);
 
-    fileName = SEQAN_PATH_TO_ROOT();
-    append(fileName, "/tests/seq_io/test_dna.fa");
+    fileName = getAbsolutePath("/tests/seq_io/test_dna.fa");
     append(fileName, FileExtensions<TCompressionTag>::VALUE[0]);
     open(vstream, toCString(toCString(fileName)), OPEN_RDONLY);
 
@@ -164,8 +160,7 @@ SEQAN_TYPED_TEST(VStreamTest, Compression)
 SEQAN_TYPED_TEST(VStreamTest, AutoDetection)
 {
     typedef typename TestFixture::Type TCompressionTag;
-    CharString fileName = SEQAN_PATH_TO_ROOT();
-    append(fileName, "/tests/seq_io/test_dna.fq");
+    CharString fileName = getAbsolutePath("/tests/seq_io/test_dna.fq");
     append(fileName, FileExtensions<TCompressionTag>::VALUE[0]);
     std::fstream file(toCString(fileName), std::ios::in | std::ios::binary);
 
diff --git a/tests/stream/test_stream_write.h b/tests/stream/test_stream_write.h
index 14489e8..20497e2 100644
--- a/tests/stream/test_stream_write.h
+++ b/tests/stream/test_stream_write.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/swift_local/test_find_swift.cpp b/tests/swift_local/test_find_swift.cpp
index 677b298..62ce004 100755
--- a/tests/swift_local/test_find_swift.cpp
+++ b/tests/swift_local/test_find_swift.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/tabix_io/test_tabix_io.cpp b/tests/tabix_io/test_tabix_io.cpp
index ad3124a..3efa4c3 100644
--- a/tests/tabix_io/test_tabix_io.cpp
+++ b/tests/tabix_io/test_tabix_io.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/tabix_io/test_tabix_io.h b/tests/tabix_io/test_tabix_io.h
index b076e4c..1040417 100644
--- a/tests/tabix_io/test_tabix_io.h
+++ b/tests/tabix_io/test_tabix_io.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -43,11 +43,11 @@
 #include <seqan/tabix_io.h>
 
 
+#if SEQAN_HAS_ZLIB
 SEQAN_DEFINE_TEST(test_tabix_io_read_indexed_vcf)
 {
     // Open TABIX file
-    seqan::CharString vcfPath = SEQAN_PATH_TO_ROOT();
-    append(vcfPath, "/tests/tabix_io/test.vcf.gz");
+    seqan::CharString vcfPath = seqan::getAbsolutePath("/tests/tabix_io/test.vcf.gz");
     seqan::VcfFileIn vcfFile(toCString(vcfPath));
 
     // Read header (to get the contig names)
@@ -116,5 +116,12 @@ SEQAN_DEFINE_TEST(test_tabix_io_read_indexed_vcf)
     SEQAN_ASSERT_NOT(atEnd(vcfFile));
 }
 
+#else // SEQAN_HAS_ZLIB
+SEQAN_DEFINE_TEST(test_tabix_io_read_indexed_vcf)
+{
+    SEQAN_SKIP_TEST;
+}
+#endif // SEQAN_HAS_ZLIB
+
 
 #endif  // SEQAN_TESTS_TABIX_TEST_TABIX_IO_H_
diff --git a/tests/translation/test_translation.cpp b/tests/translation/test_translation.cpp
index d6e57f9..6805bfe 100644
--- a/tests/translation/test_translation.cpp
+++ b/tests/translation/test_translation.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/translation/test_translation.h b/tests/translation/test_translation.h
index 88ec7a9..f1d3dd3 100644
--- a/tests/translation/test_translation.h
+++ b/tests/translation/test_translation.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -474,8 +474,10 @@ SEQAN_DEFINE_TEST(test_translation_onestring_multiframe_parallel)
 
 SEQAN_DEFINE_TEST(test_translation_onestring_multiframe_concatdirect_parallel)
 {
+#ifndef __alpha__ // NOTE(h-2): fails on alpha for unknown reasons
     typedef StringSet<String<AminoAcid>, Owner<ConcatDirect<> > > TConcatSet;
     test_translation_onestring_multiframe_impl<TConcatSet, Parallel>();
+#endif
 }
 
 template <typename TSourceSet, typename TResultSet, typename TParallelism>
@@ -598,6 +600,42 @@ test_translation_stringset_multiframe_impl0()
 
         test_translation_stringset_multiframe_impl(comp, source, TParallelism());
     }
+
+    // handle empty input sequences correctly, see #2228
+    {
+        // one empty input results in 6 empty output frames for consistency
+        insertValue(comp,  0, "");
+        insertValue(comp,  1, "");
+        insertValue(comp,  2, "");
+        insertValue(comp,  3, "");
+        insertValue(comp,  4, "");
+        insertValue(comp,  5, "");
+
+        // too short for anything also results in six empty
+        insertValue(comp,  6, "");
+        insertValue(comp,  7, "");
+        insertValue(comp,  8, "");
+        insertValue(comp,  9, "");
+        insertValue(comp, 10, "");
+        insertValue(comp, 11, "");
+
+        // too short for shift results in some empty frames
+        insertValue(comp, 12, "T");
+        insertValue(comp, 13, "");
+        insertValue(comp, 14, "");
+        insertValue(comp, 15, "R");
+        insertValue(comp, 16, "");
+        insertValue(comp, 17, "");
+
+        StringSet<Dna5String, TSetSpec> source;
+        appendValue(source, ""); // empty
+        appendValue(source, "a"); // empty
+        appendValue(source, "acg"); // some empty frames
+        appendValue(source, "acgtnncgtaaaccgttaaaccgnntaagtnnaccccggtaccgataan");
+        appendValue(source, "ggttacgtatnntaccggttagtacttggggcgagtaganngtt");
+
+        test_translation_stringset_multiframe_impl(comp, source, TParallelism());
+    }
 }
 
 SEQAN_DEFINE_TEST(test_translation_stringset_multiframe_serial)
@@ -620,9 +658,10 @@ SEQAN_DEFINE_TEST(test_translation_stringset_multiframe_parallel)
 
 SEQAN_DEFINE_TEST(test_translation_stringset_multiframe_concatdirect_parallel)
 {
-
+#ifndef __alpha__ // NOTE(h-2): fails on alpha for unknown reasons
     test_translation_stringset_multiframe_impl0<Owner<ConcatDirect<> >,
                                                 Parallel>();
+#endif
 }
 
 #endif  // SEQAN_TESTS_BASIC_TEST_TRANSLATION_H_
diff --git a/tests/ucsc_io/test_ucsc_io.cpp b/tests/ucsc_io/test_ucsc_io.cpp
index 2c28ef9..5415467 100755
--- a/tests/ucsc_io/test_ucsc_io.cpp
+++ b/tests/ucsc_io/test_ucsc_io.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -48,8 +48,7 @@ SEQAN_DEFINE_TEST(test_ucsc_io_read_record_ucsc_known_genes)
 {
     // The file contains 13 annotations in total which will be checked line
     // after line.
-    CharString ucscPath = SEQAN_PATH_TO_ROOT();
-    append(ucscPath, "/tests/ucsc_io/example_knownGene.txt");
+    CharString ucscPath = getAbsolutePath("/tests/ucsc_io/example_knownGene.txt");
 
     String<char, MMap<> > mmapString;
     SEQAN_ASSERT(open(mmapString, toCString(ucscPath)));
@@ -104,8 +103,7 @@ SEQAN_DEFINE_TEST(test_ucsc_io_read_record_ucsc_known_isoforms)
 {
     // The file contains 13 annotations in total which will be checked line
     // after line.
-    CharString ucscPath = SEQAN_PATH_TO_ROOT();
-    append(ucscPath, "/tests/ucsc_io/example_knownIsoforms.txt");
+    CharString ucscPath = getAbsolutePath("/tests/ucsc_io/example_knownIsoforms.txt");
 
     String<char, MMap<> > mmapString;
     SEQAN_ASSERT(open(mmapString, toCString(ucscPath)));
@@ -136,8 +134,7 @@ SEQAN_DEFINE_TEST(test_ucsc_io_read_record_ucsc_known_isoforms)
 
 SEQAN_DEFINE_TEST(test_ucsc_io_write_record_ucsc_known_genes)
 {
-    CharString ucscPath = SEQAN_PATH_TO_ROOT();
-    append(ucscPath, "/tests/store/example_knownGene.txt");
+    CharString ucscPath = getAbsolutePath("/tests/store/example_knownGene.txt");
 
     String<char, MMap<> > mmapString;
     SEQAN_ASSERT(open(mmapString, toCString(ucscPath)));
@@ -157,8 +154,7 @@ SEQAN_DEFINE_TEST(test_ucsc_io_write_record_ucsc_known_genes)
 
 SEQAN_DEFINE_TEST(test_ucsc_io_write_record_ucsc_known_isoforms)
 {
-    CharString ucscPath = SEQAN_PATH_TO_ROOT();
-    append(ucscPath, "/tests/store/example_knownIsoforms.txt");
+    CharString ucscPath = getAbsolutePath("/tests/store/example_knownIsoforms.txt");
 
     String<char, MMap<> > mmapString;
     SEQAN_ASSERT(open(mmapString, toCString(ucscPath)));
@@ -180,8 +176,7 @@ SEQAN_DEFINE_TEST(test_ucsc_io_ucsc_file_in_read_record_ucsc_known_genes)
 {
     // The file contains 13 annotations in total which will be checked line
     // after line.
-    CharString ucscPath = SEQAN_PATH_TO_ROOT();
-    append(ucscPath, "/tests/ucsc_io/example_with_errors_knownGene.txt");
+    CharString ucscPath = getAbsolutePath("/tests/ucsc_io/example_with_errors_knownGene.txt");
 
     UcscFileIn ucscFileIn(toCString(ucscPath));
     UcscRecord record;
@@ -231,8 +226,7 @@ SEQAN_DEFINE_TEST(test_ucsc_io_ucsc_file_in_read_record_ucsc_known_isoforms)
 {
     // The file contains 13 annotations in total which will be checked line
     // after line.
-    CharString ucscPath = SEQAN_PATH_TO_ROOT();
-    append(ucscPath, "/tests/ucsc_io/example_knownIsoforms.txt");
+    CharString ucscPath = getAbsolutePath("/tests/ucsc_io/example_knownIsoforms.txt");
 
     
     UcscFileIn ucscFileIn(toCString(ucscPath));
@@ -259,8 +253,7 @@ SEQAN_DEFINE_TEST(test_ucsc_io_ucsc_file_in_read_record_ucsc_known_isoforms)
 
 SEQAN_DEFINE_TEST(test_ucsc_io_ucsc_file_out_write_record_ucsc_known_genes)
 {
-    CharString ucscPath = SEQAN_PATH_TO_ROOT();
-    append(ucscPath, "/tests/store/example_knownGene.txt");
+    CharString ucscPath = getAbsolutePath("/tests/store/example_knownGene.txt");
 
     String<char, MMap<> > mmapString;
     SEQAN_ASSERT(open(mmapString, toCString(ucscPath)));
@@ -281,8 +274,7 @@ SEQAN_DEFINE_TEST(test_ucsc_io_ucsc_file_out_write_record_ucsc_known_genes)
 
 SEQAN_DEFINE_TEST(test_ucsc_io_ucsc_file_out_write_record_ucsc_known_isoforms)
 {
-    CharString ucscPath = SEQAN_PATH_TO_ROOT();
-    append(ucscPath, "/tests/store/example_knownIsoforms.txt");
+    CharString ucscPath = getAbsolutePath("/tests/store/example_knownIsoforms.txt");
 
     String<char, MMap<> > mmapString;
     SEQAN_ASSERT(open(mmapString, toCString(ucscPath)));
diff --git a/tests/vcf_io/example_records_with_errors.vcf b/tests/vcf_io/example_records_with_errors.vcf
index f7a04e7..e00f079 100644
--- a/tests/vcf_io/example_records_with_errors.vcf
+++ b/tests/vcf_io/example_records_with_errors.vcf
@@ -1,6 +1,8 @@
 20	14370	rs6054257	G	A	29	PASS	NS=3;DP=14;AF=0.5;DB;H2	GT:GQ:DP:HQ	0|0:48:1:51,51	1|0:48:8:51,51	1/1:43:5:.,.
 20	17330	.	T	A	3	q10	NS=3;DP=11;AF=0.017	GT:GQ:DP:HQ	0|0:49:3:58,50	0|1:3:5:65,3	0/0:41:3
 20	1110696	rs6040355	A	G,T	67	PASS	NS=2;DP=10;AF=0.333,0.667;AA=T;DB	GT:GQ:DP:HQ	1|2:21:6:23,27	2|1:2:0:18,2	2/2:35:4
+20	1110696	rs6040355	A	G,T	67	PASS	NS=2;DP=10;AF=0.333,0.667;AA=T;DB	0|0:49:3:58,50	2|1:2:0:18,2	2/2:35:4
+20	1110696	rs6040355	A	G,T	67	PASS	NS=2;DP=10;AF=0.333,0.667;AA=T;DB	0|0:49:3:58,50	1|2:21:6:23,27	2|1:2:0:18,2	
 20
 20	
 20	1110696
@@ -19,6 +21,3 @@
 20	1110696	rs6040355	A	G,T	67	PASS	NS=2;DP=10;AF=0.333,0.667;AA=T;DB	GT:GQ:DP:HQ	2/2:35:4
 20	1110696	rs6040355	A	G,T	67	PASS	NS=2;DP=10;AF=0.333,0.667;AA=T;DB	GT:GQ:DP:HQ	2/2:35:4	
 20	1110696	rs6040355	A	G,T	67	PASS	NS=2;DP=10;AF=0.333,0.667;AA=T;DB	GT:GQ:DP:HQ		2/2:35:4
-20	1110696	rs6040355	A	G,T	67	PASS	NS=2;DP=10;AF=0.333,0.667;AA=T;DB	GT:GQ:DP:HQ	2|1:2:0:18,2	2/2:35:4
-20	1110696	rs6040355	A	G,T	67	PASS	NS=2;DP=10;AF=0.333,0.667;AA=T;DB	GT:GQ:DP:HQ	1|2:21:6:23,27	2|1:2:0:18,2		
-
diff --git a/tests/vcf_io/test_vcf_io.cpp b/tests/vcf_io/test_vcf_io.cpp
index 9d6afe1..a21c016 100644
--- a/tests/vcf_io/test_vcf_io.cpp
+++ b/tests/vcf_io/test_vcf_io.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/tests/vcf_io/test_vcf_io.h b/tests/vcf_io/test_vcf_io.h
index 33ab5db..0e96e1e 100644
--- a/tests/vcf_io/test_vcf_io.h
+++ b/tests/vcf_io/test_vcf_io.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
@@ -44,8 +44,7 @@
 
 SEQAN_DEFINE_TEST(test_vcf_io_read_vcf_header)
 {
-    seqan::CharString vcfPath = SEQAN_PATH_TO_ROOT();
-    append(vcfPath, "/tests/vcf_io/example.vcf");
+    seqan::CharString vcfPath = seqan::getAbsolutePath("/tests/vcf_io/example.vcf");
 
     seqan::String<char, seqan::MMap<> > mmapString;
     SEQAN_ASSERT(open(mmapString, toCString(vcfPath)));
@@ -106,8 +105,7 @@ SEQAN_DEFINE_TEST(test_vcf_io_read_vcf_header)
 
 SEQAN_DEFINE_TEST(test_vcf_io_read_vcf_record)
 {
-    seqan::CharString vcfPath = SEQAN_PATH_TO_ROOT();
-    append(vcfPath, "/tests/vcf_io/example_records_with_errors.vcf");
+    seqan::CharString vcfPath = seqan::getAbsolutePath("/tests/vcf_io/example_records_with_errors.vcf");
 
     seqan::String<char, seqan::MMap<> > mmapString;
     open(mmapString, toCString(vcfPath));
@@ -120,13 +118,13 @@ SEQAN_DEFINE_TEST(test_vcf_io_read_vcf_record)
 
     seqan::String<seqan::VcfRecord> records;
     seqan::VcfRecord record;
-    for (unsigned i = 0; i < 3; ++i)
+    for (unsigned i = 0; i < 5; ++i)
     {
         readRecord(record, vcfIOContext, iter, seqan::Vcf());
         appendValue(records, record);
     }
 
-    SEQAN_ASSERT_EQ(length(records), 3u);
+    SEQAN_ASSERT_EQ(length(records), 5u);
 
     SEQAN_ASSERT_EQ(records[0].rID, 0);
     SEQAN_ASSERT_EQ(records[0].beginPos, 14369);
@@ -161,18 +159,41 @@ SEQAN_DEFINE_TEST(test_vcf_io_read_vcf_record)
     SEQAN_ASSERT_EQ(records[2].format, "GT:GQ:DP:HQ");
     SEQAN_ASSERT_EQ(length(records[2].genotypeInfos), 3u);
 
+    // the next 2 recodrs are valid since vcf v4.2
+    SEQAN_ASSERT_EQ(records[3].rID, 0);
+    SEQAN_ASSERT_EQ(records[3].beginPos, 1110695);
+    SEQAN_ASSERT_EQ(records[3].id, "rs6040355");
+    SEQAN_ASSERT_EQ(records[3].ref, "A");
+    SEQAN_ASSERT_EQ(records[3].alt, "G,T");
+    SEQAN_ASSERT_EQ(records[3].qual, 67);
+    SEQAN_ASSERT_EQ(records[3].filter, "PASS");
+    SEQAN_ASSERT_EQ(records[3].info, "NS=2;DP=10;AF=0.333,0.667;AA=T;DB");
+    SEQAN_ASSERT_EQ(records[3].format, ""); // empty formats are accepted since v4.2
+    SEQAN_ASSERT_EQ(length(records[3].genotypeInfos), 3u);
+
+    SEQAN_ASSERT_EQ(records[4].rID, 0);
+    SEQAN_ASSERT_EQ(records[4].beginPos, 1110695);
+    SEQAN_ASSERT_EQ(records[4].id, "rs6040355");
+    SEQAN_ASSERT_EQ(records[4].ref, "A");
+    SEQAN_ASSERT_EQ(records[4].alt, "G,T");
+    SEQAN_ASSERT_EQ(records[4].qual, 67);
+    SEQAN_ASSERT_EQ(records[4].filter, "PASS");
+    SEQAN_ASSERT_EQ(records[4].info, "NS=2;DP=10;AF=0.333,0.667;AA=T;DB");
+    SEQAN_ASSERT_EQ(records[4].format, ""); // empty formats are accepted since v4.2
+    SEQAN_ASSERT_EQ(length(records[4].genotypeInfos), 3u);
+
+    // the next 18 records are invalid and readRecord should throw ParseError
+    // continuing to read after EOF file should also result in ParseError
     for (unsigned i = 0; i < 25; ++i)
     {
         SEQAN_TEST_EXCEPTION(seqan::ParseError,
                              seqan::readRecord(record, vcfIOContext, iter, seqan::Vcf()));
-        seqan::skipLine(iter);
     }
 }
 
 SEQAN_DEFINE_TEST(test_vcf_io_vcf_file_read_record)
 {
-    seqan::CharString vcfPath = SEQAN_PATH_TO_ROOT();
-    append(vcfPath, "/tests/vcf_io/example.vcf");
+    seqan::CharString vcfPath = seqan::getAbsolutePath("/tests/vcf_io/example.vcf");
 
     seqan::VcfFileIn vcfStream(toCString(vcfPath));
     seqan::VcfHeader header;
@@ -322,14 +343,14 @@ SEQAN_DEFINE_TEST(test_vcf_io_write_vcf_header)
     writeHeader(iter, vcfHeader, vcfIOContext, seqan::Vcf());
     file.close();
 
-    std::string goldPath = (std::string)SEQAN_PATH_TO_ROOT() + "/tests/vcf_io/vcf_header.vcf";
+    std::string goldPath = seqan::getAbsolutePath("/tests/vcf_io/vcf_header.vcf");
     SEQAN_ASSERT(seqan::_compareTextFilesAlt(tmpPath.c_str(), goldPath.c_str()));
 }
 
 
 SEQAN_DEFINE_TEST(test_vcf_io_write_vcf_record)
 {
-    std::string goldPath = (std::string)SEQAN_PATH_TO_ROOT() + "/tests/vcf_io/example_records.vcf";
+    std::string goldPath = seqan::getAbsolutePath("/tests/vcf_io/example_records.vcf");
     std::string tmpPath = (std::string)SEQAN_TEMP_FILENAME() + ".vcf";
 
     std::ifstream file(goldPath.c_str());
@@ -462,8 +483,7 @@ SEQAN_DEFINE_TEST(test_vcf_io_vcf_file_write_record)
 
     close(vcfStream);
 
-    seqan::CharString goldPath(SEQAN_PATH_TO_ROOT());
-    append(goldPath, "/tests/vcf_io/example.vcf");
+    seqan::CharString goldPath(seqan::getAbsolutePath("/tests/vcf_io/example.vcf"));
     SEQAN_ASSERT(seqan::_compareTextFilesAlt(tmpPath.c_str(), toCString(goldPath)));
 }
 
diff --git a/util/bin/adjust_copyright_years.sh b/util/bin/adjust_copyright_years.sh
index 6cff8b2..f875751 100755
--- a/util/bin/adjust_copyright_years.sh
+++ b/util/bin/adjust_copyright_years.sh
@@ -7,10 +7,9 @@
 # Note: Call this file from the seqan root directory.
 
 for i in $( find {include,tests,demos,apps,util,manual} -name "*.h" -o -name "*.cpp" -o -name "LICENSE" -o -name "*.cu" -o -name "*.cmake" -o -name "*.rst" -o -name "COPYRIGHT" ); do
-    sed -i 's/Copyright (c) 20..-20..\(.*\)Knut Reinert, FU Berlin/Copyright (c) 2006-2016\1Knut Reinert, FU Berlin/g' $i
+    sed -i.bak -e 's/Copyright (c) 20\(..\)-20..\(.*\)/Copyright (c) 20\1-2018\2/g' $i
 done
 
 for i in $( find {include,tests,apps} -name "INFO" ); do
-    sed -i 's/Copyright: 20..-20.*, FU Berlin/Copyright: 2006-2016, FU Berlin/g' $i
+    sed -i.bak -e 's/Copyright: 20\(..\)-20..\(.*\)/Copyright: 20\1-2018\2/g' $i
 done
-
diff --git a/util/cmake/FindGitInfo.cmake b/util/cmake/FindGitInfo.cmake
index 482a108..5b7764c 100644
--- a/util/cmake/FindGitInfo.cmake
+++ b/util/cmake/FindGitInfo.cmake
@@ -1,7 +1,7 @@
 # ============================================================================
 #                  SeqAn - The Library for Sequence Analysis
 # ============================================================================
-# Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+# Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
diff --git a/util/cmake/FindGitInfo.cmake b/util/cmake/FindSDE.cmake
similarity index 57%
copy from util/cmake/FindGitInfo.cmake
copy to util/cmake/FindSDE.cmake
index 482a108..59214ec 100644
--- a/util/cmake/FindGitInfo.cmake
+++ b/util/cmake/FindSDE.cmake
@@ -1,7 +1,7 @@
 # ============================================================================
 #                  SeqAn - The Library for Sequence Analysis
 # ============================================================================
-# Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+# Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -28,37 +28,54 @@
 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
 # DAMAGE.
 # ============================================================================
+# Author: Marcel Ehrhardt <marcel.ehrhardt at fu-berlin.de>
+# ============================================================================
 #
-# This CMake module will try to find git information. You can use  it the same
-# way you would use any other CMake module.
+#.rst:
+# FindSDE
+# ---------
 #
-#   find_package(GitInfo [REQUIRED] ...)
+# Try to find Intel® Software Development Emulator
 #
-# If the Git package is found, the macro
-#  GIT_WC_INFO(<dir> <var-prefix>)
-# is defined to extract information of a git working copy at a given location.
+# Once done this will define
 #
-# The macro defines the following variables:
-#  <var-prefix>_WC_REVISION - Hash of last commit
-#  <var-prefix>_WC_LAST_CHANGED_DATE - Date of last commit
+# ::
 #
-# ============================================================================
+#   SDE_FOUND - system has Intel® SDE
+#   SDE_EXECUTABLE - the Intel® SDE executable (full path)
+#   SDE_VERSION_STRING - the version of Intel® SDE found
+
+set(SDE_EXECUTABLE)
+set(SDE_VERSION_STRING)
+
+# first try 64bit and then 32bit version of sde
+foreach(sde_exec "sde64" "sde")
+    find_program(SDE_EXECUTABLE
+        NAMES "${sde_exec}"
+        PATHS
+            /usr/bin
+            /usr/local/bin
+            /opt/local/bin
+        DOC "Intel Software Development Emulator"
+    )
 
-find_package (Git QUIET)
+    if (SDE_EXECUTABLE)
+      execute_process(COMMAND "${SDE_EXECUTABLE}" "--version" OUTPUT_VARIABLE SDE_OUTPUT_VERSION)
+      if (SDE_OUTPUT_VERSION MATCHES "Software Development Emulator")
+          string(REGEX REPLACE ".*Software Development Emulator.*Version:[ ]*([0-9]+\\.[^ ]+).*" "\\1" SDE_VERSION_STRING "${SDE_OUTPUT_VERSION}")
+          break()
+      endif()
+    endif()
+endforeach()
 
-if (GIT_FOUND)
+include(FindPackageHandleStandardArgs)
 
-  macro(GIT_WC_INFO dir prefix)
-    execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --verify -q --short=7 HEAD
-      WORKING_DIRECTORY ${dir}
-      ERROR_QUIET
-      OUTPUT_VARIABLE ${prefix}_WC_REVISION
-      OUTPUT_STRIP_TRAILING_WHITESPACE)
-    execute_process(COMMAND ${GIT_EXECUTABLE} log -n 1 --simplify-by-decoration --pretty=%ai
-      WORKING_DIRECTORY ${dir}
-      ERROR_QUIET
-      OUTPUT_VARIABLE ${prefix}_WC_LAST_CHANGED_DATE
-      OUTPUT_STRIP_TRAILING_WHITESPACE)
-  endmacro(GIT_WC_INFO)
+find_package_handle_standard_args(
+    SDE
+    FOUND_VAR SDE_FOUND
+    REQUIRED_VARS SDE_EXECUTABLE SDE_VERSION_STRING
+    VERSION_VAR SDE_VERSION_STRING
+    FAIL_MESSAGE "Could NOT find SDE: Intel(R) Software Development Emulator (sde)"
+)
 
-endif()
+mark_as_advanced(SDE_EXECUTABLE)
diff --git a/util/cmake/FindGitInfo.cmake b/util/cmake/FindUmesimd.cmake
similarity index 61%
copy from util/cmake/FindGitInfo.cmake
copy to util/cmake/FindUmesimd.cmake
index 482a108..3cb1587 100644
--- a/util/cmake/FindGitInfo.cmake
+++ b/util/cmake/FindUmesimd.cmake
@@ -1,7 +1,7 @@
 # ============================================================================
 #                  SeqAn - The Library for Sequence Analysis
 # ============================================================================
-# Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+# Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -28,37 +28,38 @@
 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
 # DAMAGE.
 # ============================================================================
+# Author: Marcel Ehrhardt <marcel.ehrhardt at fu-berlin.de>
+# ============================================================================
 #
-# This CMake module will try to find git information. You can use  it the same
-# way you would use any other CMake module.
+#.rst:
+# FindUmesimd
+# -----------
 #
-#   find_package(GitInfo [REQUIRED] ...)
+# Try to find UME::SIMD includes
 #
-# If the Git package is found, the macro
-#  GIT_WC_INFO(<dir> <var-prefix>)
-# is defined to extract information of a git working copy at a given location.
+# Once done this will define
 #
-# The macro defines the following variables:
-#  <var-prefix>_WC_REVISION - Hash of last commit
-#  <var-prefix>_WC_LAST_CHANGED_DATE - Date of last commit
+# ::
 #
-# ============================================================================
+#   UMESIMD_FOUND - system has UME::SIMD
+#   UMESIMD_INCLUDE_DIR - the UME::SIMD include directory
+#   UMESIMD_VERSION_STRING - the version of UME::SIMD found
+
+find_path(UMESIMD_CHILD_INCLUDE_DIR UMESimd.h PATH_SUFFIXES umesimd)
 
-find_package (Git QUIET)
+if (UMESIMD_CHILD_INCLUDE_DIR AND EXISTS "${UMESIMD_CHILD_INCLUDE_DIR}/UMESimd.h")
+    get_filename_component(UMESIMD_INCLUDE_DIR ${UMESIMD_CHILD_INCLUDE_DIR} DIRECTORY)
 
-if (GIT_FOUND)
+    file(STRINGS "${UMESIMD_CHILD_INCLUDE_DIR}/UMESimd.h" UMESIMD_H REGEX "#define UME_SIMD_VERSION_(MAJOR|MINOR|PATCH)")
+    string(REGEX REPLACE "#define UME_SIMD_VERSION_(MAJOR|MINOR|PATCH) " "" UMESIMD_VERSION_STRING "${UMESIMD_H}")
+    string(REGEX REPLACE ";" "." UMESIMD_VERSION_STRING "${UMESIMD_VERSION_STRING}")
+endif ()
 
-  macro(GIT_WC_INFO dir prefix)
-    execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --verify -q --short=7 HEAD
-      WORKING_DIRECTORY ${dir}
-      ERROR_QUIET
-      OUTPUT_VARIABLE ${prefix}_WC_REVISION
-      OUTPUT_STRIP_TRAILING_WHITESPACE)
-    execute_process(COMMAND ${GIT_EXECUTABLE} log -n 1 --simplify-by-decoration --pretty=%ai
-      WORKING_DIRECTORY ${dir}
-      ERROR_QUIET
-      OUTPUT_VARIABLE ${prefix}_WC_LAST_CHANGED_DATE
-      OUTPUT_STRIP_TRAILING_WHITESPACE)
-  endmacro(GIT_WC_INFO)
+# set UMESIMD_FOUND to TRUE if all listed variables are TRUE
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(
+    Umesimd
+    REQUIRED_VARS UMESIMD_INCLUDE_DIR
+    VERSION_VAR UMESIMD_VERSION_STRING)
 
-endif()
+mark_as_advanced(UMESIMD_INCLUDE_DIR)
diff --git a/util/cmake/GetCurrentDate.cmake b/util/cmake/GetCurrentDate.cmake
index 8fb3fbe..da21697 100644
--- a/util/cmake/GetCurrentDate.cmake
+++ b/util/cmake/GetCurrentDate.cmake
@@ -1,7 +1,7 @@
 # ============================================================================
 #                  SeqAn - The Library for Sequence Analysis
 # ============================================================================
-# Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+# Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
diff --git a/util/cmake/GetCurrentDate.cpp b/util/cmake/GetCurrentDate.cpp
index 010165c..5584722 100644
--- a/util/cmake/GetCurrentDate.cpp
+++ b/util/cmake/GetCurrentDate.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/util/cmake/SeqAnBuildSystem.cmake b/util/cmake/SeqAnBuildSystem.cmake
index a9f6e74..c7ef0cb 100644
--- a/util/cmake/SeqAnBuildSystem.cmake
+++ b/util/cmake/SeqAnBuildSystem.cmake
@@ -1,7 +1,7 @@
 # ============================================================================
 #                  SeqAn - The Library for Sequence Analysis
 # ============================================================================
-# Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+# Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -37,6 +37,14 @@
 # build system.
 # ============================================================================
 
+# ----------------------------------------------------------------------------
+# Set CMAKE policies.
+# ----------------------------------------------------------------------------
+
+if (POLICY CMP0054)  # Disables auto-dereferencing of variables in quoted statements
+  cmake_policy(SET CMP0054 NEW)
+endif()
+
 # Valid values for SEQAN_BUILD_SYSTEM:
 #
 # DEVELOP
@@ -44,9 +52,21 @@
 # SEQAN_RELEASE_LIBRARY
 # APP:${app_name}
 
+# require python 2.7, not python3
+set(PythonInterp_FIND_VERSION 2.7)
+set(PythonInterp_FIND_VERSION_MAJOR 2)
+set(PythonInterp_FIND_VERSION_MINOR 7)
+set(PythonInterp_FIND_VERSION_COUNT 2)
+
 include (SeqAnUsabilityAnalyzer)
 include (CheckCXXCompilerFlag)
 
+if (DEFINED CMAKE_INSTALL_DOCDIR)
+    set(CMAKE_INSTALL_DOCDIR_IS_SET ON)
+endif ()
+
+include (GNUInstallDirs)
+
 set (COMPILER_CLANG FALSE)
 set (COMPILER_GCC FALSE)
 set (COMPILER_LINTEL FALSE)
@@ -200,7 +220,7 @@ macro (seqan_build_system_init)
         # TODO(h-2): raise this to W4
         set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} /W3")
     else()
-        set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} -W -Wall -pedantic -fstrict-aliasing -Wstrict-aliasing")
+        set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} -W -Wall -pedantic")
         set (SEQAN_DEFINITIONS ${SEQAN_DEFINITIONS} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64)
 
         # disable some warnings on ICC
@@ -227,15 +247,16 @@ macro (seqan_build_system_init)
     endif ()
 
     # Architecture.
-    if (NOT SEQAN_64BIT_TARGET_PLATFORM)
+    if ((NOT SEQAN_64BIT_TARGET_PLATFORM) OR COMPILER_MSVC)
         set (SEQAN_ARCH_SSE4 FALSE)
         set (SEQAN_ARCH_AVX2 FALSE)
+        set (SEQAN_ARCH_AVX512_KNL FALSE)
+        set (SEQAN_ARCH_AVX512_SKX FALSE)
+        set (SEQAN_ARCH_AVX512_CNL FALSE)
     endif ()
 
     if (COMPILER_MSVC)
         set (SEQAN_STATIC_APPS FALSE)
-        set (SEQAN_ARCH_SSE4 FALSE)
-        set (SEQAN_ARCH_AVX2 FALSE)
         set (SEQAN_ARCH_NATIVE FALSE)
     endif ()
 
@@ -248,8 +269,9 @@ macro (seqan_build_system_init)
         endif ()
     endif ()
 
-    # Enable SSE4 if AVX2 is set.
-    if (SEQAN_ARCH_AVX2)
+    # Enable SSE4 if AVX[\d]+ is set. (Other parts in our build system expect it
+    # to be set and it is basically the synonym for 'SIMD is enabled')
+    if (SEQAN_ARCH_AVX2 OR SEQAN_ARCH_AVX512_KNL OR SEQAN_ARCH_AVX512_SKX OR SEQAN_ARCH_AVX512_CNL)
         set (SEQAN_ARCH_SSE4 TRUE)
     endif ()
 
@@ -265,21 +287,31 @@ macro (seqan_build_system_init)
         if (COMPILER_LINTEL)
             set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} -ipo -no-prec-div -fp-model fast=2 -xHOST")
         endif ()
-    else ()
-        if (SEQAN_ARCH_SSE4)
-            if (SEQAN_ARCH_AVX2)
-                message (STATUS "Building optimized binaries up to AVX2 and POPCNT.")
-                set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} -mavx -mavx2")
-            else ()
-                message (STATUS "Building optimized binaries up to SSE4 and POPCNT.")
-            endif ()
-            set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} -mmmx -msse -msse2 -msse3 -mssse3 -msse4")
-            if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")
-                set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} -mpopcnt")
-            endif ()
-            if (COMPILER_LINTEL)
-                set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} -ipo -no-prec-div -fp-model fast=2")
-            endif ()
+    elseif (SEQAN_ARCH_SSE4)
+        include (SeqAnSimdUtility)
+
+        if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")
+            set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} -mpopcnt")
+        endif ()
+        if (COMPILER_LINTEL)
+            set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} -ipo -no-prec-div -fp-model fast=2")
+        endif ()
+
+        if (SEQAN_ARCH_AVX512_CNL)
+            message (STATUS "Building optimized binaries up to AVX512 CNL and POPCNT.")
+            set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} ${SEQAN_SIMD_AVX512_CNL_OPTIONS}")
+        elseif (SEQAN_ARCH_AVX512_SKX)
+            message (STATUS "Building optimized binaries up to AVX512 SKX and POPCNT.")
+            set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} ${SEQAN_SIMD_AVX512_SKX_OPTIONS}")
+        elseif (SEQAN_ARCH_AVX512_KNL)
+            message (STATUS "Building optimized binaries up to AVX512 KNL and POPCNT.")
+            set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} ${SEQAN_SIMD_AVX512_KNL_OPTIONS}")
+        elseif (SEQAN_ARCH_AVX2)
+            message (STATUS "Building optimized binaries up to AVX2 and POPCNT.")
+            set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} ${SEQAN_SIMD_AVX2_OPTIONS}")
+        else ()
+            message (STATUS "Building optimized binaries up to SSE4 and POPCNT.")
+            set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} ${SEQAN_SIMD_SSE4_OPTIONS}")
         endif ()
     endif ()
     # TODO(h-2): for icc on windows, replace the " -" in SEQAN_CXX_FLAGS with " /"
@@ -371,24 +403,24 @@ macro (seqan_setup_library)
         install (FILES LICENSE
                        README.rst
                        CHANGELOG.rst
-                 DESTINATION share/doc/seqan)
+                 DESTINATION ${CMAKE_INSTALL_DOCDIR})
         # Install pkg-config file, except on Windows.
         if (NOT CMAKE_SYSTEM_NAME MATCHES Windows)
             configure_file("util/pkgconfig/seqan.pc.in" "${CMAKE_BINARY_DIR}/util/pkgconfig/seqan-${SEQAN_VERSION_MAJOR}.pc" @ONLY)
-            install(FILES "${CMAKE_BINARY_DIR}/util/pkgconfig/seqan-${SEQAN_VERSION_MAJOR}.pc" DESTINATION lib/pkgconfig)
+            install(FILES "${CMAKE_BINARY_DIR}/util/pkgconfig/seqan-${SEQAN_VERSION_MAJOR}.pc" DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig)
         endif (NOT CMAKE_SYSTEM_NAME MATCHES Windows)
         # Install FindSeqAn TODO(h-2) rename seqan-config.cmake to seqan-config${SEQAN_VERSION_MAJOR}.cmake after 2.x cycle
-        install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/util/cmake/seqan-config.cmake" DESTINATION lib/cmake/seqan/)
+        install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/util/cmake/seqan-config.cmake" DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/cmake/seqan/)
 
         # Install headers
         file (GLOB HEADERS
-              RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+              RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/include/
               include/seqan/[A-z]*/[A-z]/[A-z]*.h
               include/seqan/[A-z]*/[A-z]*.h
               include/seqan/[A-z]*.h)
         foreach (HEADER ${HEADERS})
             get_filename_component (_DESTINATION ${HEADER} PATH)
-            install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/${HEADER} DESTINATION ${_DESTINATION})
+            install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/${HEADER} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${_DESTINATION})
         endforeach ()
     endif ()
 
@@ -445,8 +477,11 @@ macro (seqan_setup_install_vars APP_NAME)
         set (SEQAN_PREFIX_SHARE ".")
         set (SEQAN_PREFIX_SHARE_DOC ".")
     else ()
-        set (SEQAN_PREFIX_SHARE "share/${APP_NAME}")
-        set (SEQAN_PREFIX_SHARE_DOC "share/doc/${APP_NAME}")
+        if (NOT DEFINED CMAKE_INSTALL_DOCDIR_IS_SET)
+            set (CMAKE_INSTALL_DOCDIR "${CMAKE_INSTALL_DATAROOTDIR}/doc" CACHE STRING "Documentation root (DATAROOTDIR/doc)" FORCE)
+        endif ()
+        set (SEQAN_PREFIX_SHARE "${CMAKE_INSTALL_DATADIR}/${APP_NAME}")
+        set (SEQAN_PREFIX_SHARE_DOC "${CMAKE_INSTALL_DOCDIR}/${APP_NAME}")
     endif ()
 endmacro (seqan_setup_install_vars)
 
@@ -516,12 +551,18 @@ macro(INTEL_FILES_FOR_VERSION version)
   endforeach()
 endmacro()
 
+# TODO: Remove once we have cmake > 3.10.x installed on windows clients, as it should be found automatically.
 macro (seqan_install_required_system_libraries)
   set (CMAKE_INSTALL_OPENMP_LIBRARIES ${OPENMP_FOUND})
 
   # include intel dll's
   if(COMPILER_WINTEL)
-    INTEL_FILES_FOR_VERSION(2016)
+    foreach (wintel_version 2018 2017 2016)
+        INTEL_FILES_FOR_VERSION(wintel_version)
+        if (INTEL${wintel_version}_REDIST_DIR)
+            break()
+        endif ()
+    endforeach ()
   endif()
 
   # The following include automates the MS Redistributable installer.
@@ -772,9 +813,15 @@ function (seqan_register_demos PREFIX)
             (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.6.0))
             set (SKIP TRUE)
         # bug in visual studio
-        elseif ((ENTRY MATCHES "queue_example.cpp") AND
-                COMPILER_MSVC)
+        elseif ((ENTRY MATCHES "queue_example.cpp") AND COMPILER_MSVC)
             set (SKIP TRUE)
+        # all demos/* that require ZLIB[_FOUND]
+        elseif (NOT ZLIB_FOUND)
+            if ((ENTRY MATCHES "tabix_io/tabix_vcf.cpp") OR
+                (ENTRY MATCHES "sam_and_bam_io/example7.cpp") OR
+                (ENTRY MATCHES "unassigned_or_unused/bamutil.cpp"))
+                set (SKIP TRUE)
+            endif()
         endif ()
 
         if (SKIP)
diff --git a/util/cmake/SeqAnConsistentFPFlags.cmake b/util/cmake/SeqAnConsistentFPFlags.cmake
index 5e9c44d..70980bb 100644
--- a/util/cmake/SeqAnConsistentFPFlags.cmake
+++ b/util/cmake/SeqAnConsistentFPFlags.cmake
@@ -1,7 +1,7 @@
 # ============================================================================
 #                  SeqAn - The Library for Sequence Analysis
 # ============================================================================
-# Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+# Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
diff --git a/util/cmake/SeqAnContribs.cmake b/util/cmake/SeqAnContribs.cmake
index 77eb0ed..e58fb82 100644
--- a/util/cmake/SeqAnContribs.cmake
+++ b/util/cmake/SeqAnContribs.cmake
@@ -1,7 +1,7 @@
 # ============================================================================
 #                  SeqAn - The Library for Sequence Analysis
 # ============================================================================
-# Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+# Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -35,83 +35,68 @@
 # ============================================================================
 
 if (WIN32)
-  # For all contrib versions...
-  foreach (_SEQAN_CONTRIB_VERSION D20160115)
+# For all contrib versions...
+foreach (_SEQAN_CONTRIB_VERSION D20170601 D20160115)
     set (_SEQAN_CONTRIB_DIR "seqan-contrib-${_SEQAN_CONTRIB_VERSION}")
 
-	  # Determine architecture for the precompiled contribs.
-	  if (CMAKE_SIZEOF_VOID_P EQUAL 8)
-		set (CONTRIB_ARCH "x64")
-	  else ()
-		set (CONTRIB_ARCH "x86")
-	  endif ()
+    # Determine architecture for the precompiled contribs.
+    if (CMAKE_SIZEOF_VOID_P EQUAL 8)
+        set (CONTRIB_ARCH "x64")
+    else ()
+        set (CONTRIB_ARCH "x86")
+    endif ()
 
-	  # Try to figure out where the user installed the contrib.  We expect
-	  # it to be either in C:\, or one of the Program Files dirs.
-	  #
-	  # First, look into Program Files on 64 bit.
-	  if (DEFINED ENV{ProgramW6432})
-		if (IS_DIRECTORY "$ENV{ProgramW6432}/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
-		  set (SEQAN_CONTRIB_BASE "$ENV{ProgramW6432}/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
-		endif (IS_DIRECTORY "$ENV{ProgramW6432}/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
-	  endif (DEFINED ENV{ProgramW6432})
-	  # Try out Program Files for 32bit Windows.
-	  if (NOT DEFINED SEQAN_CONTRIB_BASE)
-		if (IS_DIRECTORY "$ENV{ProgramFiles}/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
-		  set (SEQAN_CONTRIB_BASE "$ENV{ProgramFiles}/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
-		endif (IS_DIRECTORY "$ENV{ProgramFiles}/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
-	  endif (NOT DEFINED SEQAN_CONTRIB_BASE)
-	  # Try out on C:/.
-	  if (NOT DEFINED SEQAN_CONTRIB_BASE)
-		if (IS_DIRECTORY C:\\${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH})
-		  set (SEQAN_CONTRIB_BASE "C:\\${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
-		elseif ()
-		  set (SEQAN_CONTRIB_BASE "C:\\${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
-		endif ()
-	  endif (NOT DEFINED SEQAN_CONTRIB_BASE)
-      # Try to fall back to x64 on C:\ (MinGW is only available as 32 bit).
-      set (CONTRIB_ARCH "x64")
-      if (NOT DEFINED SEQAN_CONTRIB_BASE)
-        if (IS_DIRECTORY "C:\\${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
-          set (SEQAN_CONTRIB_BASE "C:\\${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
+    # Try to figure out where the user installed the contrib.  We expect
+    # it to be either in C:\, or one of the Program Files dirs.
+    #
+    # First, look into Program Files on 64 bit.
+    # Then look into C:\\ and finally check special environment variable.
+
+    set(_paths "$ENV{ProgramW6432}" "$ENV{ProgramFiles}" "C:" "$ENV{SEQAN_WIN_CONTRIB_DIRECTORY}")
+
+    foreach(path ${_paths})
+        set(path "${path}/${_SEQAN_CONTRIB_DIR}-${CONTRIB_ARCH}")
+        # message("Path is ${path}")
+        if (IS_DIRECTORY "${path}")
+            set (SEQAN_CONTRIB_BASE "${path}")
+            break ()
         endif ()
-      endif ()
+    endforeach ()
 
-	  # Debug help.
-      #if (NOT DEFINED SEQAN_CONTRIB_BASE)
-      #	message("SEQAN_CONTRIB_BASE is undefined!")
-      #else (NOT DEFINED SEQAN_CONTRIB_BASE)
-      #	message("SEQAN_CONTRIB_BASE is ${SEQAN_CONTRIB_BASE}")
-      #endif (NOT DEFINED SEQAN_CONTRIB_BASE)
+	# Debug help.
+    # if (NOT DEFINED SEQAN_CONTRIB_BASE)
+    #     message("SEQAN_CONTRIB_BASE is undefined!")
+    # else (NOT DEFINED SEQAN_CONTRIB_BASE)
+    #   	message("SEQAN_CONTRIB_BASE is ${SEQAN_CONTRIB_BASE}")
+    # endif (NOT DEFINED SEQAN_CONTRIB_BASE)
 
-	  # Try to figure out the generator.
-	  if (IS_DIRECTORY ${SEQAN_CONTRIB_BASE})
-		if (CMAKE_GENERATOR MATCHES "^Visual Studio .*")
-		  string (REGEX REPLACE "^Visual Studio ([0-9]+).*$" "\\1" SEQAN_CONTRIB_VARIANT ${CMAKE_GENERATOR})
-		  set (SEQAN_CONTRIB_VARIANT "vs${SEQAN_CONTRIB_VARIANT}")
-		elseif (MINGW)
-		  set (SEQAN_CONTRIB_VARIANT mingw)
-		endif (CMAKE_GENERATOR MATCHES "^Visual Studio .*")
+    # Try to figure out the generator.
+    if (IS_DIRECTORY ${SEQAN_CONTRIB_BASE})
+        if (CMAKE_GENERATOR MATCHES "^Visual Studio .*")
+            string (REGEX REPLACE "^Visual Studio ([0-9]+).*$" "\\1" SEQAN_CONTRIB_VARIANT ${CMAKE_GENERATOR})
+            set (SEQAN_CONTRIB_VARIANT "vs${SEQAN_CONTRIB_VARIANT}")
+        elseif (MINGW)
+            set (SEQAN_CONTRIB_VARIANT mingw)
+        endif (CMAKE_GENERATOR MATCHES "^Visual Studio .*")
 
         #message(STATUS "SEQAN_CONTRIB_BASE    is ${SEQAN_CONTRIB_BASE}")
         #message(STATUS "SEQAN_CONTRIB_VARIANT is ${SEQAN_CONTRIB_VARIANT}")
 
-		# Compose contrib path.
-		set(SEQAN_CONTRIB_PATH "${SEQAN_CONTRIB_BASE}/${SEQAN_CONTRIB_VARIANT}")
+        # Compose contrib path.
+        set(SEQAN_CONTRIB_PATH "${SEQAN_CONTRIB_BASE}/${SEQAN_CONTRIB_VARIANT}")
 
-		# Extend CMAKE_PREFIX_PATH.
-		if (IS_DIRECTORY ${SEQAN_CONTRIB_PATH})
-		  set (CMAKE_PREFIX_PATH ${SEQAN_CONTRIB_PATH} ${CMAKE_PREFIX_PATH})
-		endif (IS_DIRECTORY ${SEQAN_CONTRIB_PATH})
-	  endif (IS_DIRECTORY ${SEQAN_CONTRIB_BASE})
+        # Extend CMAKE_PREFIX_PATH.
+        if (IS_DIRECTORY ${SEQAN_CONTRIB_PATH})
+            set (CMAKE_PREFIX_PATH ${SEQAN_CONTRIB_PATH} ${CMAKE_PREFIX_PATH})
+        endif (IS_DIRECTORY ${SEQAN_CONTRIB_PATH})
+    endif (IS_DIRECTORY ${SEQAN_CONTRIB_BASE})
 
-      message(STATUS "CMAKE_PREFIX_PATH is \"${CMAKE_PREFIX_PATH}\".")
+    message(STATUS "CMAKE_PREFIX_PATH is \"${CMAKE_PREFIX_PATH}\".")
 
-      # Break out if contribs could be found.
-      if (DEFINED SEQAN_CONTRIB_BASE)
+    # Break out if contribs could be found.
+    if (DEFINED SEQAN_CONTRIB_BASE)
         break ()  # found contribs at current path
-      endif (DEFINED SEQAN_CONTRIB_BASE)
+    endif (DEFINED SEQAN_CONTRIB_BASE)
 
-    endforeach ()  # all contrib versions.
+endforeach ()  # all contrib versions.
 endif (WIN32)
-
diff --git a/util/cmake/SeqAnCtdSetup.cmake b/util/cmake/SeqAnCtdSetup.cmake
index c19a798..753a0e9 100755
--- a/util/cmake/SeqAnCtdSetup.cmake
+++ b/util/cmake/SeqAnCtdSetup.cmake
@@ -1,7 +1,7 @@
 # ============================================================================
 #                  SeqAn - The Library for Sequence Analysis
 # ============================================================================
-# Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+# Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
diff --git a/util/cmake/SeqAnSimdUtility.cmake b/util/cmake/SeqAnSimdUtility.cmake
new file mode 100644
index 0000000..af08db9
--- /dev/null
+++ b/util/cmake/SeqAnSimdUtility.cmake
@@ -0,0 +1,647 @@
+# ============================================================================
+#                  SeqAn - The Library for Sequence Analysis
+# ============================================================================
+# Copyright (c) 2006-2018, Knut Reinert, FU Berlin
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+#     * Redistributions of source code must retain the above copyright
+#       notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above copyright
+#       notice, this list of conditions and the following disclaimer in the
+#       documentation and/or other materials provided with the distribution.
+#     * Neither the name of Knut Reinert or the FU Berlin nor the names of
+#       its contributors may be used to endorse or promote products derived
+#       from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+# DAMAGE.
+# ============================================================================
+# Author: Marcel Ehrhardt <marcel.ehrhardt at fu-berlin.de>
+# ============================================================================
+#
+#.rst:
+# SeqanSimdUtility
+# ----------------
+#
+# Utility to create binaries for different SIMD implementations and target
+# architectures. Disables architectures if the compiler can't handle it or bugs
+# in the code generation are known.
+#
+# .. code-block:: cmake
+#
+#   add_executable (
+#     test_simd_vector
+#     test_simd_vector.cpp
+#     test_simd_vector.h)
+#   target_link_libraries (test_simd_vector ${SEQAN_LIBRARIES})
+#   add_simd_platform_tests(test_simd_vector)
+#
+# Could build the following binaries and add tests for them
+#
+# ::
+#
+#   Built target test_simd_vector
+#   Built target test_simd_vector_sse4
+#   Built target test_simd_vector_avx2
+#   Built target test_simd_vector_umesimd
+#   Built target test_simd_vector_umesimd_sse4
+#   Built target test_simd_vector_umesimd_avx2
+#   Built target test_simd_vector_umesimd_avx512_knl
+#
+# Functions
+# +++++++++++
+#
+# ::
+#
+#   add_simd_platform_tests(target)
+#       - builds target on different simd implementations and architectures
+#       - adds targets which use the seqan::simd default implementation
+#       - adds targets which use the UME::SIMD library instead of the seqan
+#         default implementation if UMESIMD_FOUND is set
+#       - adds tests for different architectures if the Intel® Software
+#         Development Emulator could be found, i.e. if SDE_FOUND is set
+#
+#         NOTE: You don't have to add_test the target (e.g. test_simd_vector)
+#         itself, because it will be done by this function.
+#
+#   add_simd_executables(target blacklist) [not required to use explicitly]
+#       - adds executables for sse4, avx2, etc. as `target`_sse4, `target`_avx2,
+#         etc. (Will clone the SOURCE, FLAGS and other properties from `target`)
+#       - blacklist: list of architectures that shouldn't be added (e.g. sse4,
+#         avx2, avx512_knl, avx512_skx, avx512_cnl)
+#
+#   add_simd_tests(target blacklist) [not required to use explicitly]
+#       - adds tests for executables (targets) specified by add_simd_executables
+#       - blacklist: list of architectures which executables shouldn't be tested
+#         (e.g. sse4, avx2, avx512_knl, avx512_skx, avx512_cnl)
+#
+
+find_package (SDE)
+find_package (Umesimd)
+
+include(CheckCXXSourceCompiles)
+include(CheckCXXSourceRuns)
+
+set(SEQAN_SIMD_UTILITY_VERBOSE OFF)
+set(SEQAN_SIMD_SUPPORTED_EXTENSIONS "sse4;avx2;avx512_knl;avx512_skx;avx512_cnl")
+
+if (COMPILER_MSVC)
+    set(SEQAN_SIMD_SSE4_FLAGS "/arch:AVX")
+    set(SEQAN_SIMD_AVX2_FLAGS "/arch:AVX2")
+    set(SEQAN_SIMD_AVX512_KNL_FLAGS "")
+    set(SEQAN_SIMD_AVX512_SKX_FLAGS "")
+    set(SEQAN_SIMD_AVX512_CNL_FLAGS "")
+elseif (COMPILER_WINTEL)
+    set(SEQAN_SIMD_SSE4_FLAGS "/QxSSE4.2")
+    set(SEQAN_SIMD_AVX2_FLAGS "/QxCORE-AVX2")
+    set(SEQAN_SIMD_AVX512_KNL_FLAGS "/QxMIC-AVX512")
+    set(SEQAN_SIMD_AVX512_SKX_FLAGS "/QxCORE-AVX512")
+    set(SEQAN_SIMD_AVX512_CNL_FLAGS "/QxCORE-AVX512")
+elseif (COMPILER_LINTEL)
+    set(SEQAN_SIMD_SSE4_FLAGS "-xSSE4.2")
+    set(SEQAN_SIMD_AVX2_FLAGS "-xCORE-AVX2")
+    set(SEQAN_SIMD_AVX512_KNL_FLAGS "-xMIC-AVX512")
+    set(SEQAN_SIMD_AVX512_SKX_FLAGS "-xCORE-AVX512")
+    set(SEQAN_SIMD_AVX512_CNL_FLAGS "-xCORE-AVX512")
+else()
+    set(SEQAN_SIMD_SSE4_FLAGS "-msse4")
+    set(SEQAN_SIMD_AVX2_FLAGS "-mavx2")
+    set(SEQAN_SIMD_AVX512_KNL_FLAGS "-mavx512f -mavx512cd -mavx512er -mavx512pf")
+    set(SEQAN_SIMD_AVX512_SKX_FLAGS "-mavx512f -mavx512cd -mavx512bw -mavx512dq -mavx512vl")
+    set(SEQAN_SIMD_AVX512_CNL_FLAGS "${SEQAN_SIMD_AVX512_SKX_FLAGS} -mavx512ifma -mavx512vbmi")
+endif()
+
+# offer flags (string) as list for functions like target_compile_options
+string (REPLACE " " ";" SEQAN_SIMD_SSE4_OPTIONS "${SEQAN_SIMD_SSE4_FLAGS}")
+string (REPLACE " " ";" SEQAN_SIMD_AVX2_OPTIONS "${SEQAN_SIMD_AVX2_FLAGS}")
+string (REPLACE " " ";" SEQAN_SIMD_AVX512_KNL_OPTIONS "${SEQAN_SIMD_AVX512_KNL_FLAGS}")
+string (REPLACE " " ";" SEQAN_SIMD_AVX512_SKX_OPTIONS "${SEQAN_SIMD_AVX512_SKX_FLAGS}")
+string (REPLACE " " ";" SEQAN_SIMD_AVX512_CNL_OPTIONS "${SEQAN_SIMD_AVX512_CNL_FLAGS}")
+
+set(SEQAN_SIMD_SSE4_SDE_OPTIONS "-snb")
+set(SEQAN_SIMD_AVX2_SDE_OPTIONS "-hsw")
+set(SEQAN_SIMD_AVX512_KNL_SDE_OPTIONS "-knl")
+set(SEQAN_SIMD_AVX512_SKX_SDE_OPTIONS "-skx")
+set(SEQAN_SIMD_AVX512_CNL_SDE_OPTIONS "-cnl")
+
+set(SEQAN_SIMD_COMPILER_SUPPORTS_INTRINSICS)
+set(SEQAN_SIMD_COMPILER_SUPPORTS_SEQANSIMD)
+set(SEQAN_SIMD_HOST_CPU_SUPPORTS)
+
+set(SEQAN_SIMD_SSE4_SOURCE
+"#include <cstdint>
+#include <immintrin.h>
+#include <iostream>
+#include <random>
+
+int main() {
+  std::random_device r;
+  std::default_random_engine e(r());
+  std::uniform_int_distribution<int32_t> d(1, 10);
+
+  alignas(16) int32_t t[]{0,0,0,0};
+  volatile auto a = _mm_set_epi32(d(e),d(e),d(e),d(e));
+  volatile auto b = _mm_set_epi32(d(e),d(e),d(e),d(e));
+  volatile auto z = _mm_max_epi32(a, b);
+  _mm_store_si128((__m128i*)t, z);
+  std::cout << \"(\" << t[0] << \", \" << t[1] << \", \" << t[2] << \", \" << t[3] << \")\" << std::endl;
+  return 0;
+}")
+
+set(SEQAN_SIMD_AVX2_SOURCE
+"#include <cstdint>
+#include <immintrin.h>
+#include <iostream>
+#include <random>
+
+int main() {
+  std::random_device r;
+  std::default_random_engine e(r());
+  std::uniform_int_distribution<int32_t> d(1, 10);
+
+  alignas(32) int64_t t[]{0,0,0,0};
+  volatile auto a = _mm256_set_epi64x(d(e),d(e),d(e),d(e));
+  volatile auto b = _mm256_set_epi64x(d(e),d(e),d(e),d(e));
+  volatile auto z = _mm256_add_epi64(a, b);
+  _mm256_store_si256((__m256i*)t, z);
+  std::cout << \"(\" << t[0] << \", \" << t[1] << \", \" << t[2] << \", \" << t[3] << \")\" << std::endl;
+  return 0;
+}")
+
+set(SEQAN_SIMD_AVX512_KNL_SOURCE
+"#include <cstdint>
+#include <immintrin.h>
+#include <iostream>
+#include <random>
+
+int main() {
+  std::random_device r;
+  std::default_random_engine e(r());
+  std::uniform_int_distribution<int64_t> d(1, 10);
+
+  { // Some avx2 bug on AppleClang when compiling with avx512_skx or higher
+    using TSimdVector = int8_t __attribute__ ((__vector_size__(32)));
+
+    TSimdVector a{0u}, b{0u};
+
+    for (auto i = 0; i < 32; ++i)
+    {
+        a[i] = (i - 1) * 3;
+        b[i] = 32 - i;
+    }
+    TSimdVector c = _mm256_cmpeq_epi8(a, b);
+
+    for (auto i = 0; i < 32; ++i)
+    {
+        if (c[i] == (a[i] == b[i]))
+            std::cout << \"Failed!\" << std::endl;
+    }
+  }
+
+  {
+    alignas(64) uint64_t s[]{9,9,9,9,9,9,9,9};
+    alignas(64) uint64_t t[]{0,0,0,0,0,0,0,0};
+
+    // gcc 4.9 does not know _mm512_cmpgt_epu64_mask
+    volatile auto a = _mm512_setr_epi64(d(e),d(e),d(e),d(e),d(e),d(e),d(e),d(e));
+    volatile auto m = _mm512_cmpgt_epu64_mask(a, _mm512_set1_epi64(4)); // m = a > 4
+    volatile auto z = _mm512_mask_load_epi64(a, m, s); // (a > 4) ? s : a
+    _mm512_store_epi64(t, z);
+
+    std::cout << \"(\" << t[0] << \", \" << t[1] << \", \" << t[2] << \", \" << t[3] << \", ...)\" << std::endl;
+  }
+  return 0;
+}")
+
+set(SEQAN_SIMD_AVX512_SKX_SOURCE "${SEQAN_SIMD_AVX512_KNL_SOURCE}")
+set(SEQAN_SIMD_AVX512_CNL_SOURCE "${SEQAN_SIMD_AVX512_KNL_SOURCE}")
+
+set(SEQAN_SIMD_SEQANSIMD_SOURCE
+"#include <cstdint>
+#include <iostream>
+using int32x4_t = int32_t __attribute__ ((__vector_size__(4 * sizeof(int32_t)))); // SSE4 = 128bit
+using int32x8_t = int32_t __attribute__ ((__vector_size__(8 * sizeof(int32_t)))); // AVX2 = 256bit
+
+// gcc 4.9 bug (-fabi-version=6 (or =0) avoids this error with a change in mangling)
+template <typename vector_t>
+struct LENGTH;
+
+template <>
+struct LENGTH<int32x4_t>{
+    static const std::size_t VALUE = 4;
+};
+
+template <>
+struct LENGTH<int32x8_t>{
+    static const std::size_t VALUE = 8;
+};
+
+// icc 16.0.0, 16.0.1 bug
+template <typename TSimdVector, typename TValue>
+void assign(TSimdVector & a, int index, TValue value) { a[index] = value; }
+
+// icc >= 16.0.0 & <17.0.2 bug
+struct simd_t { int32x4_t simd_vector; };
+
+namespace ns {
+template <typename T>
+T & value(T * me) { return *me; }
+}
+
+template <typename value_t>
+void destruct(value_t * p) { }
+
+template <typename value_t>
+struct string_t {
+    value_t * value;
+
+    template <typename T1>
+    bool static assert(const T1 & value1, const T1 & value2) { return value1 <= value2; }
+
+    string_t() : value(0) { assert(value, value); }
+    ~string_t() { destruct(&ns::value(value)); }
+};
+
+template <typename value_t>
+struct holder_t {
+    value_t * value;
+
+    holder_t() { value = new value_t; }
+    ~holder_t() { delete value; }
+};
+
+struct matrix_t {  holder_t<string_t<simd_t>> cells; };
+
+int main() {
+  int32x4_t a{0,1,2,3}, b{4,3,2,1};
+  int32x8_t x{0,1,2,3,4,5,6,7}, y{4,3,2,1,0,-1,-2,-3};
+  auto c = a + b;
+  auto z = x + y;
+
+  // gcc 4.9 bug
+  constexpr auto length1 = LENGTH<int32x4_t>::VALUE;
+  constexpr auto length2 = LENGTH<int32x8_t>::VALUE;
+  static_assert(length1 == 4u, \"\");
+  static_assert(length2 == 8u, \"\");
+  std::cout << \"length1: \" << length1 << std::endl;
+  std::cout << \"length2: \" << length2 << std::endl;
+
+  // icc 16.0.0, 16.0.1 bug
+  assign(a, 0, 4);
+
+  // icc >= 16.0.0 & <17.0.2 bug
+  holder_t<matrix_t> matrix;
+  return 0;
+}")
+
+set(SEQAN_SIMD_SEQANSIMD_AVX512_KNL_SOURCE
+"#include <x86intrin.h>
+#include <iostream>
+
+
+int main() {
+  // clang bug 4.0.0, https://bugs.llvm.org//show_bug.cgi?id=31731
+  // -std=c++14 -mavx512bw -O3
+
+  {
+    using int8x32_t = signed char __attribute__ ((__vector_size__(32)));
+    unsigned length = sizeof(int8x32_t) / sizeof(char);
+    int8x32_t a{}, b{};
+    for (auto i = 0u; i < length; ++i) { a[i] = i-1; b[i] = -i; }
+
+    auto c = a < b;
+    for(auto i = 0u; i < length; ++i)
+      std::cout << (int)c[i] << std::endl;
+  }
+
+  // gcc 5.0 bug
+  // -std=c++14 -mavx512f -O3
+  {
+    using int8x64_t = signed char __attribute__ ((__vector_size__(64)));
+    unsigned length = sizeof(int8x64_t) / sizeof(char);
+    int8x64_t a{}, b{};
+    for (auto i = 0u; i < length; ++i) { a[i] = i-1; b[i] = -i; }
+
+    auto c = a == b;
+    for(auto i = 0u; i < length; ++i)
+      std::cout << (int)c[i] << std::endl;
+  }
+  return 0;
+}")
+
+# list1 and list2
+macro(list_intersect output list1 list2)
+    set(${output})
+    foreach(item ${list1})
+        if (";${list2};" MATCHES ";${item};")
+            list(APPEND ${output} "${item}")
+        endif()
+    endforeach()
+endmacro()
+
+# list1\list2 = list1 and not list2
+macro(list_complement output list1 list2)
+    set(${output})
+    foreach(item ${list1})
+        if (NOT(";${list2};" MATCHES ";${item};"))
+            list(APPEND ${output} "${item}")
+        endif()
+    endforeach()
+endmacro()
+
+# Returns list of all simd extension prior to `simd_ext`
+macro(simd_list_version_less output simd_ext)
+  set(${output})
+
+  foreach(item ${SEQAN_SIMD_SUPPORTED_EXTENSIONS})
+      if (";${item};" MATCHES ";${simd_ext};")
+          break()
+      endif()
+      list(APPEND ${output} "${item}")
+  endforeach()
+endmacro()
+
+# Returns list of all simd extension after to `simd_ext`
+macro(simd_list_version_greater output simd_ext)
+  set(${output})
+  simd_list_version_less(${output} "${simd_ext}")
+  set(${output} ${${output}} "${simd_ext}")
+  list_complement(${output} "${SEQAN_SIMD_SUPPORTED_EXTENSIONS}" "${${output}}")
+endmacro()
+
+# simd specialized try-compile macro
+macro(check_cxx_simd_source_runs SOURCE VAR)
+    if(NOT DEFINED "${VAR}")
+        # empty flags means that this simd extension is not supported by the compiler
+        if (CMAKE_REQUIRED_FLAGS)
+            # -O3 is needed to trigger a compiler bug on clang 4.0.0
+            if (COMPILER_GCC OR COMPILER_CLANG OR COMPILER_LINTEL)
+                set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -O3")
+            endif()
+
+            # CMAKE_REQUIRED_QUIET available since cmake 3.1.0
+            set(CMAKE_REQUIRED_QUIET ON)
+            check_cxx_source_runs("${SOURCE}" ${VAR})
+            set(CMAKE_REQUIRED_QUIET OFF)
+        endif()
+
+        message(STATUS "Performing Test ${VAR}")
+        if (NOT CMAKE_REQUIRED_FLAGS)
+            set(${VAR} 0 CACHE INTERNAL "Test ${VAR}")
+            message(STATUS "Performing Test ${VAR} - No flags to enable simd architecture")
+        elseif (${VAR})
+            message(STATUS "Performing Test ${VAR} - Success (Compiled & Host CPU support)")
+        elseif (NOT ${VAR}_COMPILED)
+            message(STATUS "Performing Test ${VAR} - Failed")
+        elseif (NOT ${VAR})
+            message(STATUS "Performing Test ${VAR} - Success (Compiled)")
+        endif()
+    endif()
+endmacro()
+
+# detect simd support and cache it
+macro(detect_simd_support)
+    # Executing simd on 32bit architectures has issues
+    if (NOT DEFINED SEQAN_SIMD_DETECTED AND CMAKE_SIZEOF_VOID_P EQUAL 4)
+        message(STATUS "SIMD acceleration is only available on 64bit systems")
+        set(SEQAN_SIMD_DETECTED 1 CACHE INTERNAL "Detected SEQAN_SIMD_DETECTED")
+        set(SEQAN_SIMD_COMPILER_SUPPORTS_INTRINSICS "" CACHE INTERNAL "Test SEQAN_SIMD_COMPILER_SUPPORTS_INTRINSICS")
+        set(SEQAN_SIMD_COMPILER_SUPPORTS_SEQANSIMD "" CACHE INTERNAL "Test SEQAN_SIMD_COMPILER_SUPPORTS_SEQANSIMD")
+        set(SEQAN_SIMD_HOST_CPU_SUPPORTS "" CACHE INTERNAL "Test SEQAN_SIMD_HOST_CPU_SUPPORTS")
+    elseif (NOT DEFINED SEQAN_SIMD_DETECTED)
+        # First try to compile AND run e.g. SEQAN_SIMD_SSE4_SOURCE, otherwise try to
+        # only compile the program
+        foreach(simd_ext ${SEQAN_SIMD_SUPPORTED_EXTENSIONS})
+            string(TOUPPER ${simd_ext} SIMD_EXT)
+            set(CMAKE_REQUIRED_FLAGS "${SEQAN_SIMD_${SIMD_EXT}_FLAGS}")
+            check_cxx_simd_source_runs("${SEQAN_SIMD_${SIMD_EXT}_SOURCE}" ${SIMD_EXT}_SOURCE_RUNS)
+
+            if (${SIMD_EXT}_SOURCE_RUNS)
+                list(APPEND SEQAN_SIMD_HOST_CPU_SUPPORTS "${simd_ext}")
+            endif()
+
+            if (${SIMD_EXT}_SOURCE_RUNS_COMPILED)
+                list(APPEND SEQAN_SIMD_COMPILER_SUPPORTS_INTRINSICS "${simd_ext}")
+            elseif (CMAKE_REQUIRED_FLAGS)
+                message(STATUS "=> Abort simd detection of newer instruction sets")
+                break()
+            endif()
+        endforeach()
+
+        # test seqan simd
+        set(CMAKE_REQUIRED_FLAGS "")
+        check_cxx_source_compiles("${SEQAN_SIMD_SEQANSIMD_SOURCE}" SEQAN_SIMD_SEQANSIMD_SUPPORTED)
+
+        # try-compile known compiler crashes/errors with seqan-simd and exclude them
+        if (SEQAN_SIMD_SEQANSIMD_SUPPORTED)
+            set(CMAKE_REQUIRED_FLAGS "${SEQAN_SIMD_AVX512_KNL_FLAGS}")
+            check_cxx_simd_source_runs("${SEQAN_SIMD_SEQANSIMD_AVX512_KNL_SOURCE}" SEQANSIMD_AVX512_KNL_SOURCE_RUNS)
+
+            if (SEQANSIMD_AVX512_KNL_SOURCE_RUNS_COMPILED)
+                set(_SEQANSIMD_SUPPORTED "${SEQAN_SIMD_SUPPORTED_EXTENSIONS}")
+            else ()
+                simd_list_version_less(_SEQANSIMD_SUPPORTED "avx512_knl")
+            endif()
+        endif()
+
+        # seqan-simd also uses intrinsics, so exclude those that failed the intrinsic try-compile
+        list_intersect(SEQAN_SIMD_COMPILER_SUPPORTS_SEQANSIMD "${_SEQANSIMD_SUPPORTED}" "${SEQAN_SIMD_COMPILER_SUPPORTS_INTRINSICS}")
+
+        # cache results
+        set(SEQAN_SIMD_DETECTED 1 CACHE INTERNAL "Detected SEQAN_SIMD_DETECTED")
+        set(SEQAN_SIMD_COMPILER_SUPPORTS_INTRINSICS "${SEQAN_SIMD_COMPILER_SUPPORTS_INTRINSICS}" CACHE INTERNAL "Test SEQAN_SIMD_COMPILER_SUPPORTS_INTRINSICS")
+        set(SEQAN_SIMD_COMPILER_SUPPORTS_SEQANSIMD "${SEQAN_SIMD_COMPILER_SUPPORTS_SEQANSIMD}" CACHE INTERNAL "Test SEQAN_SIMD_COMPILER_SUPPORTS_SEQANSIMD")
+        set(SEQAN_SIMD_HOST_CPU_SUPPORTS "${SEQAN_SIMD_HOST_CPU_SUPPORTS}" CACHE INTERNAL "Test SEQAN_SIMD_HOST_CPU_SUPPORTS")
+
+        if(SEQAN_SIMD_UTILITY_VERBOSE)
+            message(STATUS "SEQAN_SIMD_SEQANSIMD_SUPPORTED: ${SEQAN_SIMD_SEQANSIMD_SUPPORTED}")
+            message(STATUS "SEQAN_SIMD_COMPILER_SUPPORTS_INTRINSICS: ${SEQAN_SIMD_COMPILER_SUPPORTS_INTRINSICS}")
+            message(STATUS "SEQAN_SIMD_COMPILER_SUPPORTS_SEQANSIMD: ${SEQAN_SIMD_COMPILER_SUPPORTS_SEQANSIMD}")
+            message(STATUS "SEQAN_SIMD_HOST_CPU_SUPPORTS: ${SEQAN_SIMD_HOST_CPU_SUPPORTS}")
+        endif()
+
+        unset(CMAKE_REQUIRED_FLAGS)
+        unset(SIMD_EXT)
+        unset(_SEQANSIMD_SUPPORTED)
+    endif()
+endmacro()
+
+macro(transfer_target_property property source_target target_target)
+    get_target_property(_property_value ${source_target} ${property})
+
+    # message(STATUS "${source_target}: ${property} == ${_property_value}")
+
+    if(_property_value)
+        # message(STATUS "${target_target}: set ${property} = ${_property_value}")
+        set_target_properties(${target_target} PROPERTIES ${property} "${_property_value}")
+    endif()
+endmacro()
+
+macro(clone_target source_target target_target)
+    get_target_property(_SOURCES ${source_target} SOURCES)
+
+    # message(STATUS "transfer properties from ${source_target} to ${target_target}")
+    # message(STATUS "${source_target}: SOURCES == ${_SOURCES}")
+    # message(STATUS "${target_target}: set SOURCES = ${_SOURCES}")
+    add_executable(${target_target} ${_SOURCES})
+
+    # https://cmake.org/cmake/help/v3.4/manual/cmake-properties.7.html#properties-on-targets
+    set(properies "SOURCE_DIR;COMPILE_DEFINITIONS;COMPILE_FEATURES;COMPILE_FLAGS"
+                "COMPILE_OPTIONS;LINK_LIBRARIES;LINK_FLAGS;CXX_EXTENSIONS"
+                "CXX_STANDARD;CXX_STANDARD_REQUIRED;FOLDER;INCLUDE_DIRECTORIES")
+
+    foreach(property ${properies})
+        transfer_target_property(${property} ${source_target} ${target_target})
+    endforeach()
+endmacro(clone_target)
+
+macro(add_simd_executables target blacklist)
+    foreach(simd_ext ${SEQAN_SIMD_SUPPORTED_EXTENSIONS})
+        string(TOUPPER ${simd_ext} SIMD_EXT)
+        if (NOT (";${blacklist};" MATCHES ";${simd_ext};"))
+            # i.e. clone_target(${target} "${target}_avx2")
+            clone_target(${target} "${target}_${simd_ext}")
+            # i.e. target_compile_options("${target}_avx2" PRIVATE "${SEQAN_SIMD_AVX2_OPTIONS}")
+            target_compile_options("${target}_${simd_ext}" PRIVATE "${SEQAN_SIMD_${SIMD_EXT}_OPTIONS}")
+
+            # empty FLAGS means no support for this simd architecture
+            if (NOT SEQAN_SIMD_${SIMD_EXT}_OPTIONS)
+                message(STATUS "${simd_ext} not supported on ${CMAKE_CXX_COMPILER_ID} (no flags)")
+            endif()
+        endif()
+        unset(SIMD_EXT)
+    endforeach()
+endmacro(add_simd_executables)
+
+macro(add_simd_tests target blacklist)
+    add_test(NAME "test_${target}" COMMAND $<TARGET_FILE:${target}>)
+
+    # simd extensions supported by the host CPU
+    foreach(simd_ext ${SEQAN_SIMD_HOST_CPU_SUPPORTS})
+        string(TOUPPER ${simd_ext} SIMD_EXT)
+        if (TARGET "${target}_${simd_ext}" AND NOT (";${blacklist};" MATCHES ";${simd_ext};"))
+            # expands as
+            # add_test(NAME "test_test_simd_vector_sse4" COMMAND /usr/bin/sde64 -snb -- $<TARGET_FILE:test_simd_vector_sse4>)
+            add_test(NAME "test_${target}_${simd_ext}_host" COMMAND $<TARGET_FILE:${target}_${simd_ext}>)
+        endif()
+    endforeach()
+
+    if (SDE_FOUND)
+        foreach(simd_ext ${SEQAN_SIMD_SUPPORTED_EXTENSIONS})
+            string(TOUPPER ${simd_ext} SIMD_EXT)
+            if (TARGET "${target}_${simd_ext}" AND NOT (";${blacklist};" MATCHES ";${simd_ext};"))
+                # expands as
+                # add_test(NAME "test_test_simd_vector_sse4" COMMAND /usr/bin/sde64 -snb -- $<TARGET_FILE:test_simd_vector_sse4>)
+                add_test(NAME "test_${target}_${simd_ext}_sde" COMMAND ${SDE_EXECUTABLE} ${SEQAN_SIMD_${SIMD_EXT}_SDE_OPTIONS} -- $<TARGET_FILE:${target}_${simd_ext}>)
+            endif()
+        endforeach()
+    else ()
+        message (STATUS "Intel Software Development Emulator not found, not building platform emulated tests.")
+    endif()
+endmacro(add_simd_tests)
+
+macro(add_simd_platform_tests target)
+    if (UMESIMD_FOUND)
+        clone_target("${target}" "${target}_umesimd")
+        target_include_directories("${target}_umesimd" PUBLIC "${UMESIMD_INCLUDE_DIR}")
+        target_compile_definitions("${target}_umesimd" PUBLIC SEQAN_UMESIMD_ENABLED=1)
+    endif()
+
+    # We don't disable AVX512 even though seqan-simd doesn't support AVX512 (it
+    # will fallback to AVX2 in source code), but it replaces some intrinsics
+    # with ones introduced in AVX512.
+    set(seqansimd_compile_blacklist "")
+    set(seqansimd_test_blacklist "")
+
+    set(umesimd_compile_blacklist "")
+    set(umesimd_test_blacklist "")
+
+    if (COMPILER_CLANG)
+        # clang 4.x
+        if (NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.0.2) AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0) AND (";${SEQAN_SIMD_COMPILER_SUPPORTS_SEQANSIMD};" MATCHES ";avx512_skx;"))
+            message(AUTHOR_WARNING "Clang 4.x; reevaluate if AVX512_skx (seqan-simd only) binaries are working. "
+                    "An earlier version had an Internal Compiler Error (https://llvm.org/bugs/show_bug.cgi?id=31731), "
+                    "which was fixed, the produced binaries might work now. (clang 5.0 is known to work)")
+        elseif ((CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3.9) AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.0.2))
+            simd_list_version_greater(seqansimd_compile_blacklist avx512_knl)
+            set(reason_for_disabled_test "Clang 4.0.x produces executables that fail the basic vector test `test_simd_vector`")
+        # clang =3.9.0
+        elseif (NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.9) AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.9.1)
+            # Build the executables, but don't execute them, because clang <= 3.9.x
+            # produces executables which contain invalid instructions for AVX512.
+            simd_list_version_greater(umesimd_test_blacklist avx2)
+            simd_list_version_greater(seqansimd_test_blacklist avx2)
+            set(reason_for_disabled_test "Clang 3.9.0 produces executables that contain invalid instructions for at least AVX512_knl and AVX512_skx")
+        # clang =3.9.1
+        elseif (NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.9.1) AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.9.2)
+            simd_list_version_greater(seqansimd_test_blacklist avx512_knl)
+            set(reason_for_disabled_test "Clang 3.9.1 produces executables that contain invalid instructions for at least AVX512_skx (seqan-simd only), see https://llvm.org/bugs/show_bug.cgi?id=31731")
+        # clang >=3.9.2
+        elseif (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3.9.1 AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.0.0)
+            message(AUTHOR_WARNING "Clang >=3.9.2 reevaluate if AVX512_skx (seqan-simd only) binaries are working.")
+        # clang 3.7.x
+        elseif(NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.7) AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.8))
+            ## seqan-simd:
+            # avx2: clang 3.7.x fails test cases:
+            #       SimdVectorTestCommon_ShuffleConstant1 type parameter (un-)signed char __vector(32) FAILED
+            #       SimdVectorTestCommon_ShuffleConstant1 type parameter (un-)signed short __vector(16) FAILED
+            simd_list_version_greater(seqansimd_test_blacklist sse4)
+            set(reason_for_disabled_test "Clang 3.7.x produces executables that fail the basic vector test `test_simd_vector`")
+        endif()
+    endif()
+
+    if(COMPILER_GCC AND DEFINED ENV{TRAVIS} AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0.0)
+        # Disable avx2,avx512_knl,... on travis, because sometimes gcc 5.x and 6.x crashes
+        simd_list_version_greater(_travis_compile_blacklist sse4)
+        set(seqansimd_compile_blacklist ${seqansimd_compile_blacklist} ${_travis_compile_blacklist})
+        set(umesimd_compile_blacklist ${umesimd_compile_blacklist} ${_travis_compile_blacklist})
+        message(STATUS "Don't compile ${seqansimd_compile_blacklist} on travis, because gcc<=8.x crashes occasionally")
+    endif()
+
+    # detect simd support by try-compile and try-run
+    detect_simd_support()
+
+    # exclude all simd extensions where a simple try-compile failed
+    list_complement(_simd_intrinsics_blacklist "${SEQAN_SIMD_SUPPORTED_EXTENSIONS}" "${SEQAN_SIMD_COMPILER_SUPPORTS_INTRINSICS}")
+    list_complement(_simd_seqansimd_blacklist "${SEQAN_SIMD_SUPPORTED_EXTENSIONS}" "${SEQAN_SIMD_COMPILER_SUPPORTS_SEQANSIMD}")
+    set(seqansimd_compile_blacklist ${seqansimd_compile_blacklist} ${_simd_intrinsics_blacklist} ${_simd_seqansimd_blacklist})
+    set(umesimd_compile_blacklist ${umesimd_compile_blacklist} ${_simd_intrinsics_blacklist})
+
+    if (UMESIMD_FOUND AND umesimd_test_blacklist AND seqansimd_test_blacklist)
+        message(STATUS "Disable test `${target}` for seqan-simd and ume-simd and the following simd extensions ${seqansimd_test_blacklist} and ${umesimd_test_blacklist}")
+        message(STATUS "\tReason: ${reason_for_disabled_test}")
+    elseif (UMESIMD_FOUND AND umesimd_test_blacklist)
+        message(STATUS "Disable test `${target}` for ume-simd and the following simd extensions ${umesimd_test_blacklist}")
+        message(STATUS "\tReason: ${reason_for_disabled_test}")
+    elseif (seqansimd_test_blacklist)
+        message(STATUS "Disable test `${target}` for seqan-simd and the following simd extensions ${seqansimd_test_blacklist}")
+        message(STATUS "\tReason: ${reason_for_disabled_test}")
+    endif()
+
+    if (SEQAN_SIMD_UTILITY_VERBOSE)
+        message(STATUS "seqansimd_compile_blacklist: ${seqansimd_compile_blacklist}")
+        message(STATUS "umesimd_compile_blacklist: ${umesimd_compile_blacklist}")
+        message(STATUS "seqansimd_test_blacklist: ${seqansimd_test_blacklist}")
+        message(STATUS "umesimd_test_blacklist: ${umesimd_test_blacklist}")
+    endif()
+
+    add_simd_executables("${target}" "${seqansimd_compile_blacklist}")
+    add_simd_tests("${target}" "${seqansimd_test_blacklist}")
+
+    if (UMESIMD_FOUND)
+        add_simd_executables("${target}_umesimd" "${umesimd_compile_blacklist}")
+        add_simd_tests("${target}_umesimd" "${umesimd_test_blacklist}")
+    endif()
+endmacro(add_simd_platform_tests)
diff --git a/util/cmake/SeqAnUsabilityAnalyzer.cmake b/util/cmake/SeqAnUsabilityAnalyzer.cmake
index d1cf165..4c642c2 100644
--- a/util/cmake/SeqAnUsabilityAnalyzer.cmake
+++ b/util/cmake/SeqAnUsabilityAnalyzer.cmake
@@ -1,7 +1,7 @@
 # ============================================================================
 #                  SeqAn - The Library for Sequence Analysis
 # ============================================================================
-# Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+# Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
diff --git a/util/cmake/SetCPackSystemName.cmake b/util/cmake/SetCPackSystemName.cmake
index ff5f783..293b7ba 100644
--- a/util/cmake/SetCPackSystemName.cmake
+++ b/util/cmake/SetCPackSystemName.cmake
@@ -1,7 +1,7 @@
 # ============================================================================
 #                  SeqAn - The Library for Sequence Analysis
 # ============================================================================
-# Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+# Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
diff --git a/util/cmake/ctd/COPYRIGHT b/util/cmake/ctd/COPYRIGHT
index 74b16b1..2a5babe 100644
--- a/util/cmake/ctd/COPYRIGHT
+++ b/util/cmake/ctd/COPYRIGHT
@@ -1,2 +1,2 @@
-Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 All rights reserved.
diff --git a/util/cmake/ctd/LICENSE b/util/cmake/ctd/LICENSE
index 019e29a..f7ef315 100644
--- a/util/cmake/ctd/LICENSE
+++ b/util/cmake/ctd/LICENSE
@@ -3,7 +3,7 @@ BSD 3-Clause License
 ==========================================================================
                 SeqAn - The Library for Sequence Analysis
 ==========================================================================
-Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
diff --git a/util/cmake/package.cmake b/util/cmake/package.cmake
index f1d5f42..c209c9a 100644
--- a/util/cmake/package.cmake
+++ b/util/cmake/package.cmake
@@ -1,7 +1,7 @@
 # ============================================================================
 #                  SeqAn - The Library for Sequence Analysis
 # ============================================================================
-# Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+# Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
diff --git a/util/cmake/seqan-config.cmake b/util/cmake/seqan-config.cmake
index f075feb..ef8a766 100644
--- a/util/cmake/seqan-config.cmake
+++ b/util/cmake/seqan-config.cmake
@@ -1,7 +1,7 @@
 # ============================================================================
 #                  SeqAn - The Library for Sequence Analysis
 # ============================================================================
-# Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+# Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -85,6 +85,14 @@ include(CheckIncludeFileCXX)
 include(CheckCXXSourceCompiles)
 
 # ----------------------------------------------------------------------------
+# Set CMAKE policies.
+# ----------------------------------------------------------------------------
+
+if (POLICY CMP0054)  # Disables auto-dereferencing of variables in quoted statements
+  cmake_policy(SET CMP0054 NEW)
+endif()
+
+# ----------------------------------------------------------------------------
 # Define Constants.
 # ----------------------------------------------------------------------------
 
@@ -158,9 +166,9 @@ elseif (COMPILER_CLANG)
 
 elseif (COMPILER_LINTEL OR COMPILER_WINTEL)
 
-    # require at least icpc 16.0.2
-    if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16.0.2)
-        message(AUTHOR_WARNING "Intel Compiler version (${CMAKE_CXX_COMPILER_VERSION}) should be at least 16.0.2! Anything below is untested.")
+    # require at least icpc 17.0.0
+    if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 17.0.0)
+        message(AUTHOR_WARNING "Intel Compiler version (${CMAKE_CXX_COMPILER_VERSION}) should be at least 17.0.0! Anything below is untested.")
     endif ()
 
 elseif (COMPILER_MSVC)
@@ -238,9 +246,8 @@ endif (WIN32)
 # Visual Studio Setup
 if (COMPILER_MSVC OR COMPILER_WINTEL)
   # Enable intrinics (e.g. _interlockedIncrease)
-  # /EHsc will be set automatically for COMPILER_MSVC and COMPILER_WINTEL, but
   # COMPILER_CLANG (clang/c2 3.7) can not handle the /EHsc and /Oi flag
-  set (SEQAN_DEFINITIONS ${SEQAN_DEFINITIONS} /Oi)
+  set (SEQAN_DEFINITIONS ${SEQAN_DEFINITIONS} /EHsc /Oi)
 endif ()
 
 # ----------------------------------------------------------------------------
@@ -298,12 +305,9 @@ if ((${CMAKE_SYSTEM_NAME} STREQUAL "Linux") OR (${CMAKE_SYSTEM_NAME} STREQUAL "k
   set (SEQAN_LIBRARIES ${SEQAN_LIBRARIES} rt)
 endif ()
 
+# some OSes don't link pthread fully when building statically so we explicitly include whole archive
 if (UNIX AND NOT APPLE)
-  if ((CMAKE_CXX_FLAGS MATCHES "-static") OR (SEQAN_CXX_FLAGS MATCHES "-static") OR (CMAKE_EXE_LINKER_FLAGS MATCHES "-static"))
     set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--whole-archive -lpthread -Wl,--no-whole-archive")
-  else ()
-    set (SEQAN_LIBRARIES ${SEQAN_LIBRARIES} pthread)
-  endif ()
 endif ()
 
 if ((${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") OR (${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD"))
@@ -352,6 +356,15 @@ if (NOT _SEQAN_FIND_BZIP2 EQUAL -1)
     find_package(BZip2 QUIET)
 endif ()
 
+if (NOT ZLIB_FOUND AND BZIP2_FOUND)
+    # NOTE(marehr): iostream_bzip2 uses the type `uInt`, which is defined by
+    # `zlib`. Therefore, `bzip2` will cause a ton of errors without `zlib`.
+    message(AUTHOR_WARNING "Disabling BZip2 [which was successfully found], "
+            "because ZLIB was not found. BZip2 is depending on ZLIB.")
+    unset(BZIP2_FOUND)
+    unset(SEQAN_HAS_BZIP2)
+endif ()
+
 if (BZIP2_FOUND)
     set (SEQAN_HAS_BZIP2    TRUE) # deprecated: use BZIP2_FOUND instead
     set (SEQAN_LIBRARIES         ${SEQAN_LIBRARIES}         ${BZIP2_LIBRARIES})
diff --git a/util/pkgconfig/seqan.pc.in b/util/pkgconfig/seqan.pc.in
index 8cc5f3f..7dc4a00 100644
--- a/util/pkgconfig/seqan.pc.in
+++ b/util/pkgconfig/seqan.pc.in
@@ -1,6 +1,4 @@
-prefix=@CMAKE_INSTALL_PREFIX@
-exec_prefix=${prefix}
-includedir=${prefix}/include
+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
 
 Name: @CMAKE_PROJECT_NAME@
 Description: C++ library for biological sequence analysis
diff --git a/util/py_lib/CMakeLists.txt b/util/py_lib/CMakeLists.txt
index ef4b578..3509a07 100644
--- a/util/py_lib/CMakeLists.txt
+++ b/util/py_lib/CMakeLists.txt
@@ -9,6 +9,11 @@
 # ===========================================================================
 
 # Look for Python and stop if it could not be found.
+# require python 2.7, not python3
+set(PythonInterp_FIND_VERSION 2.7)
+set(PythonInterp_FIND_VERSION_MAJOR 2)
+set(PythonInterp_FIND_VERSION_MINOR 7)
+set(PythonInterp_FIND_VERSION_COUNT 2)
 find_package (PythonInterp)
 
 if (NOT PYTHONINTERP_FOUND)
diff --git a/util/py_lib/seqan/LICENSE b/util/py_lib/seqan/LICENSE
index 61f9fdf..311e417 100644
--- a/util/py_lib/seqan/LICENSE
+++ b/util/py_lib/seqan/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
diff --git a/util/skel/app_template/CMakeLists.txt b/util/skel/app_template/CMakeLists.txt
index 6d1aeca..1c72c2b 100644
--- a/util/skel/app_template/CMakeLists.txt
+++ b/util/skel/app_template/CMakeLists.txt
@@ -48,7 +48,7 @@ endif (NOT SEQAN_PREFIX_SHARE_DOC)
 
 # Install %(NAME)s in ${PREFIX}/bin directory
 install (TARGETS %(NAME)s
-         DESTINATION bin)
+         DESTINATION ${CMAKE_INSTALL_BINDIR})
 
 # Install non-binary files for the package to "." for app builds and
 # ${PREFIX}/share/doc/%(NAME)s for SeqAn release builds.
diff --git a/util/skel/app_template/LICENSE b/util/skel/app_template/LICENSE
index 61f9fdf..311e417 100644
--- a/util/skel/app_template/LICENSE
+++ b/util/skel/app_template/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
diff --git a/util/skel/app_template/app.cpp b/util/skel/app_template/app.cpp
index f6f0811..eda7bab 100644
--- a/util/skel/app_template/app.cpp
+++ b/util/skel/app_template/app.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 // %(TITLE)s
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/util/skel/demo_template/demo.cpp b/util/skel/demo_template/demo.cpp
index 5202985..7c44820 100644
--- a/util/skel/demo_template/demo.cpp
+++ b/util/skel/demo_template/demo.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 // %(TITLE)s
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/util/skel/header_template/header.h b/util/skel/header_template/header.h
index c637e31..02e6f6b 100644
--- a/util/skel/header_template/header.h
+++ b/util/skel/header_template/header.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 // %(TITLE)s
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/util/skel/header_template/library_header.h b/util/skel/header_template/library_header.h
index dbeff83..08a808b 100644
--- a/util/skel/header_template/library_header.h
+++ b/util/skel/header_template/library_header.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 //                 SeqAn - The Library for Sequence Analysis
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/util/skel/module_template/header.h b/util/skel/module_template/header.h
index 31583fb..6d54a9f 100644
--- a/util/skel/module_template/header.h
+++ b/util/skel/module_template/header.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 // %(TITLE)s
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/util/skel/module_template/module.h b/util/skel/module_template/module.h
index bd572f2..7ea5b39 100644
--- a/util/skel/module_template/module.h
+++ b/util/skel/module_template/module.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 // %(TITLE)s
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/util/skel/test_template/test.cpp b/util/skel/test_template/test.cpp
index 20a69c3..3a225ab 100644
--- a/util/skel/test_template/test.cpp
+++ b/util/skel/test_template/test.cpp
@@ -1,7 +1,7 @@
 // ==========================================================================
 // %(TITLE)s
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/util/skel/test_template/test.h b/util/skel/test_template/test.h
index 10fbe3e..1c66676 100644
--- a/util/skel/test_template/test.h
+++ b/util/skel/test_template/test.h
@@ -1,7 +1,7 @@
 // ==========================================================================
 // %(TITLE)s
 // ==========================================================================
-// Copyright (c) 2006-2016, Knut Reinert, FU Berlin
+// Copyright (c) 2006-2018, Knut Reinert, FU Berlin
 // All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
diff --git a/util/travis/linux-cibuild.cmake b/util/travis/linux-cibuild.cmake
index 714ac24..35574ed 100644
--- a/util/travis/linux-cibuild.cmake
+++ b/util/travis/linux-cibuild.cmake
@@ -21,7 +21,6 @@ set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS 1000)
 set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 1000)
 set(CTEST_CUSTOM_WARNING_EXCEPTION "statically linked applications")
 
-
 # Use 4 build threads
 set(CTEST_BUILD_FLAGS -j2)
 
diff --git a/util/travis/linux-cibuild.sh b/util/travis/linux-cibuild.sh
index 14627a8..97fb55f 100755
--- a/util/travis/linux-cibuild.sh
+++ b/util/travis/linux-cibuild.sh
@@ -18,6 +18,11 @@ if [ "$(echo ${CXX} | cut -c1-5)" = "clang" ]; then
   export CXXFLAGS="${CXXFLAGS} -Qunused-arguments -DSEQAN_IGNORE_MISSING_OPENMP=1"
 fi
 
+# compile with c++-17 if g++-7 is used.
+if [ "$(echo ${CXX})" = "g++-7" ]; then
+  export CXXFLAGS="${CXXFLAGS} -std=c++17"
+fi
+
 # Switch version check default to OFF to prevent checks during app tests
 CXXFLAGS="${CXXFLAGS} -DSEQAN_VERSION_CHECK_OPT_IN=YES"
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/seqan2.git



More information about the debian-med-commit mailing list