Move the number of cpus logic to somewhere more logical.