Refactored the layout of the SensorDataWidget