Refactoring reorderer.
Multi sample reordering.
Fix merge conflicts.