fix cli summary, improve tests