Add first tests

Added some tests. This is not complete but could be a starting point.

[coveralls](https://coveralls.io/) is introduced to find missing test cases. This will be really helpful to increase test coverage.
Coverage is visualized like this: https://coveralls.io/files/175063854