Feature/unit tests

Quick unit test addition. This is not near 100% coverage, but gives us ~70% for very little effort.