Number of threads now configurable.