bugfix: added a missing struct keyword in some typedefs
wording improvement in comment
added prototypes for initialization functions
added exception handling to the API
clarified several matters in comments