updated comment
fixed formatting
added vector method to check for NaN/Infinity. Used it to vectorize more of the histogram hit function.