[fixes #4] Refactor based on skmets example

https://github.com/strand/dude/pull/4\#issuecomment-14611927
Merge branch 'refactor-exception' of github.com:strand/dude into refactor-exception