Removed commented out code.
Made averages of sensors readings.
Tuned short treshold. Not resetting when treshold values are read.