WIP: Add test coverage

Test library and CLI.