Api fixes

Could you have a look at the tests to see if it's what you expect?  Especially the api constraints tests.  It won't work if you don't have the version in the header?  And the tests when `default` is defined are also a bit strange...