Refactored version comparisons to understand semantics of version strings.