cleans up cli.js