An improved structure and unitests for our new CLI. For #3.