Adding option to control the number of threads

Threads can now be controlled by the site.build_threads variable.