Slightly faster performance for histogramScript
Addresses #11 (Smarter histogram generation) but still experimental so it must be enabled explicitely