add `repository` field
Make exceptions more informative
Mark init() as extern "c"
All types of clocks are optional now