Adding tests

Fixes #8