Automate tests

Fixes #16