some cleanup, added THREADS to config