update NanoCLI, and refactor