command line tool improvements plus small changes