Implement GetSensors, including a small refactor.