Bug fix and renaming to cli.js