Fixed threading, removed defines and that mess, config files support threaded (true/false) and threads (n)