Adds some tests

A set of unit and integration tests.

closes #94