Rename numberOfCores to numberOfWorkers

Also some minor cleanup to createGeometry.