Refactored encoder version detection into encoder-specific classes.