Improve validation. Fix bug in timecontainer.