many minor improvements to cli