cleaned command code