Improved Version Constraints

These changes (or something pretty similar) were in the nextVersion branch when it existed.