Add tests. Setup coverage.
Merge pull request #976 from normanjaeckel/MoreTests

Add tests. Setup coverage.
Merge remote-tracking branch 'upstream/master'