Added more validations
Refactored the version extraction functions into a more dynamic one with tests