cleaned up cmd.js