more tests plus CLI enhancements