Implemented tests.
Merge pull request #46 from bahartmann/master

Implemented tests.