Wrote some basic tests. Sufficiently fixes #4.