Complete refactoring. No more specific to temperature, can be used with any data.
Clean output.