Generalized sanity test.

Closes #13.
Closes #12.