Started refactoring of Relabeling into optimized variants.