Update top-level constructs to enforce valid version properties

Fixes #173 

There are errors in the tests, but they also appear to be in master, so I don't think those are related to my changes (correct me if I am mistaken!)