Refactored version processing