Changed the way number of threads and visual styles are set. Also, did
a minor work-around with the problem of displaying histograms.

Signed-off-by: aywu <aywu477@gmail.com>