cleanup code, more integ cli tests