more streamlined code for version handling
Merge pull request #3 from msaint/version-fix-2

More streamlined code for version handling