Make thread manipulation configurable via NUM_CORE
Merge remote-tracking branch 'origin/master'