Merge pull request #14 from adlpz/master

Revert removal of duplicates as general rule
Improved exception hierarchy