Added basic tests. Fixes #2