make threshold values floats by construction
fix a couple of OCLint warning, i.e. short variable names and useless parantheses