Merge pull request #1 from mkollaro/devel

merge devel into master
Merge branch 'devel'
Merge branch 'devel'
Exception handling; improved cleanup option
added docstrings