Fixes #20; some capital improvements with tests and logging