Low: cli: various code and performance improvements
Mercurial revision: d3441801af7605aaad262f900eb8e206baa35dda