SensorDataLayer bugfix+refactor.