Test and refactor.

Preliminary testing code for non-blackbird-specific classes.
Also, refactor.
Merge pull request #4 from daniel-star/test-and-refactor-wip

Test and refactor.