Improving parameters in 'run' and adding debug option.