First step towards fixing and organizing unit tests.

Begins to address #148.