Refactoring SensorDatawidget