move internal commands from command.js to client.js