Better code reuse
Merge pull request #45 from tapir/master

Better code reuse