Added exception types and header documentation

Should fix #34 .

And this is also the **first** step for #75.