Simplify implementation
Merge pull request #22 from wvanbergen/fixes

Simplify implementation