Cli usage, some bugs fixed