Refactored validate_options