Added functions for working with sensors.
Updated sensor unit to use the new sensor functions.
Merge commit