Basic implementation of sensor framework.

Let's see if this works out. Probably will need some refactoring and
some better names etc. Also some responsibilities could be moved to
different classes.