Dont store Timespan in ValidUntil

Fixes #178

also added some unit tests which illustrate some other bugs